OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WebSourceBufferClient_h | 5 #ifndef WebSourceBufferClient_h |
6 #define WebSourceBufferClient_h | 6 #define WebSourceBufferClient_h |
7 | 7 |
8 #include "WebMediaPlayer.h" | 8 #include "WebMediaPlayer.h" |
9 #include "WebString.h" | 9 #include "WebString.h" |
10 #include "WebVector.h" | 10 #include "WebVector.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 // Interface that the media engine uses to signal Blink's Media Source | 14 // Interface that the media engine uses to signal Blink's Media Source |
15 // extensions module. | 15 // extensions module. |
16 class WebSourceBufferClient { | 16 class WebSourceBufferClient { |
17 public: | 17 public: |
18 virtual ~WebSourceBufferClient() {} | 18 virtual ~WebSourceBufferClient() {} |
19 | 19 |
20 // Complete media track info: track type, unique track id, kind, label, langua
ge. | 20 // Complete media track info: track type, unique track id, kind, label, |
| 21 // language. |
21 struct MediaTrackInfo { | 22 struct MediaTrackInfo { |
22 WebMediaPlayer::TrackType trackType; | 23 WebMediaPlayer::TrackType trackType; |
23 WebMediaPlayer::TrackId id; | 24 WebMediaPlayer::TrackId id; |
24 WebString byteStreamTrackID; | 25 WebString byteStreamTrackID; |
25 WebString kind; | 26 WebString kind; |
26 WebString label; | 27 WebString label; |
27 WebString language; | 28 WebString language; |
28 }; | 29 }; |
29 | 30 |
30 // Notifies SourceBuffer that parsing of a new init segment has been completed
successfully. The input parameter is a collection | 31 // Notifies SourceBuffer that parsing of a new init segment has been completed |
31 // of information about media tracks found in the new init segment. The return
value is true in case of success. | 32 // successfully. The input parameter is a collection of information about |
| 33 // media tracks found in the new init segment. The return value is true in |
| 34 // case of success. |
32 virtual bool initializationSegmentReceived( | 35 virtual bool initializationSegmentReceived( |
33 const WebVector<MediaTrackInfo>& tracks) = 0; | 36 const WebVector<MediaTrackInfo>& tracks) = 0; |
34 }; | 37 }; |
35 | 38 |
36 } // namespace blink | 39 } // namespace blink |
37 | 40 |
38 #endif // WebSourceBufferClient_h | 41 #endif // WebSourceBufferClient_h |
OLD | NEW |