| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 std::vector<std::string>& codecs); | 92 std::vector<std::string>& codecs); |
| 93 | 93 |
| 94 // Removed an ID & associated resources that were previously added with | 94 // Removed an ID & associated resources that were previously added with |
| 95 // AddId(). | 95 // AddId(). |
| 96 void RemoveId(const std::string& id); | 96 void RemoveId(const std::string& id); |
| 97 | 97 |
| 98 // Gets the currently buffered ranges for the specified ID. | 98 // Gets the currently buffered ranges for the specified ID. |
| 99 Ranges<base::TimeDelta> GetBufferedRanges(const std::string& id) const; | 99 Ranges<base::TimeDelta> GetBufferedRanges(const std::string& id) const; |
| 100 | 100 |
| 101 // Appends media data to the source buffer associated with |id|. | 101 // Appends media data to the source buffer associated with |id|. |
| 102 void AppendData(const std::string& id, const uint8* data, size_t length); | 102 // Appending may update |*timestamp_offset| if |timestamp_offset| is not NULL. |
| 103 void AppendData(const std::string& id, const uint8* data, size_t length, |
| 104 double* timestamp_offset); |
| 103 | 105 |
| 104 // Aborts parsing the current segment and reset the parser to a state where | 106 // Aborts parsing the current segment and reset the parser to a state where |
| 105 // it can accept a new segment. | 107 // it can accept a new segment. |
| 106 void Abort(const std::string& id); | 108 void Abort(const std::string& id); |
| 107 | 109 |
| 108 // Remove buffers between |start| and |end| for the source buffer | 110 // Remove buffers between |start| and |end| for the source buffer |
| 109 // associated with |id|. | 111 // associated with |id|. |
| 110 void Remove(const std::string& id, base::TimeDelta start, | 112 void Remove(const std::string& id, base::TimeDelta start, |
| 111 base::TimeDelta end); | 113 base::TimeDelta end); |
| 112 | 114 |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 // removed with RemoveID() but can not be re-added (yet). | 275 // removed with RemoveID() but can not be re-added (yet). |
| 274 std::string source_id_audio_; | 276 std::string source_id_audio_; |
| 275 std::string source_id_video_; | 277 std::string source_id_video_; |
| 276 | 278 |
| 277 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); | 279 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); |
| 278 }; | 280 }; |
| 279 | 281 |
| 280 } // namespace media | 282 } // namespace media |
| 281 | 283 |
| 282 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ | 284 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ |
| OLD | NEW |