[MSE] [Mac] Disclaim support for MSE in AVFoundation and QTKit engines
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Nov 2013 22:49:35 +0000 (22:49 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Nov 2013 22:49:35 +0000 (22:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=123593

Reviewed by Eric Carlson.

Immediately fail if asked to load a Media Source in engines which do not support
them.

* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::load):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::load):
(WebCore::MediaPlayerPrivateQTKit::supportsType):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158597 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h
Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm

index 3f5ce2b..0f0c665 100644 (file)
@@ -1,3 +1,23 @@
+2013-10-31  Jer Noble  <jer.noble@apple.com>
+
+        [MSE] [Mac] Disclaim support for MSE in AVFoundation and QTKit engines
+        https://bugs.webkit.org/show_bug.cgi?id=123593
+
+        Reviewed by Eric Carlson.
+
+        Immediately fail if asked to load a Media Source in engines which do not support
+        them.
+
+        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
+        (WebCore::MediaPlayerPrivateAVFoundation::load):
+        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
+        * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
+        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+        (WebCore::MediaPlayerPrivateQTKit::load):
+        (WebCore::MediaPlayerPrivateQTKit::supportsType):
+
 2013-11-04  Hans Muller  <hmuller@adobe.com>
 
         [CSS Shapes] image valued shape element margin can cause an ASSERT fail
index faca096..1aebb49 100644 (file)
@@ -197,6 +197,15 @@ void MediaPlayerPrivateAVFoundation::load(const String& url)
     setPreload(m_preload);
 }
 
+#if ENABLE(MEDIA_SOURCE)
+void MediaPlayerPrivateAVFoundation::load(const String&, PassRefPtr<HTMLMediaSource>)
+{
+    m_networkState = MediaPlayer::FormatError;
+    m_player->networkStateChanged();
+}
+#endif
+
+
 void MediaPlayerPrivateAVFoundation::playabilityKnown()
 {
     LOG(Media, "MediaPlayerPrivateAVFoundation::playabilityKnown(%p)", this);
index 1475401..7d19bff 100644 (file)
@@ -130,7 +130,7 @@ protected:
     // MediaPlayerPrivatePrivateInterface overrides.
     virtual void load(const String& url) OVERRIDE;
 #if ENABLE(MEDIA_SOURCE)
-    virtual void load(const String&, PassRefPtr<HTMLMediaSource>) { };
+    virtual void load(const String&, PassRefPtr<HTMLMediaSource>);
 #endif
     virtual void cancelLoad() = 0;
 
index 3f0baa9..c3cacb9 100644 (file)
@@ -904,6 +904,11 @@ MediaPlayer::SupportsType MediaPlayerPrivateAVFoundationObjC::supportsType(const
     // 2. Return "maybe" or "probably" as appropriate per the existing specification of canPlayType().
 #endif
 
+#if ENABLE(MEDIA_SOURCE)
+    if (parameters.isMediaSource)
+        return MediaPlayer::IsNotSupported;
+#endif
+
     if (!mimeTypeCache().contains(parameters.type))
         return MediaPlayer::IsNotSupported;
 
index 47db8af..282bea6 100644 (file)
@@ -95,7 +95,7 @@ private:
     
     void load(const String& url);
 #if ENABLE(MEDIA_SOURCE)
-    virtual void load(const String&, PassRefPtr<HTMLMediaSource>) { };
+    virtual void load(const String&, PassRefPtr<HTMLMediaSource>);
 #endif
     void cancelLoad();
     void loadInternal(const String& url);
index 7b74e7d..e9e8529 100644 (file)
@@ -669,6 +669,15 @@ void MediaPlayerPrivateQTKit::loadInternal(const String& url)
     [m_objcObserver.get() setDelayCallbacks:NO];
 }
 
+#if ENABLE(MEDIA_SOURCE)
+void MediaPlayerPrivateQTKit::load(const String&, PassRefPtr<HTMLMediaSource>)
+{
+    m_networkState = MediaPlayer::FormatError;
+    m_player->networkStateChanged();
+}
+#endif
+
+
 void MediaPlayerPrivateQTKit::prepareToPlay()
 {
     LOG(Media, "MediaPlayerPrivateQTKit::prepareToPlay(%p)", this);
@@ -1466,6 +1475,11 @@ MediaPlayer::SupportsType MediaPlayerPrivateQTKit::supportsType(const MediaEngin
         return MediaPlayer::IsNotSupported;
 #endif
 
+#if ENABLE(MEDIA_SOURCE)
+    if (parameters.isMediaSource)
+        return MediaPlayer::IsNotSupported;
+#endif
+
     // Only return "IsSupported" if there is no codecs parameter for now as there is no way to ask QT if it supports an
     // extended MIME type yet.