| 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 <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 void ChangeState_Locked(State new_state); | 81 void ChangeState_Locked(State new_state); |
| 82 | 82 |
| 83 // Reports an error and puts the demuxer in a state where it won't accept more | 83 // Reports an error and puts the demuxer in a state where it won't accept more |
| 84 // data. | 84 // data. |
| 85 void ReportError_Locked(PipelineStatus error); | 85 void ReportError_Locked(PipelineStatus error); |
| 86 | 86 |
| 87 void OnStreamParserInitDone(bool success, base::TimeDelta duration); | 87 void OnStreamParserInitDone(bool success, base::TimeDelta duration); |
| 88 | 88 |
| 89 // StreamParserHost implementation. | 89 // StreamParserHost implementation. |
| 90 virtual bool OnNewAudioConfig(const AudioDecoderConfig& config) OVERRIDE; | 90 virtual bool OnNewConfigs(const AudioDecoderConfig& audio_config, |
| 91 virtual bool OnNewVideoConfig(const VideoDecoderConfig& config) OVERRIDE; | 91 const VideoDecoderConfig& video_config) OVERRIDE; |
| 92 virtual bool OnAudioBuffers(const BufferQueue& buffer) OVERRIDE; | 92 virtual bool OnAudioBuffers(const BufferQueue& buffer) OVERRIDE; |
| 93 virtual bool OnVideoBuffers(const BufferQueue& buffer) OVERRIDE; | 93 virtual bool OnVideoBuffers(const BufferQueue& buffer) OVERRIDE; |
| 94 | 94 |
| 95 base::Lock lock_; | 95 base::Lock lock_; |
| 96 State state_; | 96 State state_; |
| 97 | 97 |
| 98 DemuxerHost* host_; | 98 DemuxerHost* host_; |
| 99 ChunkDemuxerClient* client_; | 99 ChunkDemuxerClient* client_; |
| 100 PipelineStatusCB init_cb_; | 100 PipelineStatusCB init_cb_; |
| 101 PipelineStatusCB seek_cb_; | 101 PipelineStatusCB seek_cb_; |
| 102 | 102 |
| 103 scoped_refptr<ChunkDemuxerStream> audio_; | 103 scoped_refptr<ChunkDemuxerStream> audio_; |
| 104 scoped_refptr<ChunkDemuxerStream> video_; | 104 scoped_refptr<ChunkDemuxerStream> video_; |
| 105 | 105 |
| 106 int64 buffered_bytes_; | 106 int64 buffered_bytes_; |
| 107 | 107 |
| 108 base::TimeDelta duration_; | 108 base::TimeDelta duration_; |
| 109 | 109 |
| 110 scoped_ptr<StreamParser> stream_parser_; | 110 scoped_ptr<StreamParser> stream_parser_; |
| 111 | 111 |
| 112 // Should a Seek() call wait for more data before calling the | 112 // Should a Seek() call wait for more data before calling the |
| 113 // callback. | 113 // callback. |
| 114 bool seek_waits_for_data_; | 114 bool seek_waits_for_data_; |
| 115 | 115 |
| 116 ByteQueue byte_queue_; | |
| 117 | |
| 118 // TODO(acolwell): Remove this when fixing http://crbug.com/122909 | 116 // TODO(acolwell): Remove this when fixing http://crbug.com/122909 |
| 119 std::string source_id_; | 117 std::string source_id_; |
| 120 | 118 |
| 121 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); | 119 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); |
| 122 }; | 120 }; |
| 123 | 121 |
| 124 } // namespace media | 122 } // namespace media |
| 125 | 123 |
| 126 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ | 124 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ |
| OLD | NEW |