Chromium Code Reviews| 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; |