Title: [158597] trunk/Source/WebCore
Revision
158597
Author
[email protected]
Date
2013-11-04 14:49:35 -0800 (Mon, 04 Nov 2013)

Log Message

[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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (158596 => 158597)


--- trunk/Source/WebCore/ChangeLog	2013-11-04 22:39:46 UTC (rev 158596)
+++ trunk/Source/WebCore/ChangeLog	2013-11-04 22:49:35 UTC (rev 158597)
@@ -1,3 +1,23 @@
+2013-10-31  Jer Noble  <[email protected]>
+
+        [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  <[email protected]>
 
         [CSS Shapes] image valued shape element margin can cause an ASSERT fail

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp (158596 => 158597)


--- trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp	2013-11-04 22:39:46 UTC (rev 158596)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp	2013-11-04 22:49:35 UTC (rev 158597)
@@ -197,6 +197,15 @@
     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);

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h (158596 => 158597)


--- trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h	2013-11-04 22:39:46 UTC (rev 158596)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h	2013-11-04 22:49:35 UTC (rev 158597)
@@ -130,7 +130,7 @@
     // 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;
 

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (158596 => 158597)


--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2013-11-04 22:39:46 UTC (rev 158596)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2013-11-04 22:49:35 UTC (rev 158597)
@@ -904,6 +904,11 @@
     // 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;
 

Modified: trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h (158596 => 158597)


--- trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h	2013-11-04 22:39:46 UTC (rev 158596)
+++ trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h	2013-11-04 22:49:35 UTC (rev 158597)
@@ -95,7 +95,7 @@
     
     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);

Modified: trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm (158596 => 158597)


--- trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm	2013-11-04 22:39:46 UTC (rev 158596)
+++ trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm	2013-11-04 22:49:35 UTC (rev 158597)
@@ -669,6 +669,15 @@
     [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 @@
         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.
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to