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_FILTERS_CHUNK_DEMUXER_H_ | 5 #ifndef MEDIA_FILTERS_CHUNK_DEMUXER_H_ |
6 #define MEDIA_FILTERS_CHUNK_DEMUXER_H_ | 6 #define MEDIA_FILTERS_CHUNK_DEMUXER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 double GetDuration_Locked(); | 115 double GetDuration_Locked(); |
116 | 116 |
117 // Notifies the demuxer that the duration of the media has changed to | 117 // Notifies the demuxer that the duration of the media has changed to |
118 // |duration|. | 118 // |duration|. |
119 void SetDuration(double duration); | 119 void SetDuration(double duration); |
120 | 120 |
121 // Sets a time |offset| to be applied to subsequent buffers appended to the | 121 // Sets a time |offset| to be applied to subsequent buffers appended to the |
122 // source buffer associated with |id|. Returns true if the offset is set | 122 // source buffer associated with |id|. Returns true if the offset is set |
123 // properly, false if the offset cannot be applied because we're in the | 123 // properly, false if the offset cannot be applied because we're in the |
124 // middle of parsing a media segment. | 124 // middle of parsing a media segment. |
125 bool SetTimestampOffset(const std::string& id, base::TimeDelta offset); | 125 bool SetTimestampOffset(const std::string& id, double offset); |
| 126 |
| 127 // Retrieves the current offset being applied to subsequent buffers appended |
| 128 // to the source buffer associated with |id|. |
| 129 double GetTimestampOffset(const std::string& id); |
126 | 130 |
127 // Set the append mode to be applied to subsequent buffers appended to the | 131 // Set the append mode to be applied to subsequent buffers appended to the |
128 // source buffer associated with |id|. If |sequence_mode| is true, caller | 132 // source buffer associated with |id|. If |sequence_mode| is true, caller |
129 // is requesting "sequence" mode. Otherwise, caller is requesting "segments" | 133 // is requesting "sequence" mode. Otherwise, caller is requesting "segments" |
130 // mode. Returns true if the mode update was allowed. Returns false if | 134 // mode. Returns true if the mode update was allowed. Returns false if |
131 // the mode cannot be updated because we're in the middle of parsing a media | 135 // the mode cannot be updated because we're in the middle of parsing a media |
132 // segment. | 136 // segment. |
133 // In "sequence" mode, appended media will be treated as adjacent in time. | 137 // In "sequence" mode, appended media will be treated as adjacent in time. |
134 // In "segments" mode, timestamps in appended media determine coded frame | 138 // In "segments" mode, timestamps in appended media determine coded frame |
135 // placement. | 139 // placement. |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 // removed with RemoveID() but can not be re-added (yet). | 281 // removed with RemoveID() but can not be re-added (yet). |
278 std::string source_id_audio_; | 282 std::string source_id_audio_; |
279 std::string source_id_video_; | 283 std::string source_id_video_; |
280 | 284 |
281 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); | 285 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); |
282 }; | 286 }; |
283 | 287 |
284 } // namespace media | 288 } // namespace media |
285 | 289 |
286 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ | 290 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ |
OLD | NEW |