From 29318b05c90480e003e3a096b573e39094410b1d Mon Sep 17 00:00:00 2001 From: "jer.noble@apple.com" Date: Sat, 7 Dec 2013 01:01:45 +0000 Subject: [PATCH] [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): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160263 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebCore/ChangeLog | 15 +++++++++++++++ Source/WebCore/testing/Internals.cpp | 3 +++ 2 files changed, 18 insertions(+) diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 71f167b0c4ffd..7367fd3de29be 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,18 @@ +2013-12-05 Jer Noble + + [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 Use NeverDestroyed instead of DEFINE_STATIC_LOCAL diff --git a/Source/WebCore/testing/Internals.cpp b/Source/WebCore/testing/Internals.cpp index c7ebc977eafd6..809fe8cf008a1 100644 --- a/Source/WebCore/testing/Internals.cpp +++ b/Source/WebCore/testing/Internals.cpp @@ -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