Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(948)

Unified Diff: third_party/WebKit/Source/modules/mediasource/SourceBuffer.h

Issue 1659653002: Pass MSE media track info from ChunkDemuxer to blink::SourceBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@use-media-tracks-in-media
Patch Set: CR feedback2 Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/mediasource/SourceBuffer.h
diff --git a/third_party/WebKit/Source/modules/mediasource/SourceBuffer.h b/third_party/WebKit/Source/modules/mediasource/SourceBuffer.h
index ba9512fd61b9aa3bcbb5e561b5196d2812478a0c..63fa8eefae085e31caec4649b3e29fcfb7759c8d 100644
--- a/third_party/WebKit/Source/modules/mediasource/SourceBuffer.h
+++ b/third_party/WebKit/Source/modules/mediasource/SourceBuffer.h
@@ -51,6 +51,7 @@ class GenericEventQueue;
class MediaSource;
class Stream;
class TimeRanges;
+class TrackBase;
class WebSourceBuffer;
class SourceBuffer final
@@ -102,7 +103,8 @@ public:
const AtomicString& interfaceName() const override;
// WebSourceBufferClient interface
- void initializationSegmentReceived() override;
+ WebMediaPlayer::TrackId createMediaTrack(WebMediaPlayer::TrackType, WebString, WebString, WebString, WebString) override;
philipj_slow 2016/03/24 05:56:00 The arguments should be named when not redundant w
servolk 2016/03/29 01:26:33 Done.
+ void initializationSegmentReceived(const WebVector<WebMediaPlayer::TrackId>&) override;
// Oilpan: eagerly release owned m_webSourceBuffer
EAGERLY_FINALIZE();
@@ -138,6 +140,16 @@ private:
Member<TrackDefaultList> m_trackDefaults;
RawPtrWillBeMember<GenericEventQueue> m_asyncEventQueue;
+ // The |m_pendingTracks| collection holds media track objects returned by
+ // createMediaTrack method but not yet reported to the
+ // initializationSegmentReceived. This is necessary to prevent media track
+ // objects from being GC-collected before the init segment algorithm is run.
+ HeapVector<Member<TrackBase>> m_pendingTracks;
+
+ HeapVector<WebMediaPlayer::TrackId> m_audioTrackIds;
philipj_slow 2016/03/24 05:56:00 I think these can be plain Vector<>, WebMediaPlaye
servolk 2016/03/29 01:26:33 Actually, I've just removed those in the latest pa
+ HeapVector<WebMediaPlayer::TrackId> m_videoTrackIds;
+ // TODO(servolk): Add track id collection for text tracks as well.
+
AtomicString m_mode;
bool m_updating;
double m_timestampOffset;

Powered by Google App Engine
This is Rietveld 408576698