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/optional.h" |
14 #include "base/time/time.h" | 15 #include "base/time/time.h" |
15 #include "media/base/data_source.h" | 16 #include "media/base/data_source.h" |
16 #include "media/base/demuxer_stream.h" | 17 #include "media/base/demuxer_stream.h" |
17 #include "media/base/eme_constants.h" | 18 #include "media/base/eme_constants.h" |
18 #include "media/base/media_export.h" | 19 #include "media/base/media_export.h" |
19 #include "media/base/media_resource.h" | 20 #include "media/base/media_resource.h" |
20 #include "media/base/media_track.h" | 21 #include "media/base/media_track.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 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 // Returns Time represented by presentation timestamp 0. | 137 // Returns Time represented by presentation timestamp 0. |
137 // If the timstamps are not associated with a Time, then | 138 // If the timstamps are not associated with a Time, then |
138 // a null Time is returned. | 139 // a null Time is returned. |
139 virtual base::Time GetTimelineOffset() const = 0; | 140 virtual base::Time GetTimelineOffset() const = 0; |
140 | 141 |
141 // Returns the memory usage in bytes for the demuxer. | 142 // Returns the memory usage in bytes for the demuxer. |
142 virtual int64_t GetMemoryUsage() const = 0; | 143 virtual int64_t GetMemoryUsage() const = 0; |
143 | 144 |
144 virtual void OnEnabledAudioTracksChanged( | 145 virtual void OnEnabledAudioTracksChanged( |
145 const std::vector<MediaTrack::Id>& track_ids, | 146 const std::vector<MediaTrack::Id>& track_ids, |
146 base::TimeDelta currTime) = 0; | 147 base::TimeDelta curr_time) = 0; |
147 | 148 |
148 // |track_ids| is either empty or contains a single video track id. | 149 // |track_id| either contains the selected video track id or is null, |
| 150 // indicating that all video tracks are deselected/disabled. |
149 virtual void OnSelectedVideoTrackChanged( | 151 virtual void OnSelectedVideoTrackChanged( |
150 const std::vector<MediaTrack::Id>& track_ids, | 152 base::Optional<MediaTrack::Id> track_id, |
151 base::TimeDelta currTime) = 0; | 153 base::TimeDelta curr_time) = 0; |
152 | 154 |
153 private: | 155 private: |
154 DISALLOW_COPY_AND_ASSIGN(Demuxer); | 156 DISALLOW_COPY_AND_ASSIGN(Demuxer); |
155 }; | 157 }; |
156 | 158 |
157 } // namespace media | 159 } // namespace media |
158 | 160 |
159 #endif // MEDIA_BASE_DEMUXER_H_ | 161 #endif // MEDIA_BASE_DEMUXER_H_ |
OLD | NEW |