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

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

Issue 6969026: Convert Filter::Seek() to use new callback system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More CR fixes Created 9 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/filters/decoder_base.h ('k') | media/filters/ffmpeg_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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Implements the Demuxer interface using FFmpeg's libavformat. At this time 5 // Implements the Demuxer interface using FFmpeg's libavformat. At this time
6 // will support demuxing any audio/video format thrown at it. The streams 6 // will support demuxing any audio/video format thrown at it. The streams
7 // output mime types audio/x-ffmpeg and video/x-ffmpeg and include an integer 7 // output mime types audio/x-ffmpeg and video/x-ffmpeg and include an integer
8 // key FFmpegCodecID which contains the CodecID enumeration value. The CodecIDs 8 // key FFmpegCodecID which contains the CodecID enumeration value. The CodecIDs
9 // can be used to create and initialize the corresponding FFmpeg decoder. 9 // can be used to create and initialize the corresponding FFmpeg decoder.
10 // 10 //
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 virtual ~FFmpegDemuxer(); 135 virtual ~FFmpegDemuxer();
136 136
137 // Posts a task to perform additional demuxing. 137 // Posts a task to perform additional demuxing.
138 virtual void PostDemuxTask(); 138 virtual void PostDemuxTask();
139 139
140 void Initialize( 140 void Initialize(
141 DataSource* data_source, PipelineStatusCallback* callback); 141 DataSource* data_source, PipelineStatusCallback* callback);
142 142
143 // Filter implementation. 143 // Filter implementation.
144 virtual void Stop(FilterCallback* callback); 144 virtual void Stop(FilterCallback* callback);
145 virtual void Seek(base::TimeDelta time, FilterCallback* callback); 145 virtual void Seek(base::TimeDelta time, const FilterStatusCB& cb);
146 virtual void OnAudioRendererDisabled(); 146 virtual void OnAudioRendererDisabled();
147 virtual void set_host(FilterHost* filter_host); 147 virtual void set_host(FilterHost* filter_host);
148 virtual void SetPlaybackRate(float playback_rate); 148 virtual void SetPlaybackRate(float playback_rate);
149 virtual void SetPreload(Preload preload); 149 virtual void SetPreload(Preload preload);
150 150
151 // Demuxer implementation. 151 // Demuxer implementation.
152 virtual scoped_refptr<DemuxerStream> GetStream(DemuxerStream::Type type); 152 virtual scoped_refptr<DemuxerStream> GetStream(DemuxerStream::Type type);
153 153
154 // FFmpegProtocol implementation. 154 // FFmpegProtocol implementation.
155 virtual int Read(int size, uint8* data); 155 virtual int Read(int size, uint8* data);
156 virtual bool GetPosition(int64* position_out); 156 virtual bool GetPosition(int64* position_out);
157 virtual bool SetPosition(int64 position); 157 virtual bool SetPosition(int64 position);
158 virtual bool GetSize(int64* size_out); 158 virtual bool GetSize(int64* size_out);
159 virtual bool IsStreaming(); 159 virtual bool IsStreaming();
160 160
161 // Provide access to FFmpegDemuxerStream. 161 // Provide access to FFmpegDemuxerStream.
162 MessageLoop* message_loop(); 162 MessageLoop* message_loop();
163 163
164 private: 164 private:
165 // Only allow a factory to create this class. 165 // Only allow a factory to create this class.
166 friend class MockFFmpegDemuxer; 166 friend class MockFFmpegDemuxer;
167 FRIEND_TEST_ALL_PREFIXES(FFmpegDemuxerTest, ProtocolRead); 167 FRIEND_TEST_ALL_PREFIXES(FFmpegDemuxerTest, ProtocolRead);
168 168
169 // Carries out initialization on the demuxer thread. 169 // Carries out initialization on the demuxer thread.
170 void InitializeTask( 170 void InitializeTask(
171 DataSource* data_source, PipelineStatusCallback* callback); 171 DataSource* data_source, PipelineStatusCallback* callback);
172 172
173 // Carries out a seek on the demuxer thread. 173 // Carries out a seek on the demuxer thread.
174 void SeekTask(base::TimeDelta time, FilterCallback* callback); 174 void SeekTask(base::TimeDelta time, const FilterStatusCB& cb);
175 175
176 // Carries out demuxing and satisfying stream reads on the demuxer thread. 176 // Carries out demuxing and satisfying stream reads on the demuxer thread.
177 void DemuxTask(); 177 void DemuxTask();
178 178
179 // Carries out stopping the demuxer streams on the demuxer thread. 179 // Carries out stopping the demuxer streams on the demuxer thread.
180 void StopTask(FilterCallback* callback); 180 void StopTask(FilterCallback* callback);
181 181
182 // Carries out disabling the audio stream on the demuxer thread. 182 // Carries out disabling the audio stream on the demuxer thread.
183 void DisableAudioStreamTask(); 183 void DisableAudioStreamTask();
184 184
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 // store these bits for deferred reporting to the FilterHost when we get one. 245 // store these bits for deferred reporting to the FilterHost when we get one.
246 base::TimeDelta max_duration_; 246 base::TimeDelta max_duration_;
247 PipelineStatus deferred_status_; 247 PipelineStatus deferred_status_;
248 248
249 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); 249 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer);
250 }; 250 };
251 251
252 } // namespace media 252 } // namespace media
253 253
254 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ 254 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_
OLDNEW
« no previous file with comments | « media/filters/decoder_base.h ('k') | media/filters/ffmpeg_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698