[MSE][Mac] Disable AVFoundation when enabling the MockMediaPlayerMediaSource.
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Dec 2013 01:01:45 +0000 (01:01 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Dec 2013 01:01:45 +0000 (01:01 +0000)
https://bugs.webkit.org/show_bug.cgi?id=125338

Reviewed by Darin Adler.

The MediaSource API has some assumptions which break if more than one installed
media engine supports MediaSources at the same time. So when enabling the mock
media source engine in DRT or WKTR, disable AVFoundation so that only the mock
engine will support media source loading.

* testing/Internals.cpp:
(WebCore::Internals::initializeMockMediaSource):

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

Source/WebCore/ChangeLog
Source/WebCore/testing/Internals.cpp

index 71f167b..7367fd3 100644 (file)
@@ -1,3 +1,18 @@
+2013-12-05  Jer Noble  <jer.noble@apple.com>
+
+        [MSE][Mac] Disable AVFoundation when enabling the MockMediaPlayerMediaSource.
+        https://bugs.webkit.org/show_bug.cgi?id=125338
+
+        Reviewed by Darin Adler.
+
+        The MediaSource API has some assumptions which break if more than one installed
+        media engine supports MediaSources at the same time. So when enabling the mock
+        media source engine in DRT or WKTR, disable AVFoundation so that only the mock
+        engine will support media source loading.
+
+        * testing/Internals.cpp:
+        (WebCore::Internals::initializeMockMediaSource):
+
 2013-12-06  Antti Koivisto  <antti@apple.com>
 
         Use NeverDestroyed instead of DEFINE_STATIC_LOCAL
index c7ebc97..809fe8c 100644 (file)
@@ -2260,6 +2260,9 @@ bool Internals::isPluginUnavailabilityIndicatorObscured(Element* element, Except
 #if ENABLE(MEDIA_SOURCE)
 void Internals::initializeMockMediaSource()
 {
+#if USE(AVFOUNDATION)
+    WebCore::Settings::setAVFoundationEnabled(false);
+#endif
     MediaPlayerFactorySupport::callRegisterMediaEngine(MockMediaPlayerMediaSource::registerMediaEngine);
 }
 #endif