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

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

Issue 126306: Refactor FFmpegDemuxerTest to use gmock and eliminate flakiness. (Closed)
Patch Set: Added SCOPED_TRACE Created 11 years, 6 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/base/mock_ffmpeg.cc ('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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // MediaFilter implementation. 114 // MediaFilter implementation.
115 virtual void Stop(); 115 virtual void Stop();
116 virtual void Seek(base::TimeDelta time); 116 virtual void Seek(base::TimeDelta time);
117 117
118 // Demuxer implementation. 118 // Demuxer implementation.
119 virtual bool Initialize(DataSource* data_source); 119 virtual bool Initialize(DataSource* data_source);
120 virtual size_t GetNumberOfStreams(); 120 virtual size_t GetNumberOfStreams();
121 virtual scoped_refptr<DemuxerStream> GetStream(int stream_id); 121 virtual scoped_refptr<DemuxerStream> GetStream(int stream_id);
122 122
123 private: 123 private:
124 // Accesses |thread_| to create a helper method used by every test.
125 friend class FFmpegDemuxerTest;
126
124 // Only allow a factory to create this class. 127 // Only allow a factory to create this class.
125 friend class FilterFactoryImpl0<FFmpegDemuxer>; 128 friend class FilterFactoryImpl0<FFmpegDemuxer>;
126 FFmpegDemuxer(); 129 FFmpegDemuxer();
127 virtual ~FFmpegDemuxer(); 130 virtual ~FFmpegDemuxer();
128 131
129 // Carries out initialization on the demuxer thread. 132 // Carries out initialization on the demuxer thread.
130 void InititalizeTask(DataSource* data_source); 133 void InititalizeTask(DataSource* data_source);
131 134
132 // Carries out a seek on the demuxer thread. 135 // Carries out a seek on the demuxer thread.
133 void SeekTask(base::TimeDelta time); 136 void SeekTask(base::TimeDelta time);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 172
170 // Thread handle. 173 // Thread handle.
171 base::Thread thread_; 174 base::Thread thread_;
172 175
173 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); 176 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer);
174 }; 177 };
175 178
176 } // namespace media 179 } // namespace media
177 180
178 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ 181 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_
OLDNEW
« no previous file with comments | « media/base/mock_ffmpeg.cc ('k') | media/filters/ffmpeg_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698