Index: third_party/WebKit/public/platform/WebSourceBufferClient.h |
diff --git a/third_party/WebKit/public/platform/WebSourceBufferClient.h b/third_party/WebKit/public/platform/WebSourceBufferClient.h |
index 849f2824bac215a5f44ac48dda0319e928ed3d7f..daecff9b4472db000aba7979bfa076e1d51002d9 100644 |
--- a/third_party/WebKit/public/platform/WebSourceBufferClient.h |
+++ b/third_party/WebKit/public/platform/WebSourceBufferClient.h |
@@ -5,14 +5,26 @@ |
#ifndef WebSourceBufferClient_h |
#define WebSourceBufferClient_h |
+#include "WebMediaPlayer.h" |
+#include "WebString.h" |
+#include "WebVector.h" |
+ |
namespace blink { |
class WebSourceBufferClient { |
public: |
virtual ~WebSourceBufferClient() { } |
- // FIXME: Add a track collection parameter here. |
- virtual void initializationSegmentReceived() = 0; |
+ // Creates a new media track of a given type with given properties (id, kind, label, language) for this SourceBuffer and |
+ // places it into a collection of pending SB tracks. This notifies SourceBuffer to expect the newly created track to be |
+ // used in a new init segment. This function returns a unique blink media track id, which is used to identify media track |
+ // in WebMediaPlayer::enabledAudioTracksChanged and WebMediaPlayer::selectedVideoTrackChanged. |
+ virtual WebMediaPlayer::TrackId createMediaTrack(WebMediaPlayer::TrackType, WebString, WebString, WebString, WebString) = 0; |
+ |
+ // Notifies SourceBuffer that parsing of a new init segment has been completed successfully. The media tracks encountered |
+ // in the new init segment has been created via createMediaTrack above. The input parameter is a vector of TrackIds |
+ // specifying media track order in the init segment. |
+ virtual void initializationSegmentReceived(const WebVector<WebMediaPlayer::TrackId>&) = 0; |
}; |
} // namespace blink |