OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 MEDIA_BASE_DEMUXER_H_ | 5 #ifndef MEDIA_BASE_DEMUXER_H_ |
6 #define MEDIA_BASE_DEMUXER_H_ | 6 #define MEDIA_BASE_DEMUXER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "media/base/data_source.h" | 15 #include "media/base/data_source.h" |
16 #include "media/base/demuxer_stream.h" | 16 #include "media/base/demuxer_stream.h" |
17 #include "media/base/demuxer_stream_provider.h" | 17 #include "media/base/demuxer_stream_provider.h" |
18 #include "media/base/eme_constants.h" | 18 #include "media/base/eme_constants.h" |
19 #include "media/base/media_export.h" | 19 #include "media/base/media_export.h" |
20 #include "media/base/media_track.h" | 20 #include "media/base/media_track.h" |
| 21 #include "media/base/pipeline_metadata.h" |
21 #include "media/base/pipeline_status.h" | 22 #include "media/base/pipeline_status.h" |
22 #include "media/base/ranges.h" | 23 #include "media/base/ranges.h" |
23 | 24 |
24 namespace media { | 25 namespace media { |
25 | 26 |
26 class TextTrackConfig; | 27 class TextTrackConfig; |
27 class MediaTracks; | 28 class MediaTracks; |
28 | 29 |
29 class MEDIA_EXPORT DemuxerHost { | 30 class MEDIA_EXPORT DemuxerHost { |
30 public: | 31 public: |
| 32 // Executed when the content metadata is known. |
| 33 virtual void OnMetadata(PipelineMetadata metadata) = 0; |
| 34 |
31 // Notify the host that buffered time ranges have changed. Note that buffered | 35 // Notify the host that buffered time ranges have changed. Note that buffered |
32 // time ranges can grow (when new media data is appended), but they can also | 36 // time ranges can grow (when new media data is appended), but they can also |
33 // shrink (when buffering reaches limit capacity and some buffered data | 37 // shrink (when buffering reaches limit capacity and some buffered data |
34 // becomes evicted, e.g. due to MSE GC algorithm, or by explicit removal of | 38 // becomes evicted, e.g. due to MSE GC algorithm, or by explicit removal of |
35 // ranges directed by MSE web app). | 39 // ranges directed by MSE web app). |
36 virtual void OnBufferedTimeRangesChanged( | 40 virtual void OnBufferedTimeRangesChanged( |
37 const Ranges<base::TimeDelta>& ranges) = 0; | 41 const Ranges<base::TimeDelta>& ranges) = 0; |
38 | 42 |
39 // Sets the duration of the media in microseconds. | 43 // Sets the duration of the media in microseconds. |
40 // Duration may be kInfiniteDuration if the duration is not known. | 44 // Duration may be kInfiniteDuration if the duration is not known. |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 const std::vector<MediaTrack::Id>& track_ids, | 149 const std::vector<MediaTrack::Id>& track_ids, |
146 base::TimeDelta currTime) = 0; | 150 base::TimeDelta currTime) = 0; |
147 | 151 |
148 private: | 152 private: |
149 DISALLOW_COPY_AND_ASSIGN(Demuxer); | 153 DISALLOW_COPY_AND_ASSIGN(Demuxer); |
150 }; | 154 }; |
151 | 155 |
152 } // namespace media | 156 } // namespace media |
153 | 157 |
154 #endif // MEDIA_BASE_DEMUXER_H_ | 158 #endif // MEDIA_BASE_DEMUXER_H_ |
OLD | NEW |