Diff
Modified: trunk/LayoutTests/ChangeLog (254453 => 254454)
--- trunk/LayoutTests/ChangeLog 2020-01-13 22:26:39 UTC (rev 254453)
+++ trunk/LayoutTests/ChangeLog 2020-01-13 22:27:39 UTC (rev 254454)
@@ -1,3 +1,13 @@
+2020-01-13 Eric Carlson <[email protected]>
+
+ Expose audio tracks for media files in the GPUProcess
+ https://bugs.webkit.org/show_bug.cgi?id=206152
+ <rdar://problem/58513227>
+
+ Reviewed by youenn fablet.
+
+ * gpu-process/TestExpectations:
+
2020-01-13 Zalan Bujtas <[email protected]>
Add a simple trailing letter-spacing test case
Modified: trunk/LayoutTests/gpu-process/TestExpectations (254453 => 254454)
--- trunk/LayoutTests/gpu-process/TestExpectations 2020-01-13 22:26:39 UTC (rev 254453)
+++ trunk/LayoutTests/gpu-process/TestExpectations 2020-01-13 22:27:39 UTC (rev 254454)
@@ -218,6 +218,8 @@
media/restricted-audio-playback-with-multiple-settimeouts.html [ Pass ]
media/video-controls-visible-audio-only.html [ Pass ]
media/video-play-audio-require-user-gesture.html [ Pass ]
+media/track/audio-track.html [ Pass ]
+media/audio-track-add-remove.html [ Pass ]
accessibility/media-element.html [ Skip ]
fast/block/float/list-marker-is-float-crash.html [ Skip ]
Modified: trunk/Source/WebCore/ChangeLog (254453 => 254454)
--- trunk/Source/WebCore/ChangeLog 2020-01-13 22:26:39 UTC (rev 254453)
+++ trunk/Source/WebCore/ChangeLog 2020-01-13 22:27:39 UTC (rev 254454)
@@ -1,3 +1,16 @@
+2020-01-13 Eric Carlson <[email protected]>
+
+ Expose audio tracks for media files in the GPUProcess
+ https://bugs.webkit.org/show_bug.cgi?id=206152
+ <rdar://problem/58513227>
+
+ Reviewed by youenn fablet.
+
+ No new tests, un-skipped existing tests that pass because of this change.
+
+ * platform/graphics/AudioTrackPrivate.h:
+ * platform/graphics/TrackPrivateBase.h:
+
2020-01-13 youenn fablet <[email protected]>
Split AudioTrackPrivateMediaStreamCocoa to implement remote audio rendering
Modified: trunk/Source/WebCore/platform/graphics/AudioTrackPrivate.h (254453 => 254454)
--- trunk/Source/WebCore/platform/graphics/AudioTrackPrivate.h 2020-01-13 22:26:39 UTC (rev 254453)
+++ trunk/Source/WebCore/platform/graphics/AudioTrackPrivate.h 2020-01-13 22:27:39 UTC (rev 254454)
@@ -76,4 +76,21 @@
} // namespace WebCore
+namespace WTF {
+
+template<> struct EnumTraits<WebCore::AudioTrackPrivate::Kind> {
+ using values = EnumValues<
+ WebCore::AudioTrackPrivate::Kind,
+ WebCore::AudioTrackPrivate::Kind::Alternative,
+ WebCore::AudioTrackPrivate::Kind::Description,
+ WebCore::AudioTrackPrivate::Kind::Main,
+ WebCore::AudioTrackPrivate::Kind::MainDesc,
+ WebCore::AudioTrackPrivate::Kind::Translation,
+ WebCore::AudioTrackPrivate::Kind::Commentary,
+ WebCore::AudioTrackPrivate::Kind::None
+ >;
+};
+
+} // namespace WTF
+
#endif
Modified: trunk/Source/WebCore/platform/graphics/TrackPrivateBase.h (254453 => 254454)
--- trunk/Source/WebCore/platform/graphics/TrackPrivateBase.h 2020-01-13 22:26:39 UTC (rev 254453)
+++ trunk/Source/WebCore/platform/graphics/TrackPrivateBase.h 2020-01-13 22:27:39 UTC (rev 254454)
@@ -45,7 +45,7 @@
virtual void willRemove() = 0;
};
-class TrackPrivateBase
+class WEBCORE_EXPORT TrackPrivateBase
: public ThreadSafeRefCounted<TrackPrivateBase, WTF::DestructionThread::Main>
#if !RELEASE_LOG_DISABLED
, public LoggerHelper
Modified: trunk/Source/WebKit/ChangeLog (254453 => 254454)
--- trunk/Source/WebKit/ChangeLog 2020-01-13 22:26:39 UTC (rev 254453)
+++ trunk/Source/WebKit/ChangeLog 2020-01-13 22:27:39 UTC (rev 254454)
@@ -1,3 +1,63 @@
+2020-01-13 Eric Carlson <[email protected]>
+
+ Expose audio tracks for media files in the GPUProcess
+ https://bugs.webkit.org/show_bug.cgi?id=206152
+ <rdar://problem/58513227>
+
+ Reviewed by youenn fablet.
+
+ * GPUProcess/media/RemoteAudioTrackProxy.cpp: Added.
+ (WebKit::RemoteAudioTrackProxy::RemoteAudioTrackProxy):
+ (WebKit::RemoteAudioTrackProxy::configuration):
+ (WebKit::RemoteAudioTrackProxy::configurationChanged):
+ (WebKit::RemoteAudioTrackProxy::willRemove):
+ (WebKit::RemoteAudioTrackProxy::enabledChanged):
+ (WebKit::RemoteAudioTrackProxy::idChanged):
+ (WebKit::RemoteAudioTrackProxy::labelChanged):
+ (WebKit::RemoteAudioTrackProxy::languageChanged):
+ * GPUProcess/media/RemoteAudioTrackProxy.h: Added.
+ * GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp:
+ (WebKit::RemoteMediaPlayerManagerProxy::setRate):
+ (WebKit::RemoteMediaPlayerManagerProxy::audioTrackSetEnabled):
+ * GPUProcess/media/RemoteMediaPlayerManagerProxy.h:
+ * GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in:
+ * GPUProcess/media/RemoteMediaPlayerProxy.cpp:
+ (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidAddAudioTrack):
+ (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidRemoveAudioTrack):
+ (WebKit::RemoteMediaPlayerProxy::audioTrackSetEnabled):
+ * GPUProcess/media/RemoteMediaPlayerProxy.h:
+ * GPUProcess/media/TrackPrivateRemoteConfiguration.h: Added.
+ (WebKit::TrackPrivateRemoteConfiguration::encode const):
+ (WebKit::TrackPrivateRemoteConfiguration::decode):
+ * GPUProcess/media/TrackPrivateRemoteIdentifier.h: Added.
+ * Scripts/webkit/messages.py:
+ * Sources.txt:
+ * WebKit.xcodeproj/project.pbxproj:
+ * WebProcess/GPU/media/AudioTrackPrivateRemote.cpp: Added.
+ (WebKit::AudioTrackPrivateRemote::AudioTrackPrivateRemote):
+ (WebKit::AudioTrackPrivateRemote::setEnabled):
+ (WebKit::AudioTrackPrivateRemote::updateConfiguration):
+ * WebProcess/GPU/media/AudioTrackPrivateRemote.h: Added.
+ (WebKit::AudioTrackPrivateRemote::create):
+ * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
+ (WebKit::MediaPlayerPrivateRemote::addRemoteAudioTrack):
+ (WebKit::MediaPlayerPrivateRemote::removeRemoteAudioTrack):
+ (WebKit::MediaPlayerPrivateRemote::remoteAudioTrackConfigurationChanged):
+ * WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
+ * WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:
+ (WebKit::RemoteMediaPlayerManager::timeChanged):
+ (WebKit::RemoteMediaPlayerManager::durationChanged):
+ (WebKit::RemoteMediaPlayerManager::engineFailedToLoad):
+ (WebKit::RemoteMediaPlayerManager::characteristicChanged):
+ (WebKit::RemoteMediaPlayerManager::sizeChanged):
+ (WebKit::RemoteMediaPlayerManager::addRemoteAudioTrack):
+ (WebKit::RemoteMediaPlayerManager::removeRemoteAudioTrack):
+ (WebKit::RemoteMediaPlayerManager::remoteAudioTrackConfigurationChanged):
+ (WebKit::RemoteMediaPlayerManager::updateCachedState):
+ * WebProcess/GPU/media/RemoteMediaPlayerManager.h:
+ * WebProcess/GPU/media/RemoteMediaPlayerManager.messages.in:
+ * WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:
+
2020-01-06 Jiewen Tan <[email protected]>
[WebAuthn] Support CTAP Client Pin
Added: trunk/Source/WebKit/GPUProcess/media/RemoteAudioTrackProxy.cpp (0 => 254454)
--- trunk/Source/WebKit/GPUProcess/media/RemoteAudioTrackProxy.cpp (rev 0)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteAudioTrackProxy.cpp 2020-01-13 22:27:39 UTC (rev 254454)
@@ -0,0 +1,95 @@
+/*
+* Copyright (C) 2020 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. ``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
+* 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.
+*/
+
+#include "config.h"
+#include "RemoteAudioTrackProxy.h"
+
+#if ENABLE(GPU_PROCESS)
+
+#include "RemoteMediaPlayerManagerMessages.h"
+#include "RemoteMediaPlayerProxy.h"
+#include "TrackPrivateRemoteConfiguration.h"
+
+namespace WebKit {
+
+RemoteAudioTrackProxy::RemoteAudioTrackProxy(RemoteMediaPlayerProxy& player, TrackPrivateRemoteIdentifier id, Ref<IPC::Connection>&& connection, AudioTrackPrivate& trackPrivate)
+ : m_player(player)
+ , m_identifier(id)
+ , m_webProcessConnection(WTFMove(connection))
+ , m_trackPrivate(trackPrivate)
+{
+ m_trackPrivate->setClient(this);
+ m_webProcessConnection->send(Messages::RemoteMediaPlayerManager::AddRemoteAudioTrack(m_player.idendifier(), m_identifier, configuration()), 0);
+}
+
+TrackPrivateRemoteConfiguration& RemoteAudioTrackProxy::configuration()
+{
+ static NeverDestroyed<TrackPrivateRemoteConfiguration> configuration;
+
+ configuration->id = m_trackPrivate->id();
+ configuration->label = m_trackPrivate->label();
+ configuration->language = m_trackPrivate->language();
+ configuration->trackIndex = m_trackPrivate->trackIndex();
+ configuration->startTimeVariance = m_trackPrivate->startTimeVariance();
+ configuration->enabled = m_trackPrivate->enabled();
+ configuration->kind = m_trackPrivate->kind();
+
+ return configuration.get();
+}
+
+void RemoteAudioTrackProxy::configurationChanged()
+{
+ m_webProcessConnection->send(Messages::RemoteMediaPlayerManager::RemoteAudioTrackConfigurationChanged(m_player.idendifier(), m_identifier, configuration()), 0);
+}
+
+void RemoteAudioTrackProxy::willRemove()
+{
+ m_webProcessConnection->send(Messages::RemoteMediaPlayerManager::RemoveRemoteAudioTrack(m_player.idendifier(), m_identifier), 0);
+}
+
+void RemoteAudioTrackProxy::enabledChanged(bool)
+{
+ configurationChanged();
+}
+
+void RemoteAudioTrackProxy::idChanged(const AtomString&)
+{
+ configurationChanged();
+}
+
+void RemoteAudioTrackProxy::labelChanged(const AtomString&)
+{
+ configurationChanged();
+}
+
+void RemoteAudioTrackProxy::languageChanged(const AtomString&)
+{
+ configurationChanged();
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(GPU_PROCESS)
Added: trunk/Source/WebKit/GPUProcess/media/RemoteAudioTrackProxy.h (0 => 254454)
--- trunk/Source/WebKit/GPUProcess/media/RemoteAudioTrackProxy.h (rev 0)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteAudioTrackProxy.h 2020-01-13 22:27:39 UTC (rev 254454)
@@ -0,0 +1,76 @@
+/*
+* Copyright (C) 2020 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. ``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
+* 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 "TrackPrivateRemoteIdentifier.h"
+#include <WebCore/AudioTrackPrivate.h>
+#include <WebCore/TrackBase.h>
+
+namespace WebKit {
+
+struct TrackPrivateRemoteConfiguration;
+
+class RemoteAudioTrackProxy final
+ : public ThreadSafeRefCounted<TrackPrivateBase, WTF::DestructionThread::Main>
+ , private WebCore::AudioTrackPrivateClient {
+public:
+ static Ref<RemoteAudioTrackProxy> create(RemoteMediaPlayerProxy& player, TrackPrivateRemoteIdentifier id, Ref<IPC::Connection>&& connection, AudioTrackPrivate& trackPrivate)
+ {
+ return adoptRef(*new RemoteAudioTrackProxy(player, id, WTFMove(connection), trackPrivate));
+ }
+
+ TrackPrivateRemoteIdentifier identifier() const { return m_identifier; };
+
+ void setEnabled(bool enabled) { m_trackPrivate->setEnabled(enabled); }
+
+private:
+ RemoteAudioTrackProxy(RemoteMediaPlayerProxy&, TrackPrivateRemoteIdentifier, Ref<IPC::Connection>&&, AudioTrackPrivate&);
+ ~RemoteAudioTrackProxy() = default;
+
+ // AudioTrackPrivateClient
+ void enabledChanged(bool) final;
+
+ // TrackPrivateBaseClient
+ void idChanged(const AtomString&) final;
+ void labelChanged(const AtomString&) final;
+ void languageChanged(const AtomString&) final;
+ void willRemove() final;
+
+ TrackPrivateRemoteConfiguration& configuration();
+ void configurationChanged();
+
+ RemoteMediaPlayerProxy& m_player;
+ TrackPrivateRemoteIdentifier m_identifier;
+ Ref<IPC::Connection> m_webProcessConnection;
+ Ref<AudioTrackPrivate> m_trackPrivate;
+};
+
+} // namespace WebKit
+
+#endif // ENABLE(GPU_PROCESS)
Modified: trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp (254453 => 254454)
--- trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp 2020-01-13 22:26:39 UTC (rev 254453)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp 2020-01-13 22:27:39 UTC (rev 254454)
@@ -323,12 +323,18 @@
player->setShouldDisableSleep(disable);
}
-void RemoteMediaPlayerManagerProxy::setRate(WebKit::MediaPlayerPrivateRemoteIdentifier id, double rate)
+void RemoteMediaPlayerManagerProxy::setRate(MediaPlayerPrivateRemoteIdentifier id, double rate)
{
if (auto player = m_proxies.get(id))
player->setRate(rate);
}
+void RemoteMediaPlayerManagerProxy::audioTrackSetEnabled(MediaPlayerPrivateRemoteIdentifier playerID, TrackPrivateRemoteIdentifier trackID, bool enabled)
+{
+ if (auto player = m_proxies.get(playerID))
+ player->audioTrackSetEnabled(trackID, enabled);
+}
+
#if !RELEASE_LOG_DISABLED
const Logger& RemoteMediaPlayerManagerProxy::logger() const
{
Modified: trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.h (254453 => 254454)
--- trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.h 2020-01-13 22:26:39 UTC (rev 254453)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.h 2020-01-13 22:27:39 UTC (rev 254454)
@@ -31,6 +31,7 @@
#include "MediaPlayerPrivateRemoteIdentifier.h"
#include "MessageReceiver.h"
#include "SandboxExtension.h"
+#include "TrackPrivateRemoteIdentifier.h"
#include <WebCore/MediaPlayer.h>
#include <wtf/LoggerHelper.h>
@@ -109,8 +110,10 @@
void setVideoFullscreenGravity(MediaPlayerPrivateRemoteIdentifier, WebCore::MediaPlayerEnums::VideoGravity);
void acceleratedRenderingStateChanged(MediaPlayerPrivateRemoteIdentifier, bool);
void setShouldDisableSleep(MediaPlayerPrivateRemoteIdentifier, bool);
- void setRate(WebKit::MediaPlayerPrivateRemoteIdentifier, double);
+ void setRate(MediaPlayerPrivateRemoteIdentifier, double);
+ void audioTrackSetEnabled(MediaPlayerPrivateRemoteIdentifier, TrackPrivateRemoteIdentifier, bool);
+
HashMap<MediaPlayerPrivateRemoteIdentifier, std::unique_ptr<RemoteMediaPlayerProxy>> m_proxies;
GPUConnectionToWebProcess& m_gpuConnectionToWebProcess;
Modified: trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in (254453 => 254454)
--- trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in 2020-01-13 22:26:39 UTC (rev 254453)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in 2020-01-13 22:27:39 UTC (rev 254454)
@@ -64,6 +64,8 @@
AcceleratedRenderingStateChanged(WebKit::MediaPlayerPrivateRemoteIdentifier id, bool canBeAccelerated)
SetShouldDisableSleep(WebKit::MediaPlayerPrivateRemoteIdentifier id, bool disable)
SetRate(WebKit::MediaPlayerPrivateRemoteIdentifier id, double rate)
+
+ AudioTrackSetEnabled(WebKit::MediaPlayerPrivateRemoteIdentifier playerID, WebKit::TrackPrivateRemoteIdentifier trackID, bool enabled)
}
#endif
Modified: trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp (254453 => 254454)
--- trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp 2020-01-13 22:26:39 UTC (rev 254453)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp 2020-01-13 22:27:39 UTC (rev 254454)
@@ -364,6 +364,29 @@
return m_renderingCanBeAccelerated;
}
+void RemoteMediaPlayerProxy::mediaPlayerDidAddAudioTrack(WebCore::AudioTrackPrivate& track)
+{
+ m_audioTracks.set(&track, RemoteAudioTrackProxy::create(*this, TrackPrivateRemoteIdentifier::generate(), m_webProcessConnection.copyRef(), track));
+}
+
+void RemoteMediaPlayerProxy::mediaPlayerDidRemoveAudioTrack(WebCore::AudioTrackPrivate& track)
+{
+ ASSERT(m_audioTracks.contains(&track));
+ m_audioTracks.remove(&track);
+}
+
+void RemoteMediaPlayerProxy::audioTrackSetEnabled(TrackPrivateRemoteIdentifier trackID, bool enabled)
+{
+ for (auto& track : m_audioTracks.values()) {
+ if (track->identifier() == trackID) {
+ track->setEnabled(enabled);
+ return;
+ }
+ }
+
+ ASSERT_NOT_REACHED();
+}
+
// FIXME: Unimplemented
void RemoteMediaPlayerProxy::mediaPlayerResourceNotSupported()
{
@@ -492,11 +515,6 @@
}
#if ENABLE(VIDEO_TRACK)
-void RemoteMediaPlayerProxy::mediaPlayerDidAddAudioTrack(AudioTrackPrivate&)
-{
- notImplemented();
-}
-
void RemoteMediaPlayerProxy::mediaPlayerDidAddTextTrack(InbandTextTrackPrivate&)
{
notImplemented();
@@ -507,11 +525,6 @@
notImplemented();
}
-void RemoteMediaPlayerProxy::mediaPlayerDidRemoveAudioTrack(AudioTrackPrivate&)
-{
- notImplemented();
-}
-
void RemoteMediaPlayerProxy::mediaPlayerDidRemoveTextTrack(InbandTextTrackPrivate&)
{
notImplemented();
Modified: trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h (254453 => 254454)
--- trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h 2020-01-13 22:26:39 UTC (rev 254453)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h 2020-01-13 22:27:39 UTC (rev 254454)
@@ -43,6 +43,10 @@
#include <wtf/Vector.h>
#include <wtf/WeakPtr.h>
+namespace WebCore {
+class AudioTrackPrivate;
+}
+
namespace WebKit {
class RemoteMediaPlayerManagerProxy;
@@ -55,6 +59,7 @@
RemoteMediaPlayerProxy(RemoteMediaPlayerManagerProxy&, MediaPlayerPrivateRemoteIdentifier, Ref<IPC::Connection>&&, WebCore::MediaPlayerEnums::MediaEngineIdentifier, RemoteMediaPlayerProxyConfiguration&&);
~RemoteMediaPlayerProxy();
+ MediaPlayerPrivateRemoteIdentifier idendifier() const { return m_id; }
void invalidate();
void getConfiguration(RemoteMediaPlayerConfiguration&);
@@ -89,6 +94,8 @@
void setShouldDisableSleep(bool);
void setRate(double);
+ void audioTrackSetEnabled(TrackPrivateRemoteIdentifier, bool);
+
Ref<WebCore::PlatformMediaResource> requestResource(WebCore::ResourceRequest&&, WebCore::PlatformMediaResourceLoader::LoadOptions);
void removeResource(RemoteMediaResourceIdentifier);
@@ -107,6 +114,9 @@
void mediaPlayerSeekableTimeRangesChanged() final;
bool mediaPlayerRenderingCanBeAccelerated() final;
+ void mediaPlayerDidAddAudioTrack(WebCore::AudioTrackPrivate&) final;
+ void mediaPlayerDidRemoveAudioTrack(WebCore::AudioTrackPrivate&) final;
+
// Not implemented
void mediaPlayerResourceNotSupported() final;
void mediaPlayerSizeChanged() final;
@@ -147,10 +157,8 @@
bool mediaPlayerShouldUsePersistentCache() const final;
const String& mediaPlayerMediaCacheDirectory() const final;
- void mediaPlayerDidAddAudioTrack(WebCore::AudioTrackPrivate&) final;
void mediaPlayerDidAddTextTrack(WebCore::InbandTextTrackPrivate&) final;
void mediaPlayerDidAddVideoTrack(WebCore::VideoTrackPrivate&) final;
- void mediaPlayerDidRemoveAudioTrack(WebCore::AudioTrackPrivate&) final;
void mediaPlayerDidRemoveTextTrack(WebCore::InbandTextTrackPrivate&) final;
void mediaPlayerDidRemoveVideoTrack(WebCore::VideoTrackPrivate&) final;
@@ -186,6 +194,7 @@
const void* mediaPlayerLogIdentifier() { return reinterpret_cast<const void*>(m_configuration.logIdentifier); }
#endif
+ HashMap<AudioTrackPrivate*, Ref<RemoteAudioTrackProxy>> m_audioTracks;
MediaPlayerPrivateRemoteIdentifier m_id;
RefPtr<SandboxExtension> m_sandboxExtension;
Ref<IPC::Connection> m_webProcessConnection;
Added: trunk/Source/WebKit/GPUProcess/media/TrackPrivateRemoteConfiguration.h (0 => 254454)
--- trunk/Source/WebKit/GPUProcess/media/TrackPrivateRemoteConfiguration.h (rev 0)
+++ trunk/Source/WebKit/GPUProcess/media/TrackPrivateRemoteConfiguration.h 2020-01-13 22:27:39 UTC (rev 254454)
@@ -0,0 +1,107 @@
+/*
+ * 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 <wtf/MediaTime.h>
+
+namespace WebKit {
+
+struct TrackPrivateRemoteConfiguration {
+ AtomString id;
+ AtomString label;
+ AtomString language;
+ MediaTime startTimeVariance { MediaTime::zeroTime() };
+ int trackIndex;
+ bool enabled;
+ WebCore::AudioTrackPrivate::Kind kind { WebCore::AudioTrackPrivate::Kind::None };
+
+ template<class Encoder>
+ void encode(Encoder& encoder) const
+ {
+ encoder << id;
+ encoder << label;
+ encoder << language;
+ encoder << startTimeVariance;
+ encoder << trackIndex;
+ encoder << enabled;
+ encoder.encodeEnum(kind);
+ }
+
+ template <class Decoder>
+ static Optional<TrackPrivateRemoteConfiguration> decode(Decoder& decoder)
+ {
+ Optional<AtomString> id;
+ decoder >> id;
+ if (!id)
+ return WTF::nullopt;
+
+ Optional<AtomString> label;
+ decoder >> label;
+ if (!label)
+ return WTF::nullopt;
+
+ Optional<AtomString> language;
+ decoder >> language;
+ if (!language)
+ return WTF::nullopt;
+
+ Optional<MediaTime> startTimeVariance;
+ decoder >> startTimeVariance;
+ if (!startTimeVariance)
+ return WTF::nullopt;
+
+ Optional<int> trackIndex;
+ decoder >> trackIndex;
+ if (!trackIndex)
+ return WTF::nullopt;
+
+ Optional<bool> enabled;
+ decoder >> enabled;
+ if (!enabled)
+ return WTF::nullopt;
+
+ Optional<WebCore::AudioTrackPrivate::Kind> kind;
+ decoder >> kind;
+ if (!kind)
+ return WTF::nullopt;
+
+ return {{
+ WTFMove(*id),
+ WTFMove(*label),
+ WTFMove(*language),
+ WTFMove(*startTimeVariance),
+ *trackIndex,
+ *enabled,
+ *kind,
+ }};
+ }
+};
+
+} // namespace WebKit
+
+#endif
Added: trunk/Source/WebKit/GPUProcess/media/TrackPrivateRemoteIdentifier.h (0 => 254454)
--- trunk/Source/WebKit/GPUProcess/media/TrackPrivateRemoteIdentifier.h (rev 0)
+++ trunk/Source/WebKit/GPUProcess/media/TrackPrivateRemoteIdentifier.h 2020-01-13 22:27:39 UTC (rev 254454)
@@ -0,0 +1,39 @@
+/*
+ * 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 <wtf/ObjectIdentifier.h>
+
+namespace WebKit {
+
+enum TrackPrivateRemoteIdentifierType { };
+using TrackPrivateRemoteIdentifier = ObjectIdentifier<TrackPrivateRemoteIdentifierType>;
+
+} // namespace WebKit
+
+#endif
Modified: trunk/Source/WebKit/Scripts/webkit/messages.py (254453 => 254454)
--- trunk/Source/WebKit/Scripts/webkit/messages.py 2020-01-13 22:26:39 UTC (rev 254453)
+++ trunk/Source/WebKit/Scripts/webkit/messages.py 2020-01-13 22:27:39 UTC (rev 254454)
@@ -227,6 +227,7 @@
'WebKit::StorageAreaIdentifier',
'WebKit::StorageAreaImplIdentifier',
'WebKit::StorageNamespaceIdentifier',
+ 'WebKit::TrackPrivateRemoteIdentifier',
'WebKit::TransactionID',
'WebKit::UserContentControllerIdentifier',
'WebKit::WebPageProxyIdentifier',
Modified: trunk/Source/WebKit/Sources.txt (254453 => 254454)
--- trunk/Source/WebKit/Sources.txt 2020-01-13 22:26:39 UTC (rev 254453)
+++ trunk/Source/WebKit/Sources.txt 2020-01-13 22:27:39 UTC (rev 254454)
@@ -26,6 +26,7 @@
GPUProcess/GPUProcessCreationParameters.cpp
GPUProcess/webrtc/RemoteMediaRecorder.cpp
GPUProcess/webrtc/RemoteMediaRecorderManager.cpp
+GPUProcess/media/RemoteAudioTrackProxy.cpp
GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp
GPUProcess/media/RemoteMediaPlayerProxy.cpp
GPUProcess/media/RemoteMediaResource.cpp
@@ -510,6 +511,7 @@
WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp
WebProcess/GPU/GPUProcessConnection.cpp
+WebProcess/GPU/media/AudioTrackPrivateRemote.cpp
WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp
WebProcess/GPU/media/RemoteMediaPlayerManager.cpp
WebProcess/GPU/media/RemoteMediaPlayerMIMETypeCache.cpp @no-unify
Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (254453 => 254454)
--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2020-01-13 22:26:39 UTC (rev 254453)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2020-01-13 22:27:39 UTC (rev 254454)
@@ -2051,6 +2051,12 @@
00B9661818E25AE100CE1F88 /* FindClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FindClient.h; sourceTree = "<group>"; };
0701789B23BAE261005F0FAA /* RemoteMediaPlayerMIMETypeCache.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteMediaPlayerMIMETypeCache.cpp; sourceTree = "<group>"; };
0701789C23BAE262005F0FAA /* RemoteMediaPlayerMIMETypeCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteMediaPlayerMIMETypeCache.h; sourceTree = "<group>"; };
+ 071BC57723C93BB700680D7C /* AudioTrackPrivateRemote.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AudioTrackPrivateRemote.h; sourceTree = "<group>"; };
+ 071BC57923C93BB900680D7C /* AudioTrackPrivateRemote.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AudioTrackPrivateRemote.cpp; sourceTree = "<group>"; };
+ 071BC57B23CA532400680D7C /* TrackPrivateRemoteConfiguration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TrackPrivateRemoteConfiguration.h; sourceTree = "<group>"; };
+ 071BC57D23CA56D200680D7C /* TrackPrivateRemoteIdentifier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TrackPrivateRemoteIdentifier.h; sourceTree = "<group>"; };
+ 071BC57E23CA5DB100680D7C /* RemoteAudioTrackProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteAudioTrackProxy.cpp; sourceTree = "<group>"; };
+ 071BC57F23CA5DB100680D7C /* RemoteAudioTrackProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteAudioTrackProxy.h; sourceTree = "<group>"; };
0725EFAB239AE38400A538A9 /* RemoteMediaPlayerManagerProxy.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = RemoteMediaPlayerManagerProxy.messages.in; sourceTree = "<group>"; };
0725EFAC239AE38500A538A9 /* RemoteMediaPlayerManagerProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteMediaPlayerManagerProxy.h; sourceTree = "<group>"; };
0725EFAD239B024500A538A9 /* RemoteMediaPlayerManagerProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteMediaPlayerManagerProxy.cpp; sourceTree = "<group>"; };
@@ -5169,6 +5175,8 @@
0792312F239B3B0C009598E2 /* media */ = {
isa = PBXGroup;
children = (
+ 071BC57923C93BB900680D7C /* AudioTrackPrivateRemote.cpp */,
+ 071BC57723C93BB700680D7C /* AudioTrackPrivateRemote.h */,
07923131239B3B0C009598E2 /* MediaPlayerPrivateRemote.cpp */,
07923132239B3B0C009598E2 /* MediaPlayerPrivateRemote.h */,
0792314E239D5F53009598E2 /* MediaPlayerPrivateRemoteIdentifier.h */,
@@ -5188,6 +5196,8 @@
07C75C172399A3DB0088E65B /* media */ = {
isa = PBXGroup;
children = (
+ 071BC57E23CA5DB100680D7C /* RemoteAudioTrackProxy.cpp */,
+ 071BC57F23CA5DB100680D7C /* RemoteAudioTrackProxy.h */,
0725EFAD239B024500A538A9 /* RemoteMediaPlayerManagerProxy.cpp */,
0725EFAC239AE38500A538A9 /* RemoteMediaPlayerManagerProxy.h */,
0725EFAB239AE38400A538A9 /* RemoteMediaPlayerManagerProxy.messages.in */,
@@ -5202,6 +5212,8 @@
1DA4089E23A827780058C950 /* RemoteMediaResourceManager.cpp */,
1DA4089423A80A3E0058C950 /* RemoteMediaResourceManager.h */,
1D32F8A623A8601900B1EA6A /* RemoteMediaResourceManager.messages.in */,
+ 071BC57B23CA532400680D7C /* TrackPrivateRemoteConfiguration.h */,
+ 071BC57D23CA56D200680D7C /* TrackPrivateRemoteIdentifier.h */,
);
path = media;
sourceTree = "<group>";
Added: trunk/Source/WebKit/WebProcess/GPU/media/AudioTrackPrivateRemote.cpp (0 => 254454)
--- trunk/Source/WebKit/WebProcess/GPU/media/AudioTrackPrivateRemote.cpp (rev 0)
+++ trunk/Source/WebKit/WebProcess/GPU/media/AudioTrackPrivateRemote.cpp 2020-01-13 22:27:39 UTC (rev 254454)
@@ -0,0 +1,84 @@
+/*
+* Copyright (C) 2020 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. ``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
+* 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.
+*/
+
+#include "config.h"
+#include "AudioTrackPrivateRemote.h"
+
+#if ENABLE(GPU_PROCESS)
+
+#include "MediaPlayerPrivateRemote.h"
+#include "RemoteMediaPlayerManagerProxyMessages.h"
+#include "TrackPrivateRemoteConfiguration.h"
+
+namespace WebKit {
+
+AudioTrackPrivateRemote::AudioTrackPrivateRemote(MediaPlayerPrivateRemote& player, TrackPrivateRemoteIdentifier idendifier, TrackPrivateRemoteConfiguration&& configuration)
+ : m_player(player)
+ , m_idendifier(idendifier)
+{
+ updateConfiguration(WTFMove(configuration));
+}
+
+void AudioTrackPrivateRemote::setEnabled(bool enabled)
+{
+ if (enabled != this->enabled())
+ m_player.connection().send(Messages::RemoteMediaPlayerManagerProxy::AudioTrackSetEnabled(m_player.itentifier(), m_idendifier, enabled), 0);
+
+ AudioTrackPrivate::setEnabled(enabled);
+}
+
+void AudioTrackPrivateRemote::updateConfiguration(TrackPrivateRemoteConfiguration&& configuration)
+{
+ if (configuration.id != m_id) {
+ auto changed = !m_id.isEmpty();
+ m_id = configuration.id;
+ if (changed && client())
+ client()->idChanged(m_id);
+ }
+
+ if (configuration.label != m_label) {
+ auto changed = !m_label.isEmpty();
+ m_label = configuration.label;
+ if (changed && client())
+ client()->idChanged(m_label);
+ }
+
+ if (configuration.language != m_language) {
+ auto changed = !m_language.isEmpty();
+ m_language = configuration.language;
+ if (changed && client())
+ client()->idChanged(m_language);
+ }
+
+ m_trackIndex = configuration.trackIndex;
+ m_startTimeVariance = configuration.startTimeVariance;
+ m_kind = configuration.kind;
+ setEnabled(configuration.enabled);
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(GPU_PROCESS)
Added: trunk/Source/WebKit/WebProcess/GPU/media/AudioTrackPrivateRemote.h (0 => 254454)
--- trunk/Source/WebKit/WebProcess/GPU/media/AudioTrackPrivateRemote.h (rev 0)
+++ trunk/Source/WebKit/WebProcess/GPU/media/AudioTrackPrivateRemote.h 2020-01-13 22:27:39 UTC (rev 254454)
@@ -0,0 +1,70 @@
+/*
+* Copyright (C) 2020 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. ``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
+* 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/AudioTrackPrivate.h>
+
+namespace WebKit {
+
+struct TrackPrivateRemoteConfiguration;
+
+class AudioTrackPrivateRemote final : public WebCore::AudioTrackPrivate {
+ WTF_MAKE_NONCOPYABLE(AudioTrackPrivateRemote)
+public:
+ static Ref<AudioTrackPrivateRemote> create(MediaPlayerPrivateRemote& player, TrackPrivateRemoteIdentifier idendifier, TrackPrivateRemoteConfiguration&& configuration)
+ {
+ return adoptRef(*new AudioTrackPrivateRemote(player, idendifier, WTFMove(configuration)));
+ }
+
+ void updateConfiguration(TrackPrivateRemoteConfiguration&&);
+
+private:
+ AudioTrackPrivateRemote(MediaPlayerPrivateRemote&, TrackPrivateRemoteIdentifier, TrackPrivateRemoteConfiguration&&);
+
+ using AudioTrackKind = WebCore::AudioTrackPrivate::Kind;
+ AudioTrackKind kind() const final { return m_kind; }
+ AtomString id() const final { return m_id; }
+ AtomString label() const final { return m_label; }
+ AtomString language() const final { return m_language; }
+ int trackIndex() const final { return m_trackIndex; }
+ void setEnabled(bool) final;
+
+ MediaPlayerPrivateRemote& m_player;
+ AudioTrackKind m_kind { None };
+ AtomString m_id;
+ AtomString m_label;
+ AtomString m_language;
+ int m_trackIndex { -1 };
+ MediaTime m_startTimeVariance { MediaTime::zeroTime() };
+ TrackPrivateRemoteIdentifier m_idendifier;
+};
+
+} // namespace WebKit
+
+#endif
Modified: trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp (254453 => 254454)
--- trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp 2020-01-13 22:26:39 UTC (rev 254453)
+++ trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp 2020-01-13 22:27:39 UTC (rev 254454)
@@ -28,6 +28,7 @@
#if ENABLE(GPU_PROCESS)
#include "MediaPlayerPrivateRemote.h"
+#include "AudioTrackPrivateRemote.h"
#include "Logging.h"
#include "RemoteMediaPlayerManagerProxyMessages.h"
#include "SandboxExtension.h"
@@ -86,12 +87,11 @@
void MediaPlayerPrivateRemote::prepareForPlayback(bool privateMode, MediaPlayer::Preload preload, bool preservesPitch, bool prepare)
{
- m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::PrepareForPlayback(m_id, privateMode, preload, preservesPitch, prepare), 0);
+ connection().send(Messages::RemoteMediaPlayerManagerProxy::PrepareForPlayback(m_id, privateMode, preload, preservesPitch, prepare), 0);
}
void MediaPlayerPrivateRemote::MediaPlayerPrivateRemote::load(const URL& url, const ContentType& contentType, const String& keySystem)
{
- auto& connection = m_manager.gpuProcessConnection().connection();
Optional<SandboxExtension::Handle> sandboxExtensionHandle;
if (url.isLocalFile()) {
SandboxExtension::Handle handle;
@@ -117,7 +117,7 @@
sandboxExtensionHandle = WTFMove(handle);
}
- connection.sendWithAsyncReply(Messages::RemoteMediaPlayerManagerProxy::Load(m_id, url, sandboxExtensionHandle, contentType, keySystem), [weakThis = makeWeakPtr(*this)](auto&& configuration) {
+ connection().sendWithAsyncReply(Messages::RemoteMediaPlayerManagerProxy::Load(m_id, url, sandboxExtensionHandle, contentType, keySystem), [weakThis = makeWeakPtr(*this)](auto&& configuration) {
if (weakThis)
weakThis->m_configuration = configuration;
});
@@ -125,49 +125,49 @@
void MediaPlayerPrivateRemote::cancelLoad()
{
- m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::CancelLoad(m_id), 0);
+ connection().send(Messages::RemoteMediaPlayerManagerProxy::CancelLoad(m_id), 0);
}
void MediaPlayerPrivateRemote::prepareToPlay()
{
- m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::PrepareToPlay(m_id), 0);
+ connection().send(Messages::RemoteMediaPlayerManagerProxy::PrepareToPlay(m_id), 0);
}
void MediaPlayerPrivateRemote::play()
{
m_cachedState.paused = false;
- m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::Play(m_id), 0);
+ connection().send(Messages::RemoteMediaPlayerManagerProxy::Play(m_id), 0);
}
void MediaPlayerPrivateRemote::pause()
{
m_cachedState.paused = true;
- m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::Pause(m_id), 0);
+ connection().send(Messages::RemoteMediaPlayerManagerProxy::Pause(m_id), 0);
}
void MediaPlayerPrivateRemote::setPreservesPitch(bool preservesPitch)
{
- m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::SetPreservesPitch(m_id, preservesPitch), 0);
+ connection().send(Messages::RemoteMediaPlayerManagerProxy::SetPreservesPitch(m_id, preservesPitch), 0);
}
void MediaPlayerPrivateRemote::setVolumeDouble(double volume)
{
- m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::SetVolume(m_id, volume), 0);
+ connection().send(Messages::RemoteMediaPlayerManagerProxy::SetVolume(m_id, volume), 0);
}
void MediaPlayerPrivateRemote::setMuted(bool muted)
{
- m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::SetMuted(m_id, muted), 0);
+ connection().send(Messages::RemoteMediaPlayerManagerProxy::SetMuted(m_id, muted), 0);
}
void MediaPlayerPrivateRemote::setPreload(MediaPlayer::Preload preload)
{
- m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::SetPreload(m_id, preload), 0);
+ connection().send(Messages::RemoteMediaPlayerManagerProxy::SetPreload(m_id, preload), 0);
}
void MediaPlayerPrivateRemote::setPrivateBrowsingMode(bool privateMode)
{
- m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::SetPrivateBrowsingMode(m_id, privateMode), 0);
+ connection().send(Messages::RemoteMediaPlayerManagerProxy::SetPrivateBrowsingMode(m_id, privateMode), 0);
}
MediaTime MediaPlayerPrivateRemote::currentMediaTime() const
@@ -178,13 +178,13 @@
void MediaPlayerPrivateRemote::seek(const MediaTime& time)
{
m_seeking = true;
- m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::Seek(m_id, time), 0);
+ connection().send(Messages::RemoteMediaPlayerManagerProxy::Seek(m_id, time), 0);
}
void MediaPlayerPrivateRemote::seekWithTolerance(const MediaTime& time, const MediaTime& negativeTolerance, const MediaTime& positiveTolerance)
{
m_seeking = true;
- m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::SeekWithTolerance(m_id, time, negativeTolerance, positiveTolerance), 0);
+ connection().send(Messages::RemoteMediaPlayerManagerProxy::SeekWithTolerance(m_id, time, negativeTolerance, positiveTolerance), 0);
}
bool MediaPlayerPrivateRemote::didLoadingProgress() const
@@ -341,42 +341,42 @@
void MediaPlayerPrivateRemote::prepareForRendering()
{
- m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::PrepareForRendering(m_id), 0);
+ connection().send(Messages::RemoteMediaPlayerManagerProxy::PrepareForRendering(m_id), 0);
}
void MediaPlayerPrivateRemote::setSize(const WebCore::IntSize& size)
{
- m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::SetSize(m_id, size), 0);
+ connection().send(Messages::RemoteMediaPlayerManagerProxy::SetSize(m_id, size), 0);
}
void MediaPlayerPrivateRemote::setVisible(bool visible)
{
- m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::SetVisible(m_id, visible), 0);
+ connection().send(Messages::RemoteMediaPlayerManagerProxy::SetVisible(m_id, visible), 0);
}
void MediaPlayerPrivateRemote::setShouldMaintainAspectRatio(bool maintainRatio)
{
- m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::SetShouldMaintainAspectRatio(m_id, maintainRatio), 0);
+ connection().send(Messages::RemoteMediaPlayerManagerProxy::SetShouldMaintainAspectRatio(m_id, maintainRatio), 0);
}
void MediaPlayerPrivateRemote::setVideoFullscreenFrame(WebCore::FloatRect rect)
{
- m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::SetVideoFullscreenFrame(m_id, rect), 0);
+ connection().send(Messages::RemoteMediaPlayerManagerProxy::SetVideoFullscreenFrame(m_id, rect), 0);
}
void MediaPlayerPrivateRemote::setVideoFullscreenGravity(WebCore::MediaPlayerEnums::VideoGravity gravity)
{
- m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::SetVideoFullscreenGravity(m_id, gravity), 0);
+ connection().send(Messages::RemoteMediaPlayerManagerProxy::SetVideoFullscreenGravity(m_id, gravity), 0);
}
void MediaPlayerPrivateRemote::acceleratedRenderingStateChanged()
{
- m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::AcceleratedRenderingStateChanged(m_id, m_player->supportsAcceleratedRendering()), 0);
+ connection().send(Messages::RemoteMediaPlayerManagerProxy::AcceleratedRenderingStateChanged(m_id, m_player->supportsAcceleratedRendering()), 0);
}
void MediaPlayerPrivateRemote::setShouldDisableSleep(bool disable)
{
- m_manager.gpuProcessConnection().connection().send(Messages::RemoteMediaPlayerManagerProxy::SetShouldDisableSleep(m_id, disable), 0);
+ connection().send(Messages::RemoteMediaPlayerManagerProxy::SetShouldDisableSleep(m_id, disable), 0);
}
FloatSize MediaPlayerPrivateRemote::naturalSize() const
@@ -384,6 +384,34 @@
return m_cachedState.naturalSize;
}
+void MediaPlayerPrivateRemote::addRemoteAudioTrack(TrackPrivateRemoteIdentifier identifier, TrackPrivateRemoteConfiguration&& configuration)
+{
+ ASSERT(!m_audioTracks.contains(identifier));
+ if (m_audioTracks.contains(identifier))
+ return;
+
+ auto track = AudioTrackPrivateRemote::create(*this, identifier, WTFMove(configuration));
+ m_player->addAudioTrack(m_audioTracks.add(identifier, WTFMove(track)).iterator->value);
+}
+
+void MediaPlayerPrivateRemote::removeRemoteAudioTrack(TrackPrivateRemoteIdentifier id)
+{
+ ASSERT(m_audioTracks.contains(id));
+
+ if (auto* track = m_audioTracks.get(id)) {
+ m_player->removeAudioTrack(*track);
+ m_audioTracks.remove(id);
+ }
+}
+
+void MediaPlayerPrivateRemote::remoteAudioTrackConfigurationChanged(TrackPrivateRemoteIdentifier id, TrackPrivateRemoteConfiguration&& configuration)
+{
+ ASSERT(m_audioTracks.contains(id));
+
+ if (const auto& track = m_audioTracks.get(id))
+ track->updateConfiguration(WTFMove(configuration));
+}
+
// FIXME: Unimplemented
#if ENABLE(MEDIA_SOURCE)
@@ -841,7 +869,7 @@
ASSERT(!m_mediaResources.contains(remoteMediaResourceIdentifier));
auto resource = m_mediaResourceLoader->requestResource(WTFMove(request), options);
// PlatformMediaResource owns the PlatformMediaResourceClient
- resource->setClient(makeUnique<RemoteMediaResourceProxy>(m_manager.gpuProcessConnection().connection(), *resource, remoteMediaResourceIdentifier));
+ resource->setClient(makeUnique<RemoteMediaResourceProxy>(connection(), *resource, remoteMediaResourceIdentifier));
m_mediaResources.add(remoteMediaResourceIdentifier, WTFMove(resource));
}
Modified: trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h (254453 => 254454)
--- trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h 2020-01-13 22:26:39 UTC (rev 254453)
+++ trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h 2020-01-13 22:27:39 UTC (rev 254454)
@@ -32,6 +32,7 @@
#include "RemoteMediaPlayerState.h"
#include "RemoteMediaResourceIdentifier.h"
#include "RemoteMediaResourceProxy.h"
+#include "TrackPrivateRemoteIdentifier.h"
#include <WebCore/MediaPlayerPrivate.h>
#include <wtf/LoggerHelper.h>
#include <wtf/MediaTime.h>
@@ -39,6 +40,9 @@
namespace WebKit {
+class AudioTrackPrivateRemote;
+struct TrackPrivateRemoteConfiguration;
+
class MediaPlayerPrivateRemote final
: public CanMakeWeakPtr<MediaPlayerPrivateRemote>
, public WebCore::MediaPlayerPrivateInterface
@@ -58,7 +62,8 @@
void invalidate() { m_invalid = true; }
WebCore::MediaPlayerEnums::MediaEngineIdentifier remoteEngineIdentifier() const { return m_remoteEngineIdentifier; }
- MediaPlayerPrivateRemoteIdentifier playerItentifier() const { return m_id; }
+ MediaPlayerPrivateRemoteIdentifier itentifier() const { return m_id; }
+ IPC::Connection& connection() const { return m_manager.gpuProcessConnection().connection(); }
void networkStateChanged(RemoteMediaPlayerState&&);
void readyStateChanged(RemoteMediaPlayerState&&);
@@ -73,6 +78,10 @@
void characteristicChanged(bool hasAudio, bool hasVideo, WebCore::MediaPlayerEnums::MovieLoadType);
void sizeChanged(WebCore::FloatSize);
+ void addRemoteAudioTrack(TrackPrivateRemoteIdentifier, TrackPrivateRemoteConfiguration&&);
+ void removeRemoteAudioTrack(TrackPrivateRemoteIdentifier);
+ void remoteAudioTrackConfigurationChanged(TrackPrivateRemoteIdentifier, TrackPrivateRemoteConfiguration&&);
+
void requestResource(RemoteMediaResourceIdentifier, WebCore::ResourceRequest&&, WebCore::PlatformMediaResourceLoader::LoadOptions);
void removeResource(RemoteMediaResourceIdentifier);
@@ -311,6 +320,7 @@
std::unique_ptr<WebCore::PlatformTimeRanges> m_cachedBufferedTimeRanges;
HashMap<RemoteMediaResourceIdentifier, RefPtr<WebCore::PlatformMediaResource>> m_mediaResources;
+ HashMap<TrackPrivateRemoteIdentifier, Ref<AudioTrackPrivateRemote>> m_audioTracks;
double m_volume { 1 };
double m_rate { 1 };
Modified: trunk/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp (254453 => 254454)
--- trunk/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp 2020-01-13 22:26:39 UTC (rev 254453)
+++ trunk/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp 2020-01-13 22:27:39 UTC (rev 254454)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2019-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -261,13 +261,13 @@
player->muteChanged(mute);
}
-void RemoteMediaPlayerManager::timeChanged(WebKit::MediaPlayerPrivateRemoteIdentifier id, RemoteMediaPlayerState&& state)
+void RemoteMediaPlayerManager::timeChanged(MediaPlayerPrivateRemoteIdentifier id, RemoteMediaPlayerState&& state)
{
if (const auto& player = m_players.get(id))
player->timeChanged(WTFMove(state));
}
-void RemoteMediaPlayerManager::durationChanged(WebKit::MediaPlayerPrivateRemoteIdentifier id, RemoteMediaPlayerState&& state)
+void RemoteMediaPlayerManager::durationChanged(MediaPlayerPrivateRemoteIdentifier id, RemoteMediaPlayerState&& state)
{
if (const auto& player = m_players.get(id))
player->durationChanged(WTFMove(state));
@@ -285,24 +285,42 @@
player->playbackStateChanged(paused);
}
-void RemoteMediaPlayerManager::engineFailedToLoad(WebKit::MediaPlayerPrivateRemoteIdentifier id, long platformErrorCode)
+void RemoteMediaPlayerManager::engineFailedToLoad(MediaPlayerPrivateRemoteIdentifier id, long platformErrorCode)
{
if (const auto& player = m_players.get(id))
player->engineFailedToLoad(platformErrorCode);
}
-void RemoteMediaPlayerManager::characteristicChanged(WebKit::MediaPlayerPrivateRemoteIdentifier id, bool hasAudio, bool hasVideo, WebCore::MediaPlayerEnums::MovieLoadType loadType)
+void RemoteMediaPlayerManager::characteristicChanged(MediaPlayerPrivateRemoteIdentifier id, bool hasAudio, bool hasVideo, WebCore::MediaPlayerEnums::MovieLoadType loadType)
{
if (auto player = m_players.get(id))
player->characteristicChanged(hasAudio, hasVideo, loadType);
}
-void RemoteMediaPlayerManager::sizeChanged(WebKit::MediaPlayerPrivateRemoteIdentifier id, WebCore::FloatSize naturalSize)
+void RemoteMediaPlayerManager::sizeChanged(MediaPlayerPrivateRemoteIdentifier id, WebCore::FloatSize naturalSize)
{
if (auto player = m_players.get(id))
player->sizeChanged(naturalSize);
}
+void RemoteMediaPlayerManager::addRemoteAudioTrack(MediaPlayerPrivateRemoteIdentifier playerID, TrackPrivateRemoteIdentifier trackID, TrackPrivateRemoteConfiguration&& configuration)
+{
+ if (const auto& player = m_players.get(playerID))
+ player->addRemoteAudioTrack(trackID, WTFMove(configuration));
+}
+
+void RemoteMediaPlayerManager::removeRemoteAudioTrack(MediaPlayerPrivateRemoteIdentifier playerID, TrackPrivateRemoteIdentifier trackID)
+{
+ if (const auto& player = m_players.get(playerID))
+ player->removeRemoteAudioTrack(trackID);
+}
+
+void RemoteMediaPlayerManager::remoteAudioTrackConfigurationChanged(MediaPlayerPrivateRemoteIdentifier playerID, TrackPrivateRemoteIdentifier trackID, TrackPrivateRemoteConfiguration&& configuration)
+{
+ if (const auto& player = m_players.get(playerID))
+ player->remoteAudioTrackConfigurationChanged(trackID, WTFMove(configuration));
+}
+
void RemoteMediaPlayerManager::requestResource(MediaPlayerPrivateRemoteIdentifier id, RemoteMediaResourceIdentifier remoteMediaResourceIdentifier, ResourceRequest&& request, PlatformMediaResourceLoader::LoadOptions options, CompletionHandler<void()>&& completionHandler)
{
if (const auto& player = m_players.get(id))
@@ -326,7 +344,7 @@
RemoteMediaPlayerSupport::setRegisterRemotePlayerCallback(settings.useGPUProcessForMedia() ? WTFMove(registerEngine) : RemoteMediaPlayerSupport::RegisterRemotePlayerCallback());
}
-void RemoteMediaPlayerManager::updateCachedState(WebKit::MediaPlayerPrivateRemoteIdentifier id, RemoteMediaPlayerState&& state)
+void RemoteMediaPlayerManager::updateCachedState(MediaPlayerPrivateRemoteIdentifier id, RemoteMediaPlayerState&& state)
{
if (auto player = m_players.get(id))
player->updateCachedState(WTFMove(state));
Modified: trunk/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.h (254453 => 254454)
--- trunk/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.h 2020-01-13 22:26:39 UTC (rev 254453)
+++ trunk/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.h 2020-01-13 22:27:39 UTC (rev 254454)
@@ -33,6 +33,7 @@
#include "RemoteMediaPlayerState.h"
#include "RemoteMediaResourceIdentifier.h"
#include "SharedMemory.h"
+#include "TrackPrivateRemoteIdentifier.h"
#include "WebProcessSupplement.h"
#include <WebCore/MediaPlayer.h>
#include <wtf/HashMap.h>
@@ -47,6 +48,7 @@
class MediaPlayerPrivateRemote;
class RemoteMediaPlayerMIMETypeCache;
class WebProcess;
+struct TrackPrivateRemoteConfiguration;
class RemoteMediaPlayerManager : public WebProcessSupplement, public IPC::MessageReceiver {
WTF_MAKE_FAST_ALLOCATED;
@@ -77,16 +79,19 @@
// Messages::RemoteMediaPlayerManager
void networkStateChanged(MediaPlayerPrivateRemoteIdentifier, RemoteMediaPlayerState&&);
void readyStateChanged(MediaPlayerPrivateRemoteIdentifier, RemoteMediaPlayerState&&);
- void volumeChanged(WebKit::MediaPlayerPrivateRemoteIdentifier, double);
- void muteChanged(WebKit::MediaPlayerPrivateRemoteIdentifier, bool);
- void timeChanged(WebKit::MediaPlayerPrivateRemoteIdentifier, RemoteMediaPlayerState&&);
- void durationChanged(WebKit::MediaPlayerPrivateRemoteIdentifier, RemoteMediaPlayerState&&);
- void rateChanged(WebKit::MediaPlayerPrivateRemoteIdentifier, double);
- void playbackStateChanged(WebKit::MediaPlayerPrivateRemoteIdentifier, bool);
- void engineFailedToLoad(WebKit::MediaPlayerPrivateRemoteIdentifier, long);
- void updateCachedState(WebKit::MediaPlayerPrivateRemoteIdentifier, RemoteMediaPlayerState&&);
- void characteristicChanged(WebKit::MediaPlayerPrivateRemoteIdentifier, bool hasAudio, bool hasVideo, WebCore::MediaPlayerEnums::MovieLoadType);
- void sizeChanged(WebKit::MediaPlayerPrivateRemoteIdentifier, WebCore::FloatSize);
+ void volumeChanged(MediaPlayerPrivateRemoteIdentifier, double);
+ void muteChanged(MediaPlayerPrivateRemoteIdentifier, bool);
+ void timeChanged(MediaPlayerPrivateRemoteIdentifier, RemoteMediaPlayerState&&);
+ void durationChanged(MediaPlayerPrivateRemoteIdentifier, RemoteMediaPlayerState&&);
+ void rateChanged(MediaPlayerPrivateRemoteIdentifier, double);
+ void playbackStateChanged(MediaPlayerPrivateRemoteIdentifier, bool);
+ void engineFailedToLoad(MediaPlayerPrivateRemoteIdentifier, long);
+ void updateCachedState(MediaPlayerPrivateRemoteIdentifier, RemoteMediaPlayerState&&);
+ void characteristicChanged(MediaPlayerPrivateRemoteIdentifier, bool hasAudio, bool hasVideo, WebCore::MediaPlayerEnums::MovieLoadType);
+ void sizeChanged(MediaPlayerPrivateRemoteIdentifier, WebCore::FloatSize);
+ void addRemoteAudioTrack(MediaPlayerPrivateRemoteIdentifier, TrackPrivateRemoteIdentifier, TrackPrivateRemoteConfiguration&&);
+ void removeRemoteAudioTrack(MediaPlayerPrivateRemoteIdentifier, TrackPrivateRemoteIdentifier);
+ void remoteAudioTrackConfigurationChanged(MediaPlayerPrivateRemoteIdentifier, TrackPrivateRemoteIdentifier, TrackPrivateRemoteConfiguration&&);
void requestResource(MediaPlayerPrivateRemoteIdentifier, RemoteMediaResourceIdentifier, WebCore::ResourceRequest&&, WebCore::PlatformMediaResourceLoader::LoadOptions, CompletionHandler<void()>&&);
void removeResource(MediaPlayerPrivateRemoteIdentifier, RemoteMediaResourceIdentifier);
Modified: trunk/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.messages.in (254453 => 254454)
--- trunk/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.messages.in 2020-01-13 22:26:39 UTC (rev 254453)
+++ trunk/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.messages.in 2020-01-13 22:27:39 UTC (rev 254454)
@@ -37,6 +37,10 @@
CharacteristicChanged(WebKit::MediaPlayerPrivateRemoteIdentifier id, bool hasAudio, bool hasVideo, enum:uint8_t WebCore::MediaPlayerEnums::MovieLoadType movieLoadType)
SizeChanged(WebKit::MediaPlayerPrivateRemoteIdentifier id, WebCore::FloatSize naturalSize)
+ AddRemoteAudioTrack(WebKit::MediaPlayerPrivateRemoteIdentifier playerID, WebKit::TrackPrivateRemoteIdentifier trackID, struct WebKit::TrackPrivateRemoteConfiguration configuration)
+ RemoveRemoteAudioTrack(WebKit::MediaPlayerPrivateRemoteIdentifier playerID, WebKit::TrackPrivateRemoteIdentifier trackID)
+ RemoteAudioTrackConfigurationChanged(WebKit::MediaPlayerPrivateRemoteIdentifier playerID, WebKit::TrackPrivateRemoteIdentifier trackID, struct WebKit::TrackPrivateRemoteConfiguration configuration)
+
RequestResource(WebKit::MediaPlayerPrivateRemoteIdentifier mediaPlayerPrivateRemoteIdentifier, WebKit::RemoteMediaResourceIdentifier remoteMediaResourceIdentifier, WebCore::ResourceRequest request, enum:uint8_t WebCore::PlatformMediaResourceLoader::LoadOptions options) -> () Async
RemoveResource(WebKit::MediaPlayerPrivateRemoteIdentifier mediaPlayerPrivateRemoteIdentifier, WebKit::RemoteMediaResourceIdentifier remoteMediaResourceIdentifier)
}
Modified: trunk/Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp (254453 => 254454)
--- trunk/Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp 2020-01-13 22:26:39 UTC (rev 254453)
+++ trunk/Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp 2020-01-13 22:27:39 UTC (rev 254454)
@@ -28,9 +28,9 @@
#if USE(LIBWEBRTC) && PLATFORM(COCOA) && ENABLE(GPU_PROCESS)
+#include "DataReference.h"
#include "GPUProcessConnection.h"
#include "LibWebRTCCodecsProxyMessages.h"
-#include "SharedBufferDataReference.h"
#include "WebProcess.h"
#include <WebCore/LibWebRTCMacros.h>
#include <WebCore/RealtimeVideoUtilities.h>
@@ -41,6 +41,7 @@
#include <wtf/MainThread.h>
namespace WebKit {
+using namespace WebCore;
static webrtc::WebKitVideoDecoder createVideoDecoder(const webrtc::SdpVideoFormat& format)
{
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.cpp (254453 => 254454)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.cpp 2020-01-13 22:26:39 UTC (rev 254453)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.cpp 2020-01-13 22:27:39 UTC (rev 254454)
@@ -29,6 +29,7 @@
#if USE(QUICK_LOOK)
#include "Logging.h"
+#include "WebPage.h"
#include "WebPageProxyMessages.h"
#include "WebProcess.h"
#include <WebCore/SharedBuffer.h>