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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 // buffered ranges. | 129 // buffered ranges. |
130 Ranges<base::TimeDelta> ComputeIntersection() const; | 130 Ranges<base::TimeDelta> ComputeIntersection() const; |
131 | 131 |
132 // Applies |time_offset| to the timestamps of |buffers|. | 132 // Applies |time_offset| to the timestamps of |buffers|. |
133 void AdjustBufferTimestamps(const StreamParser::BufferQueue& buffers, | 133 void AdjustBufferTimestamps(const StreamParser::BufferQueue& buffers, |
134 base::TimeDelta timestamp_offset); | 134 base::TimeDelta timestamp_offset); |
135 | 135 |
136 // Returns true if |source_id| is valid, false otherwise. | 136 // Returns true if |source_id| is valid, false otherwise. |
137 bool IsValidId(const std::string& source_id) const; | 137 bool IsValidId(const std::string& source_id) const; |
138 | 138 |
| 139 // Sets |duration_| to |new_duration| and notifies |host_|. |
| 140 void UpdateDuration(base::TimeDelta new_duration); |
| 141 |
139 mutable base::Lock lock_; | 142 mutable base::Lock lock_; |
140 State state_; | 143 State state_; |
141 | 144 |
142 DemuxerHost* host_; | 145 DemuxerHost* host_; |
143 ChunkDemuxerClient* client_; | 146 ChunkDemuxerClient* client_; |
144 PipelineStatusCB init_cb_; | 147 PipelineStatusCB init_cb_; |
145 PipelineStatusCB seek_cb_; | 148 PipelineStatusCB seek_cb_; |
146 | 149 |
147 scoped_refptr<ChunkDemuxerStream> audio_; | 150 scoped_refptr<ChunkDemuxerStream> audio_; |
148 scoped_refptr<ChunkDemuxerStream> video_; | 151 scoped_refptr<ChunkDemuxerStream> video_; |
(...skipping 18 matching lines...) Expand all Loading... |
167 std::string source_id_video_; | 170 std::string source_id_video_; |
168 | 171 |
169 base::TimeDelta start_time_; | 172 base::TimeDelta start_time_; |
170 | 173 |
171 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); | 174 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); |
172 }; | 175 }; |
173 | 176 |
174 } // namespace media | 177 } // namespace media |
175 | 178 |
176 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ | 179 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ |
OLD | NEW |