summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit
diff options
context:
space:
mode:
authorxhwang <xhwang@chromium.org>2016-03-26 00:19:38 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-26 07:20:41 +0000
commitae2b3a4690087a0160600563edc316118efbdec7 (patch)
treeda11357ff782a1831008890aa8d0bf017241e797 /third_party/WebKit
parent885133a46da15cb6f60c0349a2b4a517c4b09971 (diff)
downloadchromium_src-ae2b3a4690087a0160600563edc316118efbdec7.zip
chromium_src-ae2b3a4690087a0160600563edc316118efbdec7.tar.gz
chromium_src-ae2b3a4690087a0160600563edc316118efbdec7.tar.bz2
(reland) media: Enable Unified Media Pipeline for MSE and EME on Android
This relands commit 92d0fffc36695c099005bf05862145a89d918f28. The test failure is fixed in https://chromiumcodereview.appspot.com/1837673002/. Original Description: Enables Mojo Media on Android to support EME in the unified media pipeline. This introduces MojoCdm, MojoAudioDecoder and encrytped stream support in AndroidVideoDecodeAccelerator. This CL also enables MSE in the unified media pipeline. The fallback logic for MSE (IsUnifiedMediaPipelineEnabledForMse()) is removed. Also partially reverts f92f4e5c849c028db73fbe06912685a77b978ee4 which added "LoadType" in createMediaPlayer() to implement the fallback logic for MSE. TBR=dalecurtis@chromium.org,ddorwin@chromium.org,pfeldman@chromium.org,wolenetz@chromium.org BUG=455905,521731 TEST=Encrypted audio/video plays in default Chrome for Android build with and without unified media pipeline. Review URL: https://codereview.chromium.org/1838703002 Cr-Commit-Position: refs/heads/master@{#383450}
Diffstat (limited to 'third_party/WebKit')
-rw-r--r--third_party/WebKit/Source/core/html/HTMLMediaElement.cpp2
-rw-r--r--third_party/WebKit/Source/core/html/HTMLVideoElementTest.cpp2
-rw-r--r--third_party/WebKit/Source/core/loader/EmptyClients.cpp3
-rw-r--r--third_party/WebKit/Source/core/loader/EmptyClients.h3
-rw-r--r--third_party/WebKit/Source/core/loader/FrameLoaderClient.h4
-rw-r--r--third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp5
-rw-r--r--third_party/WebKit/Source/web/FrameLoaderClientImpl.h2
-rw-r--r--third_party/WebKit/public/web/WebFrameClient.h4
8 files changed, 11 insertions, 14 deletions
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
index 4d4e353..6dcd96d 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -1057,7 +1057,7 @@ void HTMLMediaElement::startPlayerLoad()
}
KURL kurl(ParsedURLString, requestURL);
- m_webMediaPlayer = frame->loader().client()->createWebMediaPlayer(*this, loadType(), kurl, this);
+ m_webMediaPlayer = frame->loader().client()->createWebMediaPlayer(*this, kurl, this);
if (!m_webMediaPlayer) {
mediaLoadingFailed(WebMediaPlayer::NetworkStateFormatError);
return;
diff --git a/third_party/WebKit/Source/core/html/HTMLVideoElementTest.cpp b/third_party/WebKit/Source/core/html/HTMLVideoElementTest.cpp
index 4a605ce..70a4498 100644
--- a/third_party/WebKit/Source/core/html/HTMLVideoElementTest.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLVideoElementTest.cpp
@@ -63,7 +63,7 @@ public:
return adoptPtrWillBeNoop(new StubFrameLoaderClient);
}
- PassOwnPtr<WebMediaPlayer> createWebMediaPlayer(HTMLMediaElement&, WebMediaPlayer::LoadType, const WebURL&, WebMediaPlayerClient*) override
+ PassOwnPtr<WebMediaPlayer> createWebMediaPlayer(HTMLMediaElement&, const WebURL&, WebMediaPlayerClient*) override
{
return adoptPtr(new MockWebMediaPlayer);
}
diff --git a/third_party/WebKit/Source/core/loader/EmptyClients.cpp b/third_party/WebKit/Source/core/loader/EmptyClients.cpp
index 592a5c7..9b44813 100644
--- a/third_party/WebKit/Source/core/loader/EmptyClients.cpp
+++ b/third_party/WebKit/Source/core/loader/EmptyClients.cpp
@@ -36,6 +36,7 @@
#include "platform/Widget.h"
#include "public/platform/Platform.h"
#include "public/platform/WebApplicationCacheHost.h"
+#include "public/platform/WebMediaPlayer.h"
#include "public/platform/modules/mediasession/WebMediaSession.h"
#include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h"
#include "public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h"
@@ -152,7 +153,7 @@ PassRefPtrWillBeRawPtr<Widget> EmptyFrameLoaderClient::createPlugin(HTMLPlugInEl
return nullptr;
}
-PassOwnPtr<WebMediaPlayer> EmptyFrameLoaderClient::createWebMediaPlayer(HTMLMediaElement&, WebMediaPlayer::LoadType, const WebURL&, WebMediaPlayerClient*)
+PassOwnPtr<WebMediaPlayer> EmptyFrameLoaderClient::createWebMediaPlayer(HTMLMediaElement&, const WebURL&, WebMediaPlayerClient*)
{
return nullptr;
}
diff --git a/third_party/WebKit/Source/core/loader/EmptyClients.h b/third_party/WebKit/Source/core/loader/EmptyClients.h
index 911a8c5..da0e924 100644
--- a/third_party/WebKit/Source/core/loader/EmptyClients.h
+++ b/third_party/WebKit/Source/core/loader/EmptyClients.h
@@ -47,7 +47,6 @@
#include "platform/text/TextCheckerClient.h"
#include "public/platform/WebFocusType.h"
#include "public/platform/WebFrameScheduler.h"
-#include "public/platform/WebMediaPlayer.h"
#include "public/platform/WebScreenInfo.h"
#include "wtf/Forward.h"
#include <v8.h>
@@ -247,7 +246,7 @@ public:
PassRefPtrWillBeRawPtr<LocalFrame> createFrame(const FrameLoadRequest&, const AtomicString&, HTMLFrameOwnerElement*) override;
PassRefPtrWillBeRawPtr<Widget> createPlugin(HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool, DetachedPluginPolicy) override;
bool canCreatePluginWithoutRenderer(const String& mimeType) const override { return false; }
- PassOwnPtr<WebMediaPlayer> createWebMediaPlayer(HTMLMediaElement&, WebMediaPlayer::LoadType, const WebURL&, WebMediaPlayerClient*) override;
+ PassOwnPtr<WebMediaPlayer> createWebMediaPlayer(HTMLMediaElement&, const WebURL&, WebMediaPlayerClient*) override;
PassOwnPtr<WebMediaSession> createWebMediaSession() override;
ObjectContentType getObjectContentType(const KURL&, const String&, bool) override { return ObjectContentType(); }
diff --git a/third_party/WebKit/Source/core/loader/FrameLoaderClient.h b/third_party/WebKit/Source/core/loader/FrameLoaderClient.h
index 4e0afca..fb99716 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoaderClient.h
+++ b/third_party/WebKit/Source/core/loader/FrameLoaderClient.h
@@ -41,7 +41,6 @@
#include "platform/heap/Handle.h"
#include "platform/network/ResourceLoadPriority.h"
#include "platform/weborigin/Referrer.h"
-#include "public/platform/WebMediaPlayer.h"
#include "wtf/Forward.h"
#include "wtf/Vector.h"
#include <v8.h>
@@ -68,6 +67,7 @@ class SubstituteData;
class WebApplicationCacheHost;
class WebApplicationCacheHostClient;
class WebCookieJar;
+class WebMediaPlayer;
class WebMediaPlayerClient;
class WebMediaSession;
class WebRTCPeerConnectionHandler;
@@ -161,7 +161,7 @@ public:
virtual bool canCreatePluginWithoutRenderer(const String& mimeType) const = 0;
virtual PassRefPtrWillBeRawPtr<Widget> createPlugin(HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually, DetachedPluginPolicy) = 0;
- virtual PassOwnPtr<WebMediaPlayer> createWebMediaPlayer(HTMLMediaElement&, WebMediaPlayer::LoadType, const WebURL&, WebMediaPlayerClient*) = 0;
+ virtual PassOwnPtr<WebMediaPlayer> createWebMediaPlayer(HTMLMediaElement&, const WebURL&, WebMediaPlayerClient*) = 0;
virtual PassOwnPtr<WebMediaSession> createWebMediaSession() = 0;
diff --git a/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp b/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
index a89a59d..06eb954 100644
--- a/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
+++ b/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
@@ -75,7 +75,6 @@
#include "platform/plugins/PluginData.h"
#include "public/platform/Platform.h"
#include "public/platform/WebApplicationCacheHost.h"
-#include "public/platform/WebMediaPlayer.h"
#include "public/platform/WebMimeRegistry.h"
#include "public/platform/WebRTCPeerConnectionHandler.h"
#include "public/platform/WebSecurityOrigin.h"
@@ -821,7 +820,6 @@ PassRefPtrWillBeRawPtr<Widget> FrameLoaderClientImpl::createPlugin(
PassOwnPtr<WebMediaPlayer> FrameLoaderClientImpl::createWebMediaPlayer(
HTMLMediaElement& htmlMediaElement,
- WebMediaPlayer::LoadType loadType,
const WebURL& url,
WebMediaPlayerClient* client)
{
@@ -837,8 +835,7 @@ PassOwnPtr<WebMediaPlayer> FrameLoaderClientImpl::createWebMediaPlayer(
HTMLMediaElementEncryptedMedia& encryptedMedia = HTMLMediaElementEncryptedMedia::from(htmlMediaElement);
WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement));
- return adoptPtr(webFrame->client()->createMediaPlayer(loadType, url,
- client, &encryptedMedia,
+ return adoptPtr(webFrame->client()->createMediaPlayer(url, client, &encryptedMedia,
encryptedMedia.contentDecryptionModule(), sinkId, webMediaSession));
}
diff --git a/third_party/WebKit/Source/web/FrameLoaderClientImpl.h b/third_party/WebKit/Source/web/FrameLoaderClientImpl.h
index ee342a9..9ff9d19 100644
--- a/third_party/WebKit/Source/web/FrameLoaderClientImpl.h
+++ b/third_party/WebKit/Source/web/FrameLoaderClientImpl.h
@@ -129,7 +129,7 @@ public:
HTMLPlugInElement*, const KURL&,
const Vector<WTF::String>&, const Vector<WTF::String>&,
const WTF::String&, bool loadManually, DetachedPluginPolicy) override;
- PassOwnPtr<WebMediaPlayer> createWebMediaPlayer(HTMLMediaElement&, WebMediaPlayer::LoadType, const WebURL&, WebMediaPlayerClient*) override;
+ PassOwnPtr<WebMediaPlayer> createWebMediaPlayer(HTMLMediaElement&, const WebURL&, WebMediaPlayerClient*) override;
PassOwnPtr<WebMediaSession> createWebMediaSession() override;
ObjectContentType getObjectContentType(
const KURL&, const WTF::String& mimeType, bool shouldPreferPlugInsForImages) override;
diff --git a/third_party/WebKit/public/web/WebFrameClient.h b/third_party/WebKit/public/web/WebFrameClient.h
index b136f79..8ac6ce0f 100644
--- a/third_party/WebKit/public/web/WebFrameClient.h
+++ b/third_party/WebKit/public/web/WebFrameClient.h
@@ -48,7 +48,6 @@
#include "public/platform/WebCommon.h"
#include "public/platform/WebFileSystem.h"
#include "public/platform/WebFileSystemType.h"
-#include "public/platform/WebMediaPlayer.h"
#include "public/platform/WebSecurityOrigin.h"
#include "public/platform/WebSetSinkIdCallbacks.h"
#include "public/platform/WebStorageQuotaCallbacks.h"
@@ -76,6 +75,7 @@ class WebExternalPopupMenuClient;
class WebFormElement;
class WebGeolocationClient;
class WebInstalledAppClient;
+class WebMediaPlayer;
class WebMediaPlayerClient;
class WebMediaPlayerEncryptedMediaClient;
class WebMediaSession;
@@ -114,7 +114,7 @@ public:
// May return null.
// WebContentDecryptionModule* may be null if one has not yet been set.
- virtual WebMediaPlayer* createMediaPlayer(WebMediaPlayer::LoadType, const WebURL&, WebMediaPlayerClient*, WebMediaPlayerEncryptedMediaClient*, WebContentDecryptionModule*, const WebString& sinkId, WebMediaSession*) { return 0; }
+ virtual WebMediaPlayer* createMediaPlayer(const WebURL&, WebMediaPlayerClient*, WebMediaPlayerEncryptedMediaClient*, WebContentDecryptionModule*, const WebString& sinkId, WebMediaSession*) { return 0; }
// May return null.
virtual WebMediaSession* createMediaSession() { return 0; }