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

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

Issue 10067035: RefCounted types should not have public destructors, media/ and gpu/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_ 5 #ifndef MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_
6 #define MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_ 6 #define MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "media/base/audio_decoder.h" 12 #include "media/base/audio_decoder.h"
13 13
14 struct AVCodecContext; 14 struct AVCodecContext;
15 15
16 namespace media { 16 namespace media {
17 17
18 class DataBuffer; 18 class DataBuffer;
19 19
20 class MEDIA_EXPORT FFmpegAudioDecoder : public AudioDecoder { 20 class MEDIA_EXPORT FFmpegAudioDecoder : public AudioDecoder {
21 public: 21 public:
22 FFmpegAudioDecoder(const base::Callback<MessageLoop*()>& message_loop_cb); 22 FFmpegAudioDecoder(const base::Callback<MessageLoop*()>& message_loop_cb);
23 virtual ~FFmpegAudioDecoder();
24 23
25 // AudioDecoder implementation. 24 // AudioDecoder implementation.
26 virtual void Initialize(const scoped_refptr<DemuxerStream>& stream, 25 virtual void Initialize(const scoped_refptr<DemuxerStream>& stream,
27 const PipelineStatusCB& status_cb, 26 const PipelineStatusCB& status_cb,
28 const StatisticsCB& statistics_cb) OVERRIDE; 27 const StatisticsCB& statistics_cb) OVERRIDE;
29 virtual void Read(const ReadCB& read_cb) OVERRIDE; 28 virtual void Read(const ReadCB& read_cb) OVERRIDE;
30 virtual int bits_per_channel() OVERRIDE; 29 virtual int bits_per_channel() OVERRIDE;
31 virtual ChannelLayout channel_layout() OVERRIDE; 30 virtual ChannelLayout channel_layout() OVERRIDE;
32 virtual int samples_per_second() OVERRIDE; 31 virtual int samples_per_second() OVERRIDE;
33 virtual void Reset(const base::Closure& closure) OVERRIDE; 32 virtual void Reset(const base::Closure& closure) OVERRIDE;
34 33
35 private: 34 private:
35 virtual ~FFmpegAudioDecoder();
36
36 // Methods running on decoder thread. 37 // Methods running on decoder thread.
37 void DoInitialize(const scoped_refptr<DemuxerStream>& stream, 38 void DoInitialize(const scoped_refptr<DemuxerStream>& stream,
38 const PipelineStatusCB& status_cb, 39 const PipelineStatusCB& status_cb,
39 const StatisticsCB& statistics_cb); 40 const StatisticsCB& statistics_cb);
40 void DoReset(const base::Closure& closure); 41 void DoReset(const base::Closure& closure);
41 void DoRead(const ReadCB& read_cb); 42 void DoRead(const ReadCB& read_cb);
42 void DoDecodeBuffer(const scoped_refptr<Buffer>& input); 43 void DoDecodeBuffer(const scoped_refptr<Buffer>& input);
43 44
44 // Reads from the demuxer stream with corresponding callback method. 45 // Reads from the demuxer stream with corresponding callback method.
45 void ReadFromDemuxerStream(); 46 void ReadFromDemuxerStream();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 uint8* decoded_audio_; // Allocated via av_malloc(). 79 uint8* decoded_audio_; // Allocated via av_malloc().
79 80
80 ReadCB read_cb_; 81 ReadCB read_cb_;
81 82
82 DISALLOW_IMPLICIT_CONSTRUCTORS(FFmpegAudioDecoder); 83 DISALLOW_IMPLICIT_CONSTRUCTORS(FFmpegAudioDecoder);
83 }; 84 };
84 85
85 } // namespace media 86 } // namespace media
86 87
87 #endif // MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_ 88 #endif // MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698