Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(483)

Side by Side Diff: media/filters/chunk_demuxer.h

Issue 10205004: Refactoring StreamParser & StreamParserHost interfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix minor lint errors Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/base/stream_parser.h ('k') | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « media/base/stream_parser.h ('k') | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698