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

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

Issue 3654001: Revert 61899 for breaking cookes on file:// URLs.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 2 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/pipeline_impl.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // 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 12 matching lines...) Expand all
23 23
24 // In this class, we over-specify method lookup via this-> to avoid unexpected 24 // In this class, we over-specify method lookup via this-> to avoid unexpected
25 // name resolution issues due to the two-phase lookup needed for dependent 25 // name resolution issues due to the two-phase lookup needed for dependent
26 // name resolution in templates. 26 // name resolution in templates.
27 template <class Decoder, class Output> 27 template <class Decoder, class Output>
28 class DecoderBase : public Decoder { 28 class DecoderBase : public Decoder {
29 public: 29 public:
30 30
31 // MediaFilter implementation. 31 // MediaFilter implementation.
32 virtual void Stop(FilterCallback* callback) { 32 virtual void Stop(FilterCallback* callback) {
33 this->message_loop()->PostTask( 33 this->message_loop()->PostTask(FROM_HERE,
34 FROM_HERE,
35 NewRunnableMethod(this, &DecoderBase::StopTask, callback)); 34 NewRunnableMethod(this, &DecoderBase::StopTask, callback));
36 } 35 }
37 36
38 virtual void Seek(base::TimeDelta time, 37 virtual void Seek(base::TimeDelta time,
39 FilterCallback* callback) { 38 FilterCallback* callback) {
40 this->message_loop()->PostTask( 39 this->message_loop()->PostTask(FROM_HERE,
41 FROM_HERE,
42 NewRunnableMethod(this, &DecoderBase::SeekTask, time, callback)); 40 NewRunnableMethod(this, &DecoderBase::SeekTask, time, callback));
43 } 41 }
44 42
45 // Decoder implementation. 43 // Decoder implementation.
46 virtual void Initialize(DemuxerStream* demuxer_stream, 44 virtual void Initialize(DemuxerStream* demuxer_stream,
47 FilterCallback* callback) { 45 FilterCallback* callback) {
48 this->message_loop()->PostTask( 46 this->message_loop()->PostTask(FROM_HERE,
49 FROM_HERE, 47 NewRunnableMethod(this, &DecoderBase::InitializeTask, demuxer_stream,
50 NewRunnableMethod(this,
51 &DecoderBase::InitializeTask,
52 make_scoped_refptr(demuxer_stream),
53 callback)); 48 callback));
54 } 49 }
55 50
56 virtual const MediaFormat& media_format() { return media_format_; } 51 virtual const MediaFormat& media_format() { return media_format_; }
57 52
58 // Audio decoder. 53 // Audio decoder.
59 // Note that this class is only used by the audio decoder, this will 54 // Note that this class is only used by the audio decoder, this will
60 // eventually be merged into FFmpegAudioDecoder. 55 // eventually be merged into FFmpegAudioDecoder.
61 virtual void ProduceAudioSamples(scoped_refptr<Output> output) { 56 virtual void ProduceAudioSamples(scoped_refptr<Output> output) {
62 this->message_loop()->PostTask(FROM_HERE, 57 this->message_loop()->PostTask(FROM_HERE,
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 kStopped, 317 kStopped,
323 }; 318 };
324 State state_; 319 State state_;
325 320
326 DISALLOW_COPY_AND_ASSIGN(DecoderBase); 321 DISALLOW_COPY_AND_ASSIGN(DecoderBase);
327 }; 322 };
328 323
329 } // namespace media 324 } // namespace media
330 325
331 #endif // MEDIA_FILTERS_DECODER_BASE_H_ 326 #endif // MEDIA_FILTERS_DECODER_BASE_H_
OLDNEW
« no previous file with comments | « media/base/pipeline_impl.cc ('k') | media/filters/ffmpeg_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698