| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 | 112 |
| 113 // StreamParser callbacks. | 113 // StreamParser callbacks. |
| 114 void OnStreamParserInitDone(bool success, base::TimeDelta duration); | 114 void OnStreamParserInitDone(bool success, base::TimeDelta duration); |
| 115 bool OnNewConfigs(bool has_audio, bool has_video, | 115 bool OnNewConfigs(bool has_audio, bool has_video, |
| 116 const AudioDecoderConfig& audio_config, | 116 const AudioDecoderConfig& audio_config, |
| 117 const VideoDecoderConfig& video_config); | 117 const VideoDecoderConfig& video_config); |
| 118 bool OnAudioBuffers(const StreamParser::BufferQueue& buffers); | 118 bool OnAudioBuffers(const StreamParser::BufferQueue& buffers); |
| 119 bool OnVideoBuffers(const StreamParser::BufferQueue& buffers); | 119 bool OnVideoBuffers(const StreamParser::BufferQueue& buffers); |
| 120 bool OnKeyNeeded(scoped_array<uint8> init_data, int init_data_size); | 120 bool OnKeyNeeded(scoped_array<uint8> init_data, int init_data_size); |
| 121 | 121 |
| 122 // Helper functions for calculating GetBufferedRanges(). |
| 123 void AddIntersectionRange( |
| 124 SourceBufferStream::TimespanList::const_iterator& itr_a, |
| 125 SourceBufferStream::TimespanList::const_iterator& itr_b, |
| 126 SourceBufferStream::TimespanList::const_iterator itr_a_end, |
| 127 SourceBufferStream::TimespanList::const_iterator itr_b_end, |
| 128 Ranges* ranges_out) const; |
| 129 SourceBufferStream::TimespanList::const_iterator next( |
| 130 SourceBufferStream::TimespanList::const_iterator itr) const; |
| 131 |
| 122 mutable base::Lock lock_; | 132 mutable base::Lock lock_; |
| 123 State state_; | 133 State state_; |
| 124 | 134 |
| 125 DemuxerHost* host_; | 135 DemuxerHost* host_; |
| 126 ChunkDemuxerClient* client_; | 136 ChunkDemuxerClient* client_; |
| 127 PipelineStatusCB init_cb_; | 137 PipelineStatusCB init_cb_; |
| 128 PipelineStatusCB seek_cb_; | 138 PipelineStatusCB seek_cb_; |
| 129 | 139 |
| 130 scoped_refptr<ChunkDemuxerStream> audio_; | 140 scoped_refptr<ChunkDemuxerStream> audio_; |
| 131 scoped_refptr<ChunkDemuxerStream> video_; | 141 scoped_refptr<ChunkDemuxerStream> video_; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 142 // removed with RemoveID() but can not be re-added (yet). | 152 // removed with RemoveID() but can not be re-added (yet). |
| 143 std::string source_id_audio_; | 153 std::string source_id_audio_; |
| 144 std::string source_id_video_; | 154 std::string source_id_video_; |
| 145 | 155 |
| 146 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); | 156 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); |
| 147 }; | 157 }; |
| 148 | 158 |
| 149 } // namespace media | 159 } // namespace media |
| 150 | 160 |
| 151 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ | 161 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ |
| OLD | NEW |