Diff
Modified: trunk/Source/WebKit/ChangeLog (253865 => 253866)
--- trunk/Source/WebKit/ChangeLog 2019-12-22 00:43:04 UTC (rev 253865)
+++ trunk/Source/WebKit/ChangeLog 2019-12-22 03:09:18 UTC (rev 253866)
@@ -1,3 +1,35 @@
+2019-12-21 Eric Carlson <[email protected]>
+
+ [Media in GPU process] Add remote media player configuration
+ https://bugs.webkit.org/show_bug.cgi?id=205541
+ <rdar://problem/58137418>
+
+ Reviewed by Simon Fraser.
+
+ * GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp:
+ (WebKit::RemoteMediaPlayerManagerProxy::createMediaPlayer):
+ * GPUProcess/media/RemoteMediaPlayerManagerProxy.h:
+ * GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in:
+ * GPUProcess/media/RemoteMediaPlayerProxy.cpp:
+ (WebKit::RemoteMediaPlayerProxy::RemoteMediaPlayerProxy):
+ (WebKit::RemoteMediaPlayerProxy::mediaPlayerMediaKeysStorageDirectory const):
+ (WebKit::RemoteMediaPlayerProxy::mediaPlayerReferrer const):
+ (WebKit::RemoteMediaPlayerProxy::mediaPlayerUserAgent const):
+ (WebKit::RemoteMediaPlayerProxy::mediaPlayerSourceApplicationIdentifier const):
+ (WebKit::RemoteMediaPlayerProxy::mediaPlayerNetworkInterfaceName const):
+ (WebKit::RemoteMediaPlayerProxy::mediaPlayerMediaCacheDirectory const):
+ (WebKit::RemoteMediaPlayerProxy::mediaContentTypesRequiringHardwareSupport const):
+ (WebKit::RemoteMediaPlayerProxy::mediaPlayerPreferredAudioCharacteristics const):
+ (WebKit::RemoteMediaPlayerProxy::mediaPlayerShouldUsePersistentCache const):
+ (WebKit::RemoteMediaPlayerProxy::mediaPlayerIsVideo const):
+ (WebKit::RemoteMediaPlayerProxy::mediaPlayerKeyNeeded):
+ (WebKit::RemoteMediaPlayerProxy::mediaPlayerGetRawCookies const):
+ * GPUProcess/media/RemoteMediaPlayerProxy.h:
+ (WebKit::RemoteMediaPlayerProxy::mediaPlayerLogIdentifier):
+ * WebKit.xcodeproj/project.pbxproj:
+ * WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:
+ (WebKit::RemoteMediaPlayerManager::createRemoteMediaPlayer):
+
2019-12-21 Kate Cheney <[email protected]>
Add timeStamp to ITP database
Modified: trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp (253865 => 253866)
--- trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp 2019-12-22 00:43:04 UTC (rev 253865)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp 2019-12-22 03:09:18 UTC (rev 253866)
@@ -62,12 +62,12 @@
{
}
-void RemoteMediaPlayerManagerProxy::createMediaPlayer(MediaPlayerPrivateRemoteIdentifier id, MediaPlayerEnums::MediaEngineIdentifier engineIdentifier, CompletionHandler<void(bool succeeded)>&& completionHandler)
+void RemoteMediaPlayerManagerProxy::createMediaPlayer(MediaPlayerPrivateRemoteIdentifier id, MediaPlayerEnums::MediaEngineIdentifier engineIdentifier, RemoteMediaPlayerProxyConfiguration&& configuration, CompletionHandler<void(bool succeeded)>&& completionHandler)
{
MESSAGE_CHECK_CONTEXTID(id);
ASSERT(!m_proxies.contains(id));
- m_proxies.add(id, makeUnique<RemoteMediaPlayerProxy>(*this, id, m_gpuConnectionToWebProcess.connection(), engineIdentifier));
+ m_proxies.add(id, makeUnique<RemoteMediaPlayerProxy>(*this, id, m_gpuConnectionToWebProcess.connection(), engineIdentifier, WTFMove(configuration)));
completionHandler(true);
}
Modified: trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.h (253865 => 253866)
--- trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.h 2019-12-22 00:43:04 UTC (rev 253865)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.h 2019-12-22 03:09:18 UTC (rev 253866)
@@ -30,6 +30,7 @@
#include "Connection.h"
#include "MediaPlayerPrivateRemoteIdentifier.h"
#include "MessageReceiver.h"
+#include "RemoteMediaPlayerProxyConfiguration.h"
#include <WebCore/MediaPlayer.h>
#include <wtf/LoggerHelper.h>
@@ -67,7 +68,7 @@
void didReceiveMessage(IPC::Connection&, IPC::Decoder&) final;
void didReceiveSyncMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&) final;
- void createMediaPlayer(MediaPlayerPrivateRemoteIdentifier, WebCore::MediaPlayerEnums::MediaEngineIdentifier, CompletionHandler<void(bool)>&&);
+ void createMediaPlayer(MediaPlayerPrivateRemoteIdentifier, WebCore::MediaPlayerEnums::MediaEngineIdentifier, RemoteMediaPlayerProxyConfiguration&&, CompletionHandler<void(bool)>&&);
void deleteMediaPlayer(MediaPlayerPrivateRemoteIdentifier);
// Media player factory
Modified: trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in (253865 => 253866)
--- trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in 2019-12-22 00:43:04 UTC (rev 253865)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in 2019-12-22 03:09:18 UTC (rev 253866)
@@ -24,7 +24,7 @@
#if ENABLE(VIDEO)
messages -> RemoteMediaPlayerManagerProxy NotRefCounted {
- CreateMediaPlayer(WebKit::MediaPlayerPrivateRemoteIdentifier id, enum:uint8_t WebCore::MediaPlayerEnums::MediaEngineIdentifier remoteEngineIdentifier) -> (bool success) Synchronous
+ CreateMediaPlayer(WebKit::MediaPlayerPrivateRemoteIdentifier id, enum:uint8_t WebCore::MediaPlayerEnums::MediaEngineIdentifier remoteEngineIdentifier, struct WebKit::RemoteMediaPlayerProxyConfiguration configuration) -> (bool success) Synchronous
DeleteMediaPlayer(WebKit::MediaPlayerPrivateRemoteIdentifier id)
GetSupportedTypes(enum:uint8_t WebCore::MediaPlayerEnums::MediaEngineIdentifier remoteEngineIdentifier) -> (Vector<String> types) Synchronous
Modified: trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp (253865 => 253866)
--- trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp 2019-12-22 00:43:04 UTC (rev 253865)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp 2019-12-22 03:09:18 UTC (rev 253866)
@@ -38,16 +38,18 @@
using namespace WebCore;
-RemoteMediaPlayerProxy::RemoteMediaPlayerProxy(RemoteMediaPlayerManagerProxy& manager, MediaPlayerPrivateRemoteIdentifier id, Ref<IPC::Connection>&& connection, MediaPlayerEnums::MediaEngineIdentifier engineIdentifier)
+RemoteMediaPlayerProxy::RemoteMediaPlayerProxy(RemoteMediaPlayerManagerProxy& manager, MediaPlayerPrivateRemoteIdentifier id, Ref<IPC::Connection>&& connection, MediaPlayerEnums::MediaEngineIdentifier engineIdentifier, RemoteMediaPlayerProxyConfiguration&& configuration)
: m_id(id)
, m_webProcessConnection(WTFMove(connection))
, m_manager(manager)
, m_engineIdentifier(engineIdentifier)
, m_updateCachedStateMessageTimer(RunLoop::main(), this, &RemoteMediaPlayerProxy::timerFired)
+ , m_configuration(configuration)
#if !RELEASE_LOG_DISABLED
, m_logger(m_manager.logger())
#endif
{
+ m_typesRequiringHardwareSupport = m_configuration.mediaContentTypesRequiringHardwareSupport;
m_player = MediaPlayer::create(*this, m_engineIdentifier);
}
@@ -177,6 +179,61 @@
m_webProcessConnection->send(Messages::RemoteMediaPlayerManager::EngineFailedToLoad(m_id, m_player->platformErrorCode()), 0);
}
+#if ENABLE(LEGACY_ENCRYPTED_MEDIA)
+String RemoteMediaPlayerProxy::mediaPlayerMediaKeysStorageDirectory() const
+{
+ return m_configuration.mediaKeysStorageDirectory;
+}
+#endif
+
+String RemoteMediaPlayerProxy::mediaPlayerReferrer() const
+{
+ return m_configuration.referrer;
+}
+
+String RemoteMediaPlayerProxy::mediaPlayerUserAgent() const
+{
+ return m_configuration.userAgent;
+}
+
+String RemoteMediaPlayerProxy::mediaPlayerSourceApplicationIdentifier() const
+{
+ return m_configuration.sourceApplicationIdentifier;
+}
+
+#if PLATFORM(IOS_FAMILY)
+String RemoteMediaPlayerProxy::mediaPlayerNetworkInterfaceName() const
+{
+ return m_configuration.networkInterfaceName;
+}
+#endif
+
+const String& RemoteMediaPlayerProxy::mediaPlayerMediaCacheDirectory() const
+{
+ return m_configuration.mediaCacheDirectory;
+}
+
+const Vector<WebCore::ContentType>& RemoteMediaPlayerProxy::mediaContentTypesRequiringHardwareSupport() const
+{
+ return m_typesRequiringHardwareSupport;
+}
+
+Vector<String> RemoteMediaPlayerProxy::mediaPlayerPreferredAudioCharacteristics() const
+{
+ return m_configuration.preferredAudioCharacteristics;
+}
+
+bool RemoteMediaPlayerProxy::mediaPlayerShouldUsePersistentCache() const
+{
+ return m_configuration.shouldUsePersistentCache;
+}
+
+bool RemoteMediaPlayerProxy::mediaPlayerIsVideo() const
+{
+ return m_configuration.isVideo;
+}
+
+// FIXME: Unimplemented
void RemoteMediaPlayerProxy::mediaPlayerPlaybackStateChanged()
{
m_webProcessConnection->send(Messages::RemoteMediaPlayerManager::PlaybackStateChanged(m_id, m_player->paused()), 0);
@@ -246,13 +303,6 @@
notImplemented();
return false;
}
-
-String RemoteMediaPlayerProxy::mediaPlayerMediaKeysStorageDirectory() const
-{
- notImplemented();
- return emptyString();
-}
-
#endif
#if ENABLE(ENCRYPTED_MEDIA)
@@ -271,18 +321,6 @@
void RemoteMediaPlayerProxy::mediaPlayerCurrentPlaybackTargetIsWirelessChanged() { };
#endif
-String RemoteMediaPlayerProxy::mediaPlayerReferrer() const
-{
- notImplemented();
- return String();
-}
-
-String RemoteMediaPlayerProxy::mediaPlayerUserAgent() const
-{
- notImplemented();
- return String();
-}
-
void RemoteMediaPlayerProxy::mediaPlayerEnterFullscreen()
{
notImplemented();
@@ -304,12 +342,6 @@
return false;
}
-bool RemoteMediaPlayerProxy::mediaPlayerIsVideo() const
-{
- notImplemented();
- return false;
-}
-
LayoutRect RemoteMediaPlayerProxy::mediaPlayerContentBoxRect() const
{
notImplemented();
@@ -356,18 +388,6 @@
return false;
}
-bool RemoteMediaPlayerProxy::mediaPlayerShouldUsePersistentCache() const
-{
- notImplemented();
- return true;
-}
-
-const String& RemoteMediaPlayerProxy::mediaPlayerMediaCacheDirectory() const
-{
- notImplemented();
- return emptyString();
-}
-
#if ENABLE(VIDEO_TRACK)
void RemoteMediaPlayerProxy::mediaPlayerDidAddAudioTrack(AudioTrackPrivate&)
{
@@ -416,26 +436,13 @@
#endif
#if PLATFORM(IOS_FAMILY)
-String RemoteMediaPlayerProxy::mediaPlayerNetworkInterfaceName() const
-{
- notImplemented();
- return String();
-}
-
bool RemoteMediaPlayerProxy::mediaPlayerGetRawCookies(const URL&, Vector<Cookie>&) const
{
notImplemented();
return false;
}
-
#endif
-String RemoteMediaPlayerProxy::mediaPlayerSourceApplicationIdentifier() const
-{
- notImplemented();
- return emptyString();
-}
-
double RemoteMediaPlayerProxy::mediaPlayerRequestedPlaybackRate() const
{
notImplemented();
@@ -454,12 +461,6 @@
return false;
}
-Vector<String> RemoteMediaPlayerProxy::mediaPlayerPreferredAudioCharacteristics() const
-{
- notImplemented();
- return Vector<String>();
-}
-
bool RemoteMediaPlayerProxy::mediaPlayerShouldDisableSleep() const
{
notImplemented();
@@ -466,12 +467,6 @@
return false;
}
-const Vector<WebCore::ContentType>& RemoteMediaPlayerProxy::mediaContentTypesRequiringHardwareSupport() const
-{
- notImplemented();
- return m_typesRequiringHardwareSupport;
-}
-
bool RemoteMediaPlayerProxy::mediaPlayerShouldCheckHardwareSupport() const
{
notImplemented();
Modified: trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h (253865 => 253866)
--- trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h 2019-12-22 00:43:04 UTC (rev 253865)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h 2019-12-22 03:09:18 UTC (rev 253866)
@@ -28,6 +28,7 @@
#if ENABLE(GPU_PROCESS)
#include "MediaPlayerPrivateRemoteIdentifier.h"
+#include "RemoteMediaPlayerProxyConfiguration.h"
#include "RemoteMediaPlayerState.h"
#include <wtf/LoggerHelper.h>
#include <wtf/RefPtr.h>
@@ -50,7 +51,7 @@
: public MediaPlayerClient {
WTF_MAKE_FAST_ALLOCATED;
public:
- RemoteMediaPlayerProxy(RemoteMediaPlayerManagerProxy&, MediaPlayerPrivateRemoteIdentifier, Ref<IPC::Connection>&&, MediaPlayerEnums::MediaEngineIdentifier);
+ RemoteMediaPlayerProxy(RemoteMediaPlayerManagerProxy&, MediaPlayerPrivateRemoteIdentifier, Ref<IPC::Connection>&&, MediaPlayerEnums::MediaEngineIdentifier, RemoteMediaPlayerProxyConfiguration&&);
virtual ~RemoteMediaPlayerProxy()
{
}
@@ -168,6 +169,7 @@
#if !RELEASE_LOG_DISABLED
const Logger& mediaPlayerLogger() final { return m_logger; }
+ const void* mediaPlayerLogIdentifier() { return reinterpret_cast<const void*>(m_configuration.logIdentifier); }
#endif
MediaPlayerPrivateRemoteIdentifier m_id;
@@ -178,7 +180,7 @@
Vector<WebCore::ContentType> m_typesRequiringHardwareSupport;
RunLoop::Timer<RemoteMediaPlayerProxy> m_updateCachedStateMessageTimer;
RemoteMediaPlayerState m_cachedState;
-
+ RemoteMediaPlayerProxyConfiguration m_configuration;
bool m_seekableChanged { true };
bool m_bufferedChanged { true };
Added: trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxyConfiguration.h (0 => 253866)
--- trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxyConfiguration.h (rev 0)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxyConfiguration.h 2019-12-22 03:09:18 UTC (rev 253866)
@@ -0,0 +1,140 @@
+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(GPU_PROCESS)
+
+#include <WebCore/ContentType.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebKit {
+
+struct RemoteMediaPlayerProxyConfiguration {
+ String mediaKeysStorageDirectory;
+ String referrer;
+ String userAgent;
+ String sourceApplicationIdentifier;
+ String networkInterfaceName;
+ String mediaCacheDirectory;
+ Vector<WebCore::ContentType> mediaContentTypesRequiringHardwareSupport;
+ Vector<String> preferredAudioCharacteristics;
+ uint64_t logIdentifier { 0 };
+ bool shouldUsePersistentCache { false };
+ bool isVideo { 0 };
+
+ template<class Encoder>
+ void encode(Encoder& encoder) const
+ {
+ encoder << mediaKeysStorageDirectory;
+ encoder << referrer;
+ encoder << userAgent;
+ encoder << sourceApplicationIdentifier;
+ encoder << networkInterfaceName;
+ encoder << mediaCacheDirectory;
+ encoder << mediaContentTypesRequiringHardwareSupport;
+ encoder << preferredAudioCharacteristics;
+ encoder << logIdentifier;
+ encoder << shouldUsePersistentCache;
+ encoder << isVideo;
+ }
+
+ template <class Decoder>
+ static Optional<RemoteMediaPlayerProxyConfiguration> decode(Decoder& decoder)
+ {
+ Optional<String> mediaKeysStorageDirectory;
+ decoder >> mediaKeysStorageDirectory;
+ if (!mediaKeysStorageDirectory)
+ return WTF::nullopt;
+
+ Optional<String> referrer;
+ decoder >> referrer;
+ if (!referrer)
+ return WTF::nullopt;
+
+ Optional<String> userAgent;
+ decoder >> userAgent;
+ if (!userAgent)
+ return WTF::nullopt;
+
+ Optional<String> sourceApplicationIdentifier;
+ decoder >> sourceApplicationIdentifier;
+ if (!sourceApplicationIdentifier)
+ return WTF::nullopt;
+
+ Optional<String> networkInterfaceName;
+ decoder >> networkInterfaceName;
+ if (!networkInterfaceName)
+ return WTF::nullopt;
+
+ Optional<String> mediaCacheDirectory;
+ decoder >> mediaCacheDirectory;
+ if (!mediaCacheDirectory)
+ return WTF::nullopt;
+
+ Optional<Vector<WebCore::ContentType>> mediaContentTypesRequiringHardwareSupport;
+ decoder >> mediaContentTypesRequiringHardwareSupport;
+ if (!mediaContentTypesRequiringHardwareSupport)
+ return WTF::nullopt;
+
+ Optional<Vector<String>> preferredAudioCharacteristics;
+ decoder >> preferredAudioCharacteristics;
+ if (!preferredAudioCharacteristics)
+ return WTF::nullopt;
+
+ Optional<uint64_t> logIdentifier;
+ decoder >> logIdentifier;
+ if (!logIdentifier)
+ return WTF::nullopt;
+
+ Optional<bool> shouldUsePersistentCache;
+ decoder >> shouldUsePersistentCache;
+ if (!shouldUsePersistentCache)
+ return WTF::nullopt;
+
+ Optional<bool> isVideo;
+ decoder >> isVideo;
+ if (!isVideo)
+ return WTF::nullopt;
+
+ return {{
+ WTFMove(*mediaKeysStorageDirectory),
+ WTFMove(*referrer),
+ WTFMove(*userAgent),
+ WTFMove(*sourceApplicationIdentifier),
+ WTFMove(*networkInterfaceName),
+ WTFMove(*mediaCacheDirectory),
+ WTFMove(*mediaContentTypesRequiringHardwareSupport),
+ WTFMove(*preferredAudioCharacteristics),
+ WTFMove(*logIdentifier),
+ WTFMove(*shouldUsePersistentCache),
+ WTFMove(*isVideo),
+ }};
+ }
+};
+
+}
+
+#endif
Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (253865 => 253866)
--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2019-12-22 00:43:04 UTC (rev 253865)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2019-12-22 03:09:18 UTC (rev 253866)
@@ -2066,6 +2066,7 @@
07A5EBB91C7BA43E00B9CA69 /* WKFrameHandleRef.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKFrameHandleRef.cpp; sourceTree = "<group>"; };
07A5EBBA1C7BA43E00B9CA69 /* WKFrameHandleRef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKFrameHandleRef.h; sourceTree = "<group>"; };
07B3B46F23AB2CB300BA5B12 /* RemoteMediaPlayerState.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteMediaPlayerState.h; sourceTree = "<group>"; };
+ 07B3B47523AD890400BA5B12 /* RemoteMediaPlayerProxyConfiguration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteMediaPlayerProxyConfiguration.h; sourceTree = "<group>"; };
07BAF35623A2CC170044257E /* RemoteMediaPlayerProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteMediaPlayerProxy.h; sourceTree = "<group>"; };
07BAF35723A2CC190044257E /* RemoteMediaPlayerProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteMediaPlayerProxy.cpp; sourceTree = "<group>"; };
0867D6A5FE840307C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
@@ -5111,6 +5112,7 @@
0725EFAB239AE38400A538A9 /* RemoteMediaPlayerManagerProxy.messages.in */,
07BAF35723A2CC190044257E /* RemoteMediaPlayerProxy.cpp */,
07BAF35623A2CC170044257E /* RemoteMediaPlayerProxy.h */,
+ 07B3B47523AD890400BA5B12 /* RemoteMediaPlayerProxyConfiguration.h */,
);
path = media;
sourceTree = "<group>";
Modified: trunk/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp (253865 => 253866)
--- trunk/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp 2019-12-22 00:43:04 UTC (rev 253865)
+++ trunk/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp 2019-12-22 03:09:18 UTC (rev 253866)
@@ -30,6 +30,7 @@
#include "RemoteMediaPlayerManagerMessages.h"
#include "RemoteMediaPlayerManagerProxyMessages.h"
+#include "RemoteMediaPlayerProxyConfiguration.h"
#include "WebCoreArgumentCoders.h"
#include "WebProcess.h"
#include "WebProcessCreationParameters.h"
@@ -115,8 +116,23 @@
{
auto id = MediaPlayerPrivateRemoteIdentifier::generate();
+ RemoteMediaPlayerProxyConfiguration configuration;
+ configuration.mediaKeysStorageDirectory = player->mediaKeysStorageDirectory();
+ configuration.referrer = player->referrer();
+ configuration.userAgent = player->userAgent();
+ configuration.sourceApplicationIdentifier = player->sourceApplicationIdentifier();
+#if PLATFORM(IOS_FAMILY)
+ configuration.networkInterfaceName = player->mediaPlayerNetworkInterfaceName();
+#endif
+ configuration.mediaCacheDirectory = player->mediaCacheDirectory();
+ configuration.mediaContentTypesRequiringHardwareSupport = player->mediaContentTypesRequiringHardwareSupport();
+ configuration.preferredAudioCharacteristics = player->preferredAudioCharacteristics();
+ configuration.logIdentifier = reinterpret_cast<uint64_t>(player->mediaPlayerLogIdentifier());
+ configuration.shouldUsePersistentCache = player->shouldUsePersistentCache();
+ configuration.isVideo = player->isVideoPlayer();
+
bool haveRemoteProxy;
- bool sendSucceeded = gpuProcessConnection().sendSync(Messages::RemoteMediaPlayerManagerProxy::CreateMediaPlayer(id, remoteEngineIdentifier), Messages::RemoteMediaPlayerManagerProxy::CreateMediaPlayer::Reply(haveRemoteProxy), 0);
+ bool sendSucceeded = gpuProcessConnection().sendSync(Messages::RemoteMediaPlayerManagerProxy::CreateMediaPlayer(id, remoteEngineIdentifier, configuration), Messages::RemoteMediaPlayerManagerProxy::CreateMediaPlayer::Reply(haveRemoteProxy), 0);
if (!haveRemoteProxy || !sendSucceeded) {
WTFLogAlways("Failed to create remote media player.");
return nullptr;