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

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

Issue 149475: Replaced DCHECKs to use MessageLoop::current() for FFmpegDemuxer and DecoderBase. (Closed)
Patch Set: Created 11 years, 5 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
« 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // MediaFilter implementation. 121 // MediaFilter implementation.
122 virtual void Stop(); 122 virtual void Stop();
123 virtual void Seek(base::TimeDelta time); 123 virtual void Seek(base::TimeDelta time);
124 124
125 // Demuxer implementation. 125 // Demuxer implementation.
126 virtual bool Initialize(DataSource* data_source); 126 virtual bool Initialize(DataSource* data_source);
127 virtual size_t GetNumberOfStreams(); 127 virtual size_t GetNumberOfStreams();
128 virtual scoped_refptr<DemuxerStream> GetStream(int stream_id); 128 virtual scoped_refptr<DemuxerStream> GetStream(int stream_id);
129 129
130 private: 130 private:
131 // Allow FFmpegDemuxerStream to post tasks to our message loop.
132 friend class FFmpegDemuxerStream;
133
134 // Only allow a factory to create this class. 131 // Only allow a factory to create this class.
135 friend class FilterFactoryImpl0<FFmpegDemuxer>; 132 friend class FilterFactoryImpl0<FFmpegDemuxer>;
136 FFmpegDemuxer(); 133 FFmpegDemuxer();
137 virtual ~FFmpegDemuxer(); 134 virtual ~FFmpegDemuxer();
138 135
139 // Carries out initialization on the demuxer thread. 136 // Carries out initialization on the demuxer thread.
140 void InititalizeTask(DataSource* data_source); 137 void InititalizeTask(DataSource* data_source);
141 138
142 // Carries out a seek on the demuxer thread. 139 // Carries out a seek on the demuxer thread.
143 void SeekTask(base::TimeDelta time); 140 void SeekTask(base::TimeDelta time);
(...skipping 30 matching lines...) Expand all
174 // representing unsupported streams where we throw away the data. 171 // representing unsupported streams where we throw away the data.
175 // 172 //
176 // Ownership is handled via reference counting. 173 // Ownership is handled via reference counting.
177 // 174 //
178 // Once initialized, operations on FFmpegDemuxerStreams should be carried out 175 // Once initialized, operations on FFmpegDemuxerStreams should be carried out
179 // on the demuxer thread. 176 // on the demuxer thread.
180 typedef std::vector< scoped_refptr<FFmpegDemuxerStream> > StreamVector; 177 typedef std::vector< scoped_refptr<FFmpegDemuxerStream> > StreamVector;
181 StreamVector streams_; 178 StreamVector streams_;
182 StreamVector packet_streams_; 179 StreamVector packet_streams_;
183 180
184 // Used for debugging.
185 PlatformThreadId thread_id_;
186
187 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); 181 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer);
188 }; 182 };
189 183
190 } // namespace media 184 } // namespace media
191 185
192 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ 186 #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