| 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 | 9 |
| 10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 void ChangeState_Locked(State new_state); | 61 void ChangeState_Locked(State new_state); |
| 62 | 62 |
| 63 // Reports an error and puts the demuxer in a state where it won't accept more | 63 // Reports an error and puts the demuxer in a state where it won't accept more |
| 64 // data. | 64 // data. |
| 65 void ReportError_Locked(PipelineStatus error); | 65 void ReportError_Locked(PipelineStatus error); |
| 66 | 66 |
| 67 void OnStreamParserInitDone(bool success, base::TimeDelta duration); | 67 void OnStreamParserInitDone(bool success, base::TimeDelta duration); |
| 68 | 68 |
| 69 // StreamParserHost implementation. | 69 // StreamParserHost implementation. |
| 70 virtual bool OnNewAudioConfig(const AudioDecoderConfig& config) OVERRIDE; | 70 virtual bool OnNewConfigs(const AudioDecoderConfig& audio_config, |
| 71 virtual bool OnNewVideoConfig(const VideoDecoderConfig& config) OVERRIDE; | 71 const VideoDecoderConfig& video_config) OVERRIDE; |
| 72 virtual bool OnAudioBuffers(const BufferQueue& buffer) OVERRIDE; | 72 virtual bool OnAudioBuffers(const BufferQueue& buffer) OVERRIDE; |
| 73 virtual bool OnVideoBuffers(const BufferQueue& buffer) OVERRIDE; | 73 virtual bool OnVideoBuffers(const BufferQueue& buffer) OVERRIDE; |
| 74 | 74 |
| 75 base::Lock lock_; | 75 base::Lock lock_; |
| 76 State state_; | 76 State state_; |
| 77 | 77 |
| 78 DemuxerHost* host_; | 78 DemuxerHost* host_; |
| 79 ChunkDemuxerClient* client_; | 79 ChunkDemuxerClient* client_; |
| 80 PipelineStatusCB init_cb_; | 80 PipelineStatusCB init_cb_; |
| 81 PipelineStatusCB seek_cb_; | 81 PipelineStatusCB seek_cb_; |
| 82 | 82 |
| 83 scoped_refptr<ChunkDemuxerStream> audio_; | 83 scoped_refptr<ChunkDemuxerStream> audio_; |
| 84 scoped_refptr<ChunkDemuxerStream> video_; | 84 scoped_refptr<ChunkDemuxerStream> video_; |
| 85 | 85 |
| 86 int64 buffered_bytes_; | 86 int64 buffered_bytes_; |
| 87 | 87 |
| 88 base::TimeDelta duration_; | 88 base::TimeDelta duration_; |
| 89 | 89 |
| 90 scoped_ptr<StreamParser> stream_parser_; | 90 scoped_ptr<StreamParser> stream_parser_; |
| 91 | 91 |
| 92 // Should a Seek() call wait for more data before calling the | 92 // Should a Seek() call wait for more data before calling the |
| 93 // callback. | 93 // callback. |
| 94 bool seek_waits_for_data_; | 94 bool seek_waits_for_data_; |
| 95 | 95 |
| 96 ByteQueue byte_queue_; | |
| 97 | |
| 98 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); | 96 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); |
| 99 }; | 97 }; |
| 100 | 98 |
| 101 } // namespace media | 99 } // namespace media |
| 102 | 100 |
| 103 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ | 101 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ |
| OLD | NEW |