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

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

Issue 42635: Lots of files touched for a very simple change. Everywhere we used a const M... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 9 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/audio_renderer_impl.cc ('k') | media/filters/ffmpeg_audio_decoder.h » ('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. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 // A base class that provides the plumbing for a decoder filters. 5 // A base class that provides the plumbing for a decoder filters.
6 6
7 #ifndef MEDIA_FILTERS_DECODER_BASE_H_ 7 #ifndef MEDIA_FILTERS_DECODER_BASE_H_
8 #define MEDIA_FILTERS_DECODER_BASE_H_ 8 #define MEDIA_FILTERS_DECODER_BASE_H_
9 9
10 #include <deque> 10 #include <deque>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 DCHECK(!media_format_.empty()); 51 DCHECK(!media_format_.empty());
52 host()->InitializationComplete(); 52 host()->InitializationComplete();
53 return true; 53 return true;
54 } else { 54 } else {
55 demuxer_stream_ = NULL; 55 demuxer_stream_ = NULL;
56 decode_thread_.reset(); 56 decode_thread_.reset();
57 return false; 57 return false;
58 } 58 }
59 } 59 }
60 60
61 virtual const MediaFormat* GetMediaFormat() { return &media_format_; } 61 virtual const MediaFormat& media_format() { return media_format_; }
62 62
63 // Audio or Video decoder. 63 // Audio or Video decoder.
64 virtual void Read(Assignable<Output>* output) { 64 virtual void Read(Assignable<Output>* output) {
65 AutoLock auto_lock(lock_); 65 AutoLock auto_lock(lock_);
66 if (IsRunning()) { 66 if (IsRunning()) {
67 output->AddRef(); 67 output->AddRef();
68 output_queue_.push_back(output); 68 output_queue_.push_back(output);
69 ScheduleProcessTask(); 69 ScheduleProcessTask();
70 } 70 }
71 } 71 }
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 // Queue of buffers supplied by the renderer through the Read() method. 287 // Queue of buffers supplied by the renderer through the Read() method.
288 typedef std::deque<Assignable<Output>*> OutputQueue; 288 typedef std::deque<Assignable<Output>*> OutputQueue;
289 OutputQueue output_queue_; 289 OutputQueue output_queue_;
290 290
291 DISALLOW_COPY_AND_ASSIGN(DecoderBase); 291 DISALLOW_COPY_AND_ASSIGN(DecoderBase);
292 }; 292 };
293 293
294 } // namespace media 294 } // namespace media
295 295
296 #endif // MEDIA_FILTERS_DECODER_BASE_H_ 296 #endif // MEDIA_FILTERS_DECODER_BASE_H_
OLDNEW
« no previous file with comments | « media/filters/audio_renderer_impl.cc ('k') | media/filters/ffmpeg_audio_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698