Log Message
[GPUP] Out-of-band TextTracks https://bugs.webkit.org/show_bug.cgi?id=217062 <rdar://problem/68739969>
Reviewed by Jer Noble. Source/WebCore: Add support for passing out-of-band TextTracks to a media engine running in the GPU process. No new tests, this can only be tested with a specific hardware setup. * html/HTMLMediaElement.cpp: (WebCore::toPlatform): * platform/graphics/PlatformTextTrack.h: Put instance variables into a struct so state can be encoded and decoded. (WebCore::PlatformTextTrackData::PlatformTextTrackData): (WebCore::PlatformTextTrackData::decode): (WebCore::PlatformTextTrackData::encode const): (WebCore::PlatformTextTrackClient::privateTrack): (WebCore::PlatformTextTrack::create): (WebCore::PlatformTextTrack::createOutOfBand): (WebCore::PlatformTextTrack::type const): (WebCore::PlatformTextTrack::kind const): (WebCore::PlatformTextTrack::mode const): (WebCore::PlatformTextTrack::label const): (WebCore::PlatformTextTrack::language const): (WebCore::PlatformTextTrack::url const): (WebCore::PlatformTextTrack::uniqueId const): (WebCore::PlatformTextTrack::isDefault const): (WebCore::PlatformTextTrack::client const): (WebCore::PlatformTextTrack::data const): (WebCore::PlatformTextTrack::PlatformTextTrack): (WebCore::PlatformTextTrack::captionMenuOffItem): Deleted. (WebCore::PlatformTextTrack::captionMenuAutomaticItem): Deleted. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::mediaDescriptionForKind): (WebCore::MediaPlayerPrivateAVFoundationObjC::synchronizeTextTrackState): Source/WebKit: * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::outOfBandTrackSources): * GPUProcess/media/RemoteMediaPlayerProxyConfiguration.h: (WebKit::RemoteMediaPlayerProxyConfiguration::encode const): (WebKit::RemoteMediaPlayerProxyConfiguration::decode): * Scripts/webkit/messages.py: * WebProcess/GPU/media/RemoteMediaPlayerManager.cpp: (WebKit::RemoteMediaPlayerManager::createRemoteMediaPlayer): * WebProcess/GPU/media/RemoteMediaPlayerManager.h:
Modified Paths
- trunk/Source/WebCore/ChangeLog
- trunk/Source/WebCore/html/HTMLMediaElement.cpp
- trunk/Source/WebCore/platform/graphics/PlatformTextTrack.h
- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
- trunk/Source/WebKit/ChangeLog
- trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp
- trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxyConfiguration.h
- trunk/Source/WebKit/Scripts/webkit/messages.py
- trunk/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp
- trunk/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.h
Diff
Modified: trunk/Source/WebCore/ChangeLog (267712 => 267713)
--- trunk/Source/WebCore/ChangeLog 2020-09-28 20:06:52 UTC (rev 267712)
+++ trunk/Source/WebCore/ChangeLog 2020-09-28 20:21:03 UTC (rev 267713)
@@ -1,3 +1,43 @@
+2020-09-28 Eric Carlson <[email protected]>
+
+ [GPUP] Out-of-band TextTracks
+ https://bugs.webkit.org/show_bug.cgi?id=217062
+ <rdar://problem/68739969>
+
+ Reviewed by Jer Noble.
+
+ Add support for passing out-of-band TextTracks to a media engine running in the GPU process.
+
+ No new tests, this can only be tested with a specific hardware setup.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::toPlatform):
+ * platform/graphics/PlatformTextTrack.h: Put instance variables into a struct so
+ state can be encoded and decoded.
+ (WebCore::PlatformTextTrackData::PlatformTextTrackData):
+ (WebCore::PlatformTextTrackData::decode):
+ (WebCore::PlatformTextTrackData::encode const):
+ (WebCore::PlatformTextTrackClient::privateTrack):
+ (WebCore::PlatformTextTrack::create):
+ (WebCore::PlatformTextTrack::createOutOfBand):
+ (WebCore::PlatformTextTrack::type const):
+ (WebCore::PlatformTextTrack::kind const):
+ (WebCore::PlatformTextTrack::mode const):
+ (WebCore::PlatformTextTrack::label const):
+ (WebCore::PlatformTextTrack::language const):
+ (WebCore::PlatformTextTrack::url const):
+ (WebCore::PlatformTextTrack::uniqueId const):
+ (WebCore::PlatformTextTrack::isDefault const):
+ (WebCore::PlatformTextTrack::client const):
+ (WebCore::PlatformTextTrack::data const):
+ (WebCore::PlatformTextTrack::PlatformTextTrack):
+ (WebCore::PlatformTextTrack::captionMenuOffItem): Deleted.
+ (WebCore::PlatformTextTrack::captionMenuAutomaticItem): Deleted.
+
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+ (WebCore::mediaDescriptionForKind):
+ (WebCore::MediaPlayerPrivateAVFoundationObjC::synchronizeTextTrackState):
+
2020-09-28 Fujii Hironori <[email protected]>
[TextureMapper] Enable a depth buffer for preserve-3d
Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (267712 => 267713)
--- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2020-09-28 20:06:52 UTC (rev 267712)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2020-09-28 20:21:03 UTC (rev 267713)
@@ -6854,38 +6854,38 @@
#if ENABLE(AVF_CAPTIONS)
-static inline PlatformTextTrack::TrackKind toPlatform(TextTrack::Kind kind)
+static inline PlatformTextTrackData::TrackKind toPlatform(TextTrack::Kind kind)
{
switch (kind) {
case TextTrack::Kind::Captions:
- return PlatformTextTrack::Caption;
+ return PlatformTextTrackData::TrackKind::Caption;
case TextTrack::Kind::Chapters:
- return PlatformTextTrack::Chapter;
+ return PlatformTextTrackData::TrackKind::Chapter;
case TextTrack::Kind::Descriptions:
- return PlatformTextTrack::Description;
+ return PlatformTextTrackData::TrackKind::Description;
case TextTrack::Kind::Forced:
- return PlatformTextTrack::Forced;
+ return PlatformTextTrackData::TrackKind::Forced;
case TextTrack::Kind::Metadata:
- return PlatformTextTrack::MetaData;
+ return PlatformTextTrackData::TrackKind::MetaData;
case TextTrack::Kind::Subtitles:
- return PlatformTextTrack::Subtitle;
+ return PlatformTextTrackData::TrackKind::Subtitle;
}
ASSERT_NOT_REACHED();
- return PlatformTextTrack::Caption;
+ return PlatformTextTrackData::TrackKind::Caption;
}
-static inline PlatformTextTrack::TrackMode toPlatform(TextTrack::Mode mode)
+static inline PlatformTextTrackData::TrackMode toPlatform(TextTrack::Mode mode)
{
switch (mode) {
case TextTrack::Mode::Disabled:
- return PlatformTextTrack::Disabled;
+ return PlatformTextTrackData::TrackMode::Disabled;
case TextTrack::Mode::Hidden:
- return PlatformTextTrack::Hidden;
+ return PlatformTextTrackData::TrackMode::Hidden;
case TextTrack::Mode::Showing:
- return PlatformTextTrack::Showing;
+ return PlatformTextTrackData::TrackMode::Showing;
}
ASSERT_NOT_REACHED();
- return PlatformTextTrack::Disabled;
+ return PlatformTextTrackData::TrackMode::Disabled;
}
Vector<RefPtr<PlatformTextTrack>> HTMLMediaElement::outOfBandTrackSources()
Modified: trunk/Source/WebCore/platform/graphics/PlatformTextTrack.h (267712 => 267713)
--- trunk/Source/WebCore/platform/graphics/PlatformTextTrack.h 2020-09-28 20:06:52 UTC (rev 267712)
+++ trunk/Source/WebCore/platform/graphics/PlatformTextTrack.h 2020-09-28 20:21:03 UTC (rev 267713)
@@ -23,8 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef PlatformTextTrack_h
-#define PlatformTextTrack_h
+#pragma once
#if ENABLE(AVF_CAPTIONS)
@@ -36,17 +35,8 @@
class TextTrack;
class InbandTextTrackPrivate;
-class PlatformTextTrackClient {
-public:
- virtual ~PlatformTextTrackClient() = default;
-
- virtual TextTrack* publicTrack() = 0;
- virtual InbandTextTrackPrivate* privateTrack() { return 0; }
-};
-
-class PlatformTextTrack : public RefCounted<PlatformTextTrack> {
-public:
- enum TrackKind {
+struct PlatformTextTrackData {
+ enum class TrackKind : uint8_t {
Subtitle = 0,
Caption = 1,
Description = 2,
@@ -54,53 +44,19 @@
MetaData = 4,
Forced = 5,
};
- enum TrackType {
+ enum class TrackType : uint8_t {
InBand = 0,
OutOfBand = 1,
Script = 2
};
- enum TrackMode {
+ enum class TrackMode : uint8_t {
Disabled,
Hidden,
Showing
};
-
- static Ref<PlatformTextTrack> create(PlatformTextTrackClient* client, const String& label, const String& language, TrackMode mode, TrackKind kind, TrackType type, int uniqueId)
- {
- return adoptRef(*new PlatformTextTrack(client, label, language, String(), mode, kind, type, uniqueId, false));
- }
- static Ref<PlatformTextTrack> createOutOfBand(const String& label, const String& language, const String& url, TrackMode mode, TrackKind kind, int uniqueId, bool isDefault)
- {
- return adoptRef(*new PlatformTextTrack(nullptr, label, language, url, mode, kind, OutOfBand, uniqueId, isDefault));
- }
-
- virtual ~PlatformTextTrack() = default;
-
- TrackType type() const { return m_type; }
- TrackKind kind() const { return m_kind; }
- TrackMode mode() const { return m_mode; }
- const String& label() const { return m_label; }
- const String& language() const { return m_language; }
- const String& url() const { return m_url; }
- PlatformTextTrackClient* client() const { return m_client; }
- int uniqueId() const { return m_uniqueId; }
- bool isDefault() const { return m_isDefault; }
-
- static PlatformTextTrack& captionMenuOffItem()
- {
- static PlatformTextTrack& off = PlatformTextTrack::create(nullptr, "off menu item", "", Showing, Subtitle, InBand, 0).leakRef();
- return off;
- }
-
- static PlatformTextTrack& captionMenuAutomaticItem()
- {
- static PlatformTextTrack& automatic = PlatformTextTrack::create(nullptr, "automatic menu item", "", Showing, Subtitle, InBand, 0).leakRef();
- return automatic;
- }
-
-protected:
- PlatformTextTrack(PlatformTextTrackClient* client, const String& label, const String& language, const String& url, TrackMode mode, TrackKind kind, TrackType type, int uniqueId, bool isDefault)
+ PlatformTextTrackData() = default;
+ PlatformTextTrackData(const String& label, const String& language, const String& url, TrackMode mode, TrackKind kind, TrackType type, int uniqueId, bool isDefault)
: m_label(label)
, m_language(language)
, m_url(url)
@@ -107,7 +63,6 @@
, m_mode(mode)
, m_kind(kind)
, m_type(type)
- , m_client(client)
, m_uniqueId(uniqueId)
, m_isDefault(isDefault)
{
@@ -119,13 +74,183 @@
TrackMode m_mode;
TrackKind m_kind;
TrackType m_type;
- PlatformTextTrackClient* m_client;
int m_uniqueId;
bool m_isDefault;
+
+ template<class Encoder> void encode(Encoder&) const;
+ template<class Decoder> static Optional<PlatformTextTrackData> decode(Decoder&);
};
+template <class Decoder>
+Optional<PlatformTextTrackData> PlatformTextTrackData::decode(Decoder& decoder)
+{
+ Optional<String> label;
+ decoder >> label;
+ if (!label)
+ return WTF::nullopt;
+
+ Optional<String> language;
+ decoder >> language;
+ if (!language)
+ return WTF::nullopt;
+
+ Optional<String> url;
+ decoder >> url;
+ if (!url)
+ return WTF::nullopt;
+
+ Optional<TrackMode> mode;
+ decoder >> mode;
+ if (!mode)
+ return WTF::nullopt;
+
+ Optional<TrackKind> kind;
+ decoder >> kind;
+ if (!kind)
+ return WTF::nullopt;
+
+ Optional<TrackType> type;
+ decoder >> type;
+ if (!type)
+ return WTF::nullopt;
+
+ Optional<int> uniqueId;
+ decoder >> uniqueId;
+ if (!uniqueId)
+ return WTF::nullopt;
+
+ Optional<bool> isDefault;
+ decoder >> isDefault;
+ if (!isDefault)
+ return WTF::nullopt;
+
+ PlatformTextTrackData data = {
+ WTFMove(*label),
+ WTFMove(*language),
+ WTFMove(*url),
+ WTFMove(*mode),
+ WTFMove(*kind),
+ WTFMove(*type),
+ WTFMove(*uniqueId),
+ WTFMove(*isDefault),
+ };
+
+ return data;
}
-#endif
+template<class Encoder>
+void PlatformTextTrackData::encode(Encoder& encoder) const
+{
+ encoder << m_label;
+ encoder << m_language;
+ encoder << m_url;
+ encoder << m_mode;
+ encoder << m_kind;
+ encoder << m_type;
+ encoder << m_uniqueId;
+ encoder << m_isDefault;
+}
-#endif // PlatformTextTrack_h
+class PlatformTextTrackClient {
+public:
+ virtual ~PlatformTextTrackClient() = default;
+
+ virtual TextTrack* publicTrack() = 0;
+ virtual InbandTextTrackPrivate* privateTrack() { return 0; }
+};
+
+class PlatformTextTrack : public RefCounted<PlatformTextTrack> {
+public:
+ static Ref<PlatformTextTrack> create(PlatformTextTrackClient* client, const String& label, const String& language, PlatformTextTrackData::TrackMode mode, PlatformTextTrackData::TrackKind kind, PlatformTextTrackData::TrackType type, int uniqueId)
+ {
+ return adoptRef(*new PlatformTextTrack(client, label, language, String(), mode, kind, type, uniqueId, false));
+ }
+
+ static Ref<PlatformTextTrack> createOutOfBand(const String& label, const String& language, const String& url, PlatformTextTrackData::TrackMode mode, PlatformTextTrackData::TrackKind kind, int uniqueId, bool isDefault)
+ {
+ return adoptRef(*new PlatformTextTrack(nullptr, label, language, url, mode, kind, PlatformTextTrackData::TrackType::OutOfBand, uniqueId, isDefault));
+ }
+
+ static Ref<PlatformTextTrack> create(PlatformTextTrackData&& data)
+ {
+ return adoptRef(*new PlatformTextTrack(WTFMove(data)));
+ }
+
+ virtual ~PlatformTextTrack() = default;
+
+ PlatformTextTrackData::TrackType type() const { return m_trackData.m_type; }
+ PlatformTextTrackData::TrackKind kind() const { return m_trackData.m_kind; }
+ PlatformTextTrackData::TrackMode mode() const { return m_trackData.m_mode; }
+ const String& label() const { return m_trackData.m_label; }
+ const String& language() const { return m_trackData.m_language; }
+ const String& url() const { return m_trackData.m_url; }
+ int uniqueId() const { return m_trackData.m_uniqueId; }
+ bool isDefault() const { return m_trackData.m_isDefault; }
+ PlatformTextTrackClient* client() const { return m_client; }
+
+ PlatformTextTrackData data() const { return m_trackData; }
+
+protected:
+ PlatformTextTrack(PlatformTextTrackClient* client, const String& label, const String& language, const String& url, PlatformTextTrackData::TrackMode mode, PlatformTextTrackData::TrackKind kind, PlatformTextTrackData::TrackType type, int uniqueId, bool isDefault)
+ : m_client(client)
+ {
+ m_trackData = {
+ label,
+ language,
+ url,
+ mode,
+ kind,
+ type,
+ uniqueId,
+ isDefault,
+ };
+ }
+
+ PlatformTextTrack(PlatformTextTrackData&& data)
+ : m_trackData(WTFMove(data))
+ {
+ }
+
+ PlatformTextTrackData m_trackData;
+ PlatformTextTrackClient* m_client;
+};
+
+} // namespace WebCore
+
+namespace WTF {
+
+template<> struct EnumTraits<WebCore::PlatformTextTrackData::TrackKind> {
+ using values = EnumValues<
+ WebCore::PlatformTextTrackData::TrackKind,
+ WebCore::PlatformTextTrackData::TrackKind::Subtitle,
+ WebCore::PlatformTextTrackData::TrackKind::Caption,
+ WebCore::PlatformTextTrackData::TrackKind::Description,
+ WebCore::PlatformTextTrackData::TrackKind::Chapter,
+ WebCore::PlatformTextTrackData::TrackKind::MetaData,
+ WebCore::PlatformTextTrackData::TrackKind::Forced
+ >;
+};
+
+template<> struct EnumTraits<WebCore::PlatformTextTrackData::TrackType> {
+ using values = EnumValues<
+ WebCore::PlatformTextTrackData::TrackType,
+ WebCore::PlatformTextTrackData::TrackType::InBand,
+ WebCore::PlatformTextTrackData::TrackType::OutOfBand,
+ WebCore::PlatformTextTrackData::TrackType::Script
+ >;
+};
+
+template<> struct EnumTraits<WebCore::PlatformTextTrackData::TrackMode> {
+ using values = EnumValues<
+ WebCore::PlatformTextTrackData::TrackMode,
+ WebCore::PlatformTextTrackData::TrackMode::Disabled,
+ WebCore::PlatformTextTrackData::TrackMode::Hidden,
+ WebCore::PlatformTextTrackData::TrackMode::Showing
+ >;
+};
+
+} // namespace WTF
+
+#endif // ENABLE(AVF_CAPTIONS)
+
+
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (267712 => 267713)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2020-09-28 20:06:52 UTC (rev 267712)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2020-09-28 20:21:03 UTC (rev 267713)
@@ -669,7 +669,7 @@
#if ENABLE(AVF_CAPTIONS)
-static const NSArray *mediaDescriptionForKind(PlatformTextTrack::TrackKind kind)
+static const NSArray *mediaDescriptionForKind(PlatformTextTrackData::TrackKind kind)
{
static bool manualSelectionMode = MTEnableCaption2015BehaviorPtr() && MTEnableCaption2015BehaviorPtr()();
if (manualSelectionMode)
@@ -676,16 +676,16 @@
return @[ AVMediaCharacteristicIsAuxiliaryContent ];
// FIXME: Match these to correct types:
- if (kind == PlatformTextTrack::Caption)
+ if (kind == PlatformTextTrackData::TrackKind::Caption)
return @[ AVMediaCharacteristicTranscribesSpokenDialogForAccessibility ];
- if (kind == PlatformTextTrack::Subtitle)
+ if (kind == PlatformTextTrackData::TrackKind::Subtitle)
return @[ AVMediaCharacteristicTranscribesSpokenDialogForAccessibility ];
- if (kind == PlatformTextTrack::Description)
+ if (kind == PlatformTextTrackData::TrackKind::Description)
return @[ AVMediaCharacteristicTranscribesSpokenDialogForAccessibility, AVMediaCharacteristicDescribesMusicAndSoundForAccessibility ];
- if (kind == PlatformTextTrack::Forced)
+ if (kind == PlatformTextTrackData::TrackKind::Forced)
return @[ AVMediaCharacteristicContainsOnlyForcedSubtitles ];
return @[ AVMediaCharacteristicTranscribesSpokenDialogForAccessibility ];
@@ -698,7 +698,7 @@
void MediaPlayerPrivateAVFoundationObjC::synchronizeTextTrackState()
{
- const Vector<RefPtr<PlatformTextTrack>>& outOfBandTrackSources = player()->outOfBandTrackSources();
+ const auto& outOfBandTrackSources = player()->outOfBandTrackSources();
for (auto& textTrack : m_textTracks) {
if (textTrack->textTrackCategory() != InbandTextTrackPrivateAVF::OutOfBand)
@@ -714,12 +714,17 @@
continue;
InbandTextTrackPrivate::Mode mode = InbandTextTrackPrivate::Mode::Hidden;
- if (track->mode() == PlatformTextTrack::Hidden)
+ switch (track->mode()) {
+ case PlatformTextTrackData::TrackMode::Hidden:
mode = InbandTextTrackPrivate::Mode::Hidden;
- else if (track->mode() == PlatformTextTrack::Disabled)
+ break;
+ case PlatformTextTrackData::TrackMode::Disabled:
mode = InbandTextTrackPrivate::Mode::Disabled;
- else if (track->mode() == PlatformTextTrack::Showing)
+ break;
+ case PlatformTextTrackData::TrackMode::Showing:
mode = InbandTextTrackPrivate::Mode::Showing;
+ break;
+ }
textTrack->setMode(mode);
break;
Modified: trunk/Source/WebKit/ChangeLog (267712 => 267713)
--- trunk/Source/WebKit/ChangeLog 2020-09-28 20:06:52 UTC (rev 267712)
+++ trunk/Source/WebKit/ChangeLog 2020-09-28 20:21:03 UTC (rev 267713)
@@ -1,3 +1,21 @@
+2020-09-28 Eric Carlson <[email protected]>
+
+ [GPUP] Out-of-band TextTracks
+ https://bugs.webkit.org/show_bug.cgi?id=217062
+ <rdar://problem/68739969>
+
+ Reviewed by Jer Noble.
+
+ * GPUProcess/media/RemoteMediaPlayerProxy.cpp:
+ (WebKit::RemoteMediaPlayerProxy::outOfBandTrackSources):
+ * GPUProcess/media/RemoteMediaPlayerProxyConfiguration.h:
+ (WebKit::RemoteMediaPlayerProxyConfiguration::encode const):
+ (WebKit::RemoteMediaPlayerProxyConfiguration::decode):
+ * Scripts/webkit/messages.py:
+ * WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:
+ (WebKit::RemoteMediaPlayerManager::createRemoteMediaPlayer):
+ * WebProcess/GPU/media/RemoteMediaPlayerManager.h:
+
2020-09-28 Devin Rousso <[email protected]>
[iOS] unable to airplay directly loaded fullscreen video
Modified: trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp (267712 => 267713)
--- trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp 2020-09-28 20:06:52 UTC (rev 267712)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp 2020-09-28 20:21:03 UTC (rev 267713)
@@ -657,8 +657,11 @@
#if ENABLE(AVF_CAPTIONS)
Vector<RefPtr<PlatformTextTrack>> RemoteMediaPlayerProxy::outOfBandTrackSources()
{
- notImplemented();
- return { };
+ Vector<RefPtr<PlatformTextTrack>> sources;
+ for (auto& data : m_configuration.outOfBandTrackData)
+ sources.append(PlatformTextTrack::create(WTFMove(data)));
+
+ return sources;
}
#endif
Modified: trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxyConfiguration.h (267712 => 267713)
--- trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxyConfiguration.h 2020-09-28 20:06:52 UTC (rev 267712)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxyConfiguration.h 2020-09-28 20:21:03 UTC (rev 267713)
@@ -28,6 +28,7 @@
#if ENABLE(GPU_PROCESS)
#include <WebCore/ContentType.h>
+#include <WebCore/PlatformTextTrack.h>
#include <WebCore/SecurityOriginData.h>
#include <wtf/text/WTFString.h>
@@ -40,6 +41,9 @@
String networkInterfaceName;
Vector<WebCore::ContentType> mediaContentTypesRequiringHardwareSupport;
Vector<String> preferredAudioCharacteristics;
+#if ENABLE(AVF_CAPTIONS)
+ Vector<WebCore::PlatformTextTrackData> outOfBandTrackData;
+#endif
WebCore::SecurityOriginData documentSecurityOrigin;
uint64_t logIdentifier { 0 };
bool shouldUsePersistentCache { false };
@@ -54,6 +58,9 @@
encoder << networkInterfaceName;
encoder << mediaContentTypesRequiringHardwareSupport;
encoder << preferredAudioCharacteristics;
+#if ENABLE(AVF_CAPTIONS)
+ encoder << outOfBandTrackData;
+#endif
encoder << documentSecurityOrigin;
encoder << logIdentifier;
encoder << shouldUsePersistentCache;
@@ -93,6 +100,13 @@
if (!preferredAudioCharacteristics)
return WTF::nullopt;
+#if ENABLE(AVF_CAPTIONS)
+ Optional<Vector<WebCore::PlatformTextTrackData>> outOfBandTrackData;
+ decoder >> outOfBandTrackData;
+ if (!outOfBandTrackData)
+ return WTF::nullopt;
+#endif
+
Optional<WebCore::SecurityOriginData> documentSecurityOrigin;
decoder >> documentSecurityOrigin;
if (!documentSecurityOrigin)
@@ -120,6 +134,9 @@
WTFMove(*networkInterfaceName),
WTFMove(*mediaContentTypesRequiringHardwareSupport),
WTFMove(*preferredAudioCharacteristics),
+#if ENABLE(AVF_CAPTIONS)
+ WTFMove(*outOfBandTrackData),
+#endif
WTFMove(*documentSecurityOrigin),
*logIdentifier,
*shouldUsePersistentCache,
Modified: trunk/Source/WebKit/Scripts/webkit/messages.py (267712 => 267713)
--- trunk/Source/WebKit/Scripts/webkit/messages.py 2020-09-28 20:06:52 UTC (rev 267712)
+++ trunk/Source/WebKit/Scripts/webkit/messages.py 2020-09-28 20:21:03 UTC (rev 267713)
@@ -623,6 +623,7 @@
'WebCore::PasteboardWebContent': ['<WebCore/Pasteboard.h>'],
'WebCore::PaymentAuthorizationResult': ['<WebCore/ApplePaySessionPaymentRequest.h>'],
'WebCore::PaymentMethodUpdate': ['<WebCore/ApplePaySessionPaymentRequest.h>'],
+ 'WebCore::PlatformTextTrackData': ['<WebCore/PlatformTextTrack.h>'],
'WebCore::PluginInfo': ['<WebCore/PluginData.h>'],
'WebCore::PluginLoadClientPolicy': ['<WebCore/PluginData.h>'],
'WebCore::PolicyAction': ['<WebCore/FrameLoaderTypes.h>'],
Modified: trunk/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp (267712 => 267713)
--- trunk/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp 2020-09-28 20:06:52 UTC (rev 267712)
+++ trunk/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp 2020-09-28 20:21:03 UTC (rev 267713)
@@ -142,7 +142,6 @@
std::unique_ptr<MediaPlayerPrivateInterface> RemoteMediaPlayerManager::createRemoteMediaPlayer(MediaPlayer* player, MediaPlayerEnums::MediaEngineIdentifier remoteEngineIdentifier)
{
-
RemoteMediaPlayerProxyConfiguration proxyConfiguration;
proxyConfiguration.referrer = player->referrer();
proxyConfiguration.userAgent = player->userAgent();
@@ -158,6 +157,11 @@
proxyConfiguration.shouldUsePersistentCache = player->shouldUsePersistentCache();
proxyConfiguration.isVideo = player->isVideoPlayer();
+#if ENABLE(AVF_CAPTIONS)
+ for (const auto& track : player->outOfBandTrackSources())
+ proxyConfiguration.outOfBandTrackData.append(track->data());
+#endif
+
auto documentSecurityOrigin = player->documentSecurityOrigin();
proxyConfiguration.documentSecurityOrigin = documentSecurityOrigin;
Modified: trunk/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.h (267712 => 267713)
--- trunk/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.h 2020-09-28 20:06:52 UTC (rev 267712)
+++ trunk/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.h 2020-09-28 20:21:03 UTC (rev 267713)
@@ -48,6 +48,7 @@
class MediaPlayerPrivateRemote;
class RemoteMediaPlayerMIMETypeCache;
class WebProcess;
+struct PlatformTextTrackData;
struct TrackPrivateRemoteConfiguration;
class RemoteMediaPlayerManager
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
