From ad15255ae7caa863e7d7ad5c975ce266ebece5de Mon Sep 17 00:00:00 2001 From: Philippe Normand Date: Thu, 14 Dec 2023 03:41:38 -0800 Subject: [PATCH] REGRESSION(271921@main): [GStreamer] ASSERTION FAILED: !HashTranslator::equal(KeyTraits::emptyValue(), key) https://bugs.webkit.org/show_bug.cgi?id=266333 Reviewed by Xabier Rodriguez-Calvar. HashMap doesn't like to store key that evaluate to false, so a TrackID with value 0 would trigger an ASSERT. So switch back to unordered_map for tracks storage, and avoid std::views for access, which is not available in clang-14. * LayoutTests/platform/glib/TestExpectations: * Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp: (WebCore::MediaSourcePrivateGStreamer::startPlaybackIfHasAllTracks): * Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp: (WebCore::SourceBufferPrivateGStreamer::removedFromMediaSource): (WebCore::SourceBufferPrivateGStreamer::flush): (WebCore::SourceBufferPrivateGStreamer::enqueueSample): (WebCore::SourceBufferPrivateGStreamer::isReadyForMoreSamples): (WebCore::SourceBufferPrivateGStreamer::notifyClientWhenReadyForMoreSamples): (WebCore::SourceBufferPrivateGStreamer::allSamplesInTrackEnqueued): (WebCore::SourceBufferPrivateGStreamer::precheckInitializationSegment): * Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h: Canonical link: https://commits.webkit.org/272028@main --- LayoutTests/platform/glib/TestExpectations | 77 ++++--------------- .../mse/MediaSourcePrivateGStreamer.cpp | 3 +- .../mse/SourceBufferPrivateGStreamer.cpp | 20 ++--- .../mse/SourceBufferPrivateGStreamer.h | 7 +- 4 files changed, 33 insertions(+), 74 deletions(-) diff --git a/LayoutTests/platform/glib/TestExpectations b/LayoutTests/platform/glib/TestExpectations index 0377bd7f2b474..0c321329f8386 100644 --- a/LayoutTests/platform/glib/TestExpectations +++ b/LayoutTests/platform/glib/TestExpectations @@ -1089,9 +1089,8 @@ webkit.org/b/228820 media/media-source/media-mp4-h264-partial-abort.html [ Failu webkit.org/b/224767 imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-implicit.html [ Crash Pass ] # See also bug #175578. -# Uncomment when webkit.org/b/266333 is fixed -#webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-avtracks.html [ Failure ] -#webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-buffered.html [ Failure ] +webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-avtracks.html [ Failure ] +webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-buffered.html [ Failure ] webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-changetype.html [ Failure Crash ] # Crash is webkit.org/b/176020. @@ -1101,8 +1100,7 @@ webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-dur webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-endofstream.html [ Failure ] webkit.org/b/210486 imported/w3c/web-platform-tests/media-source/mediasource-correct-frames-after-reappend.html [ Failure ] -# Uncomment when webkit.org/b/266333 is fixed -#webkit.org/b/226804 imported/w3c/web-platform-tests/media-source/mediasource-changetype-play.html [ Failure ] +webkit.org/b/226804 imported/w3c/web-platform-tests/media-source/mediasource-changetype-play.html [ Failure ] webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-trackdefaultlist.html [ Failure ] webkit.org/b/210341 media/media-source/media-mp4-h264-sequence-mode.html [ Failure ] @@ -2389,9 +2387,8 @@ webkit.org/b/190991 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4 webkit.org/b/190991 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-persistent-usage-record.https.html [ Skip ] webkit.org/b/190991 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-destroy-persistent-license.https.html [ Skip ] webkit.org/b/190991 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-persistent-usage-record.https.html [ Skip ] -# Uncomment when webkit.org/b/266333 is fixed -#webkit.org/b/211840 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-persistent-license.https.html [ Failure ] -#webkit.org/b/211840 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-destroy-persistent-license.https.html [ Failure ] +webkit.org/b/211840 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-persistent-license.https.html [ Failure ] +webkit.org/b/211840 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-destroy-persistent-license.https.html [ Failure ] webkit.org/b/211375 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-clear-encrypted-segmented.https.html [ Skip ] webkit.org/b/210113 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-reset-src-after-setmediakeys.https.html [ Failure ] webkit.org/b/178707 imported/w3c/web-platform-tests/encrypted-media/encrypted-media-default-feature-policy.https.sub.html [ Skip ] @@ -2404,34 +2401,29 @@ imported/w3c/web-platform-tests/encrypted-media/clearkey-events-session-closed-e imported/w3c/web-platform-tests/encrypted-media/clearkey-invalid-license.https.html [ Pass ] imported/w3c/web-platform-tests/encrypted-media/clearkey-keystatuses.https.html [ Pass ] imported/w3c/web-platform-tests/encrypted-media/clearkey-keystatuses-multiple-sessions.https.html [ Pass ] -# Uncomment when webkit.org/b/266333 is fixed -#imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-clear-encrypted.https.html [ Pass ] -#imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-encrypted-clear.https.html [ Pass ] -#imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-encrypted-clear-sources.https.html [ Pass ] -#imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-events.https.html [ Pass ] -#imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey.https.html [ Pass ] +imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-clear-encrypted.https.html [ Pass ] +imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-encrypted-clear.https.html [ Pass ] +imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-encrypted-clear-sources.https.html [ Pass ] +imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-events.https.html [ Pass ] +imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey.https.html [ Pass ] imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey-sequential.https.html [ Crash Failure Pass ] -# Uncomment when webkit.org/b/266333 is fixed -#imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multisession.https.html [ Pass ] -#imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-after-src.https.html [ Pass ] -#imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-after-update.https.html [ Pass ] -#imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-onencrypted.https.html [ Pass ] +imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multisession.https.html [ Pass ] +imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-after-src.https.html [ Pass ] +imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-after-update.https.html [ Pass ] +imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-onencrypted.https.html [ Pass ] imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-two-videos.https.html [ Crash Failure Pass ] -# Uncomment when webkit.org/b/266333 is fixed -#imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-waitingforkey.https.html [ Pass ] +imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-waitingforkey.https.html [ Pass ] imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-requestmediakeysystemaccess.https.html [ Crash Failure Pass ] imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-at-same-time.https.html [ Pass ] imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys.https.html [ Pass ] imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-multiple-times-with-different-mediakeys.https.html [ Pass ] -# Uncomment when webkit.org/b/266333 is fixed -#imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-multiple-times-with-the-same-mediakeys.https.html [ Pass ] +imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-multiple-times-with-the-same-mediakeys.https.html [ Pass ] imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-syntax-mediakeysession.https.html [ Pass ] imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-syntax-mediakeys.https.html [ Pass ] imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-syntax-mediakeysystemaccess.https.html [ Pass ] imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-unique-origin.https.html [ Pass ] imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-update-disallowed-input.https.html [ Pass ] -# Uncomment when webkit.org/b/266333 is fixed -#imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-waiting-for-a-key.https.html [ Pass ] +imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-waiting-for-a-key.https.html [ Pass ] imported/w3c/web-platform-tests/encrypted-media/clearkey-not-callable-after-createsession.https.html [ Pass ] imported/w3c/web-platform-tests/encrypted-media/clearkey-update-non-ascii-input.https.html [ Pass ] @@ -3741,41 +3733,6 @@ webkit.org/b/264680 webgl/webgl-visible-after-context-restore.html [ ImageOnlyFa webkit.org/b/265942 imported/w3c/web-platform-tests/editing/run [ Slow ] -webkit.org/b/266333 fast/canvas/webgl/texImage2D-mse-flipY-false.html [ Failure Crash ] -webkit.org/b/266333 fast/canvas/webgl/texImage2D-mse-flipY-true.html [ Failure Crash ] -webkit.org/b/266333 fast/canvas/webgl/texImage2D-mse-in-dom-flipY-false.html [ Failure Crash ] -webkit.org/b/266333 fast/canvas/webgl/texImage2D-mse-in-dom-flipY-true.html [ Failure Crash ] -webkit.org/b/266333 http/tests/media/media-source/media-source-video-fit-fill.html [ Failure Crash ] -webkit.org/b/266333 http/tests/media/media-source/mediasource-play-then-seek-back-with-remote-control.html [ Failure Crash ] -webkit.org/b/266333 http/tests/media/media-source/mediasource-rvfc.html [ Failure Crash ] -webkit.org/b/266333 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-destroy-persistent-license.https.html [ Failure Crash ] -webkit.org/b/266333 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-persistent-license.https.html [ Failure Timeout Crash ] -webkit.org/b/266333 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-clear-encrypted.https.html [ Failure Crash ] -webkit.org/b/266333 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-encrypted-clear-sources.https.html [ Crash ] -webkit.org/b/266333 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-encrypted-clear.https.html [ Failure Timeout Crash ] -webkit.org/b/266333 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-events.https.html [ Failure Crash ] -webkit.org/b/266333 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey.https.html [ Failure Crash ] -webkit.org/b/266333 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multisession.https.html [ Failure Crash ] -webkit.org/b/266333 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-after-src.https.html [ Pass Crash ] -webkit.org/b/266333 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-after-update.https.html [ Crash ] -webkit.org/b/266333 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-onencrypted.https.html [ Failure Crash ] -webkit.org/b/266333 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-waitingforkey.https.html [ Failure Crash ] -webkit.org/b/266333 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-multiple-times-with-the-same-mediakeys.https.html [ Pass Crash ] -webkit.org/b/266333 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-waiting-for-a-key.https.html [ Failure Crash ] -webkit.org/b/266333 imported/w3c/web-platform-tests/media-source/mediasource-activesourcebuffers.html [ Pass Crash ] -webkit.org/b/266333 imported/w3c/web-platform-tests/media-source/mediasource-append-buffer.html [ Crash ] -webkit.org/b/266333 imported/w3c/web-platform-tests/media-source/mediasource-appendbuffer-quota-exceeded.html [ Pass Crash ] -webkit.org/b/266333 imported/w3c/web-platform-tests/media-source/mediasource-appendwindow.html [ Crash ] -webkit.org/b/266333 imported/w3c/web-platform-tests/media-source/mediasource-avtracks.html [ Failure Crash ] -webkit.org/b/266333 imported/w3c/web-platform-tests/media-source/mediasource-buffered-seek.html [ Crash ] -webkit.org/b/266333 imported/w3c/web-platform-tests/media-source/mediasource-buffered.html [ Crash ] -webkit.org/b/266333 imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-without-codecs-parameter.html [ Pass Crash ] -webkit.org/b/266333 imported/w3c/web-platform-tests/media-source/mediasource-changetype-play.html [ Failure Crash ] -webkit.org/b/266333 imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-a-bitrate.html [ Crash ] -webkit.org/b/266333 imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-av-audio-bitrate.html [ Crash ] -webkit.org/b/266333 imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-av-framesize.html [ Crash ] -webkit.org/b/266333 imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-av-video-bitrate.html [ Crash ] - # End: Common failures between GTK and WPE. #//////////////////////////////////////////////////////////////////////////////////////// diff --git a/Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp index 7bf32ae856a41..6990f1be20bdf 100644 --- a/Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp +++ b/Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp @@ -164,7 +164,8 @@ void MediaSourcePrivateGStreamer::startPlaybackIfHasAllTracks() Vector> tracks; for (auto& privateSourceBuffer : m_sourceBuffers) { auto sourceBuffer = downcast(privateSourceBuffer); - tracks.appendRange(sourceBuffer->tracks().begin(), sourceBuffer->tracks().end()); + for (auto& [_, track] : sourceBuffer->tracks()) + tracks.append(track); } m_playerPrivate.startSource(tracks); } diff --git a/Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp index 5a287f8484022..fc9892cb3b6ab 100644 --- a/Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp +++ b/Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp @@ -121,7 +121,7 @@ void SourceBufferPrivateGStreamer::removedFromMediaSource() { ASSERT(isMainThread()); - for (auto& track : tracks()) + for (auto& [_, track] : tracks()) track->remove(); m_hasBeenRemovedFromMediaSource = true; @@ -141,7 +141,7 @@ void SourceBufferPrivateGStreamer::flush(TrackID trackId) return; ASSERT(m_tracks.contains(trackId)); - MediaSourceTrackGStreamer* track = m_tracks.get(trackId); + auto track = m_tracks[trackId]; if (!downcast(mediaSource)->hasAllTracks()) { GST_DEBUG_OBJECT(m_playerPrivate.pipeline(), "Source element has not emitted tracks yet, so we only need to clear the queue. trackId = '%s'", track->stringId().string().utf8().data()); track->clearQueue(); @@ -166,7 +166,7 @@ void SourceBufferPrivateGStreamer::enqueueSample(Ref&& sample, Trac GST_TIME_ARGS(WebCore::toGstClockTime(sample->duration()))); ASSERT(m_tracks.contains(trackId)); - MediaSourceTrackGStreamer* track = m_tracks.get(trackId); + auto track = m_tracks[trackId]; track->enqueueObject(adoptGRef(GST_MINI_OBJECT(gstSample.leakRef()))); } @@ -174,7 +174,7 @@ bool SourceBufferPrivateGStreamer::isReadyForMoreSamples(TrackID trackId) { ASSERT(isMainThread()); ASSERT(m_tracks.contains(trackId)); - MediaSourceTrackGStreamer* track = m_tracks.get(trackId); + auto track = m_tracks[trackId]; bool ret = track->isReadyForMoreSamples(); GST_TRACE_OBJECT(m_playerPrivate.pipeline(), "isReadyForMoreSamples: %s", boolForPrinting(ret)); return ret; @@ -184,7 +184,7 @@ void SourceBufferPrivateGStreamer::notifyClientWhenReadyForMoreSamples(TrackID t { ASSERT(isMainThread()); ASSERT(m_tracks.contains(trackId)); - MediaSourceTrackGStreamer* track = m_tracks.get(trackId); + auto track = m_tracks[trackId]; track->notifyWhenReadyForMoreSamples([protectedThis = Ref { *this }, this, trackId]() mutable { RunLoop::main().dispatch([protectedThis = WTFMove(protectedThis), this, trackId]() { if (!m_hasBeenRemovedFromMediaSource) @@ -197,7 +197,7 @@ void SourceBufferPrivateGStreamer::allSamplesInTrackEnqueued(TrackID trackId) { ASSERT(isMainThread()); ASSERT(m_tracks.contains(trackId)); - MediaSourceTrackGStreamer* track = m_tracks.get(trackId); + auto track = m_tracks[trackId]; GST_DEBUG_OBJECT(m_playerPrivate.pipeline(), "Enqueueing EOS for track '%s'", track->stringId().string().utf8().data()); track->enqueueObject(adoptGRef(GST_MINI_OBJECT(gst_event_new_eos()))); } @@ -209,21 +209,21 @@ bool SourceBufferPrivateGStreamer::precheckInitializationSegment(const Initializ GRefPtr initialCaps = videoTrackInfo->initialCaps(); ASSERT(initialCaps); if (!m_tracks.contains(trackInfo.track->id())) - m_tracks.add(trackInfo.track->id(), MediaSourceTrackGStreamer::create(TrackPrivateBaseGStreamer::TrackType::Video, trackInfo.track->id(), videoTrackInfo->stringId(), WTFMove(initialCaps))); + m_tracks.try_emplace(trackInfo.track->id(), MediaSourceTrackGStreamer::create(TrackPrivateBaseGStreamer::TrackType::Video, trackInfo.track->id(), videoTrackInfo->stringId(), WTFMove(initialCaps))); } for (auto& trackInfo : segment.audioTracks) { auto* audioTrackInfo = static_cast(trackInfo.track.get()); GRefPtr initialCaps = audioTrackInfo->initialCaps(); ASSERT(initialCaps); if (!m_tracks.contains(trackInfo.track->id())) - m_tracks.add(trackInfo.track->id(), MediaSourceTrackGStreamer::create(TrackPrivateBaseGStreamer::TrackType::Audio, trackInfo.track->id(), audioTrackInfo->stringId(), WTFMove(initialCaps))); + m_tracks.try_emplace(trackInfo.track->id(), MediaSourceTrackGStreamer::create(TrackPrivateBaseGStreamer::TrackType::Audio, trackInfo.track->id(), audioTrackInfo->stringId(), WTFMove(initialCaps))); } for (auto& trackInfo : segment.textTracks) { auto* textTrackInfo = static_cast(trackInfo.track.get()); GRefPtr initialCaps = textTrackInfo->initialCaps(); ASSERT(initialCaps); if (!m_tracks.contains(trackInfo.track->id())) - m_tracks.add(trackInfo.track->id(), MediaSourceTrackGStreamer::create(TrackPrivateBaseGStreamer::TrackType::Text, trackInfo.track->id(), textTrackInfo->stringId(), WTFMove(initialCaps))); + m_tracks.try_emplace(trackInfo.track->id(), MediaSourceTrackGStreamer::create(TrackPrivateBaseGStreamer::TrackType::Text, trackInfo.track->id(), textTrackInfo->stringId(), WTFMove(initialCaps))); } return true; @@ -313,7 +313,7 @@ size_t SourceBufferPrivateGStreamer::platformMaximumBufferSize() const bool hasText = false; size_t bufferSize = 0; - for (auto track : m_tracks.values()) { + for (auto& [_, track] : m_tracks) { switch (track->type()) { case TrackPrivateBaseGStreamer::Video: hasVideo = true; diff --git a/Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h b/Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h index f9fe0d94f689e..10b01f02f31fd 100644 --- a/Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h +++ b/Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h @@ -38,12 +38,14 @@ #include "ContentType.h" #include "MediaPlayerPrivateGStreamerMSE.h" +#include "MediaSourceTrackGStreamer.h" #include "SourceBufferPrivate.h" #include "SourceBufferPrivateClient.h" #include "TrackPrivateBaseGStreamer.h" #include "WebKitMediaSourceGStreamer.h" #include #include +#include namespace WebCore { @@ -51,7 +53,6 @@ using TrackID = uint64_t; class AppendPipeline; class MediaSourcePrivateGStreamer; -class MediaSourceTrackGStreamer; class SourceBufferPrivateGStreamer final : public SourceBufferPrivate { public: @@ -76,7 +77,7 @@ class SourceBufferPrivateGStreamer final : public SourceBufferPrivate { void didReceiveAllPendingSamples(); void appendParsingFailed(); - HashMap>::ValuesIteratorRange tracks() { return m_tracks.values(); } + auto& tracks() const { return m_tracks; } ContentType type() const { return m_type; } @@ -103,7 +104,7 @@ class SourceBufferPrivateGStreamer final : public SourceBufferPrivate { ContentType m_type; MediaPlayerPrivateGStreamerMSE& m_playerPrivate; UniqueRef m_appendPipeline; - HashMap> m_tracks; + StdUnorderedMap> m_tracks; std::optional m_appendPromise; #if !RELEASE_LOG_DISABLED