Changeset 56349 in webkit


Ignore:
Timestamp:
Mar 22, 2010 11:40:58 AM (14 years ago)
Author:
jwieczorek@webkit.org
Message:

2010-03-22 Jakub Wieczorek <faw217@gmail.com>

Reviewed by Kenneth Rohde Christiansen.

[Qt] Phonon media backend: expose supported MIME types to WebCore

https://bugs.webkit.org/show_bug.cgi?id=33453

List all skipped media tests individually and unskip two fixed by the patch.

  • platform/qt/Skipped:

2010-03-22 Jakub Wieczorek <faw217@gmail.com>

Reviewed by Kenneth Rohde Christiansen.

[Qt] Phonon media backend: expose supported MIME types to WebCore

https://bugs.webkit.org/show_bug.cgi?id=33453

MediaPlayerPrivate should expose the MIME types that are supported
by the underlying backend in Phonon.

  • platform/graphics/qt/MediaPlayerPrivatePhonon.cpp: (WebCore::MediaPlayerPrivate::supportedTypesCache): (WebCore::MediaPlayerPrivate::getSupportedTypes): (WebCore::MediaPlayerPrivate::supportsType):
  • platform/graphics/qt/MediaPlayerPrivatePhonon.h:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r56348 r56349  
     12010-03-22  Jakub Wieczorek  <faw217@gmail.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] Phonon media backend: expose supported MIME types to WebCore
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=33453
     8
     9        List all skipped media tests individually and unskip two fixed by the patch.
     10
     11        * platform/qt/Skipped:
     12
    1132010-03-22  Geoffrey Garen  <ggaren@apple.com>
    214
  • trunk/LayoutTests/platform/qt/Skipped

    r56328 r56349  
    9898# ------- missing features
    9999accessibility
    100 media
    101100webarchive
    102101svg/webarchive
     
    139138# ------- crashes
    140139fast/text/find-hidden-text.html
     140
     141# failing media tests
     142media/adopt-node-crash.html
     143media/audio-constructor.html
     144media/audio-constructor-preload.html
     145media/audio-constructor-src.html
     146media/audio-controls-rendering.html
     147media/audio-data-url.html
     148media/audio-delete-while-slider-thumb-clicked.html
     149media/audio-delete-while-step-button-clicked.html
     150media/audio-mpeg-supported.html
     151media/audio-no-installed-engines.html
     152media/audio-play-event.html
     153media/before-load-member-access.html
     154media/broken-video.html
     155media/constructors.html
     156media/controls-after-reload.html
     157media/controls-css-overload.html
     158media/controls-drag-timebar.html
     159media/controls-right-click-on-timebar.html
     160media/controls-strict.html
     161media/controls-styling.html
     162media/event-attributes.html
     163media/fallback.html
     164media/media-captions.html
     165media/media-constants.html
     166media/media-fullscreen-inline.html
     167media/media-fullscreen-not-in-document.html
     168media/media-load-event.html
     169media/media-startTime.html
     170media/remove-from-document.html
     171media/remove-from-document-no-load.html
     172media/restore-from-page-cache.html
     173media/unsupported-rtsp.html
     174media/unsupported-tracks.html
     175media/video-append-source.html
     176media/video-aspect-ratio.html
     177media/video-autoplay.html
     178media/video-buffered.html
     179media/video-canvas.html-disabled
     180media/video-canvas-source.html
     181media/video-click-dblckick-standalone.html
     182media/video-controls.html
     183media/video-controls-rendering.html
     184media/video-controls-transformed.html
     185media/video-controls-visible-audio-only.html
     186media/video-controls-with-mutation-event-handler.html
     187media/video-controls-zoomed.html
     188media/video-currentTime.html
     189media/video-currentTime-set2.html
     190media/video-currentTime-set.html
     191media/video-display-aspect-ratio.html
     192media/video-display-none-crash.html
     193media/video-display-toggle.html
     194media/video-document-types.html
     195media/video-dom-autoplay.html
     196media/video-dom-preload.html
     197media/video-dom-src.html
     198media/video-empty-source.html
     199media/video-error-does-not-exist.html
     200media/video-layer-crash.html
     201media/video-load-networkState.html
     202media/video-load-readyState.html
     203media/video-loop.html
     204media/video-muted.html
     205media/video-no-audio.html
     206media/video-no-autoplay.html
     207media/video-pause-empty-events.html
     208media/video-pause-immediately.html
     209media/video-played-collapse.html
     210media/video-played-ranges-1.html
     211media/video-played-reset.html
     212media/video-play-empty-events.html
     213media/video-play-pause-events.html
     214media/video-play-pause-exception.html
     215media/video-poster.html
     216media/video-poster-scale.html
     217media/video-preload.html
     218media/video-replaces-poster.html
     219media/video-reverse-play-duration.html
     220media/video-seekable.html
     221media/video-seeking.html
     222media/video-seek-no-src-exception.html
     223media/video-seek-past-end-paused.html
     224media/video-seek-past-end-playing.html
     225media/video-size.html
     226media/video-size-intrinsic-scale.html
     227media/video-source-add-src.html
     228media/video-source-error.html
     229media/video-source-error-no-candidate.html
     230media/video-source.html
     231media/video-source-media.html
     232media/video-source-none-supported.html
     233media/video-source-type.html
     234media/video-source-type-params.html
     235media/video-src-change.html
     236media/video-src-empty.html
     237media/video-src.html
     238media/video-src-invalid-remove.html
     239media/video-src-none.html
     240media/video-src-plus-source.html
     241media/video-src-remove.html
     242media/video-src-set.html
     243media/video-src-source.html
     244media/video-timeupdate-during-playback.html
     245media/video-timeupdate-reverse-play.html
     246media/video-transformed.html
     247media/video-volume.html
     248media/video-volume-slider.html
     249media/video-width-height.html
     250media/video-zoom-controls.html
     251media/video-zoom.html
    141252
    142253# ========================================================================= #
     
    49655076http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-window-open.html
    49665077
    4967 # This test requires ogg codecs
    4968 media/media-can-play-ogg.html
    4969 
    49705078# Bunch of tests failing since a while on the Qt slave. Please investigate.
    49715079css1/classification/white_space.html
  • trunk/WebCore/ChangeLog

    r56347 r56349  
     12010-03-22  Jakub Wieczorek  <faw217@gmail.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] Phonon media backend: expose supported MIME types to WebCore
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=33453
     8
     9        MediaPlayerPrivate should expose the MIME types that are supported
     10        by the underlying backend in Phonon.
     11
     12        * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
     13        (WebCore::MediaPlayerPrivate::supportedTypesCache):
     14        (WebCore::MediaPlayerPrivate::getSupportedTypes):
     15        (WebCore::MediaPlayerPrivate::supportsType):
     16        * platform/graphics/qt/MediaPlayerPrivatePhonon.h:
     17
    1182010-03-22  Alexander Pavlov  <apavlov@chromium.org>
    219
  • trunk/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp

    r53670 r56349  
    2727#include "FrameView.h"
    2828#include "GraphicsContext.h"
     29#include "MIMETypeRegistry.h"
    2930#include "NotImplemented.h"
    3031#include "TimeRanges.h"
     
    3334
    3435#include <QDebug>
     36#include <QEvent>
     37#include <QMetaEnum>
    3538#include <QPainter>
    3639#include <QWidget>
    37 #include <QMetaEnum>
    3840#include <QUrl>
    39 #include <QEvent>
    40 
     41
     42#include <phonon/audiooutput.h>
     43#include <phonon/backendcapabilities.h>
    4144#include <phonon/path.h>
    42 #include <phonon/audiooutput.h>
    4345#include <phonon/mediaobject.h>
    4446#include <phonon/videowidget.h>
     
    144146}
    145147
    146 void MediaPlayerPrivate::getSupportedTypes(HashSet<String>&)
    147 {
    148     notImplemented();
    149 }
    150 
    151 MediaPlayer::SupportsType MediaPlayerPrivate::supportsType(const String&, const String&)
    152 {
    153     // FIXME: do the real thing
    154     notImplemented();
     148HashSet<String>& MediaPlayerPrivate::supportedTypesCache()
     149{
     150    static HashSet<String> supportedTypes;
     151    if (!supportedTypes.isEmpty())
     152        return supportedTypes;
     153
     154    // FIXME: we should rebuild the MIME type cache every time the backend is changed,
     155    // however, this would have no effect on MIMETypeRegistry anyway, because it
     156    // pulls this data only once.
     157
     158    QStringList types = Phonon::BackendCapabilities::availableMimeTypes();
     159    foreach (const QString& type, types) {
     160        QString first = type.split(QLatin1Char('/')).at(0);
     161
     162        // We're only interested in types which are not supported by WebCore itself.
     163        if (first != QLatin1String("video")
     164            && first != QLatin1String("audio")
     165            && first != QLatin1String("application"))
     166            continue;
     167        if (MIMETypeRegistry::isSupportedNonImageMIMEType(type))
     168            continue;
     169
     170        supportedTypes.add(String(type));
     171    }
     172
     173    // These formats are supported by GStreamer, but not correctly advertised.
     174    if (supportedTypes.contains(String("video/x-h264"))
     175        || supportedTypes.contains(String("audio/x-m4a"))) {
     176        supportedTypes.add(String("video/mp4"));
     177        supportedTypes.add(String("audio/aac"));
     178    }
     179
     180    if (supportedTypes.contains(String("video/x-theora")))
     181        supportedTypes.add(String("video/ogg"));
     182
     183    if (supportedTypes.contains(String("audio/x-vorbis")))
     184        supportedTypes.add(String("audio/ogg"));
     185
     186    if (supportedTypes.contains(String("audio/x-wav")))
     187        supportedTypes.add(String("audio/wav"));
     188
     189    return supportedTypes;
     190}
     191
     192void MediaPlayerPrivate::getSupportedTypes(HashSet<String>& types)
     193{
     194    types = supportedTypesCache();
     195}
     196
     197MediaPlayer::SupportsType MediaPlayerPrivate::supportsType(const String& type, const String& codecs)
     198{
     199    if (type.isEmpty())
     200        return MediaPlayer::IsNotSupported;
     201
     202    if (supportedTypesCache().contains(type))
     203        return codecs.isEmpty() ? MediaPlayer::MayBeSupported : MediaPlayer::IsSupported;
    155204    return MediaPlayer::IsNotSupported;
    156205}
  • trunk/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.h

    r53625 r56349  
    133133        static void getSupportedTypes(HashSet<String>&);
    134134        static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs);
     135        static HashSet<String>& supportedTypesCache();
    135136        static bool isAvailable() { return true; }
    136137
Note: See TracChangeset for help on using the changeset viewer.