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

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

Issue 2804042: Incomplete changes to make scoped_ptr_malloc use plain functions. (Closed)
Patch Set: chrome now builds & links Created 10 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/ffmpeg/ffmpeg_common.h ('k') | media/filters/ffmpeg_video_decode_engine.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 #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 "media/base/factory.h" 8 #include "media/base/factory.h"
9 #include "media/filters/decoder_base.h" 9 #include "media/filters/decoder_base.h"
10 10
11 struct AVCodecContext; 11 struct AVCodecContext;
12 12
13 namespace media { 13 namespace media {
14 14
15 // Forward declaration for scoped_ptr_malloc. 15 // Forward declaration for scoped_ptr_malloc.
16 class ScopedPtrAVFree; 16 void ScopedPtrAVFree(void*);
17 17
18 class FFmpegAudioDecoder : public DecoderBase<AudioDecoder, Buffer> { 18 class FFmpegAudioDecoder : public DecoderBase<AudioDecoder, Buffer> {
19 public: 19 public:
20 static FilterFactory* CreateFactory() { 20 static FilterFactory* CreateFactory() {
21 return new FilterFactoryImpl0<FFmpegAudioDecoder>(); 21 return new FilterFactoryImpl0<FFmpegAudioDecoder>();
22 } 22 }
23 23
24 static bool IsMediaFormatSupported(const MediaFormat& media_format); 24 static bool IsMediaFormatSupported(const MediaFormat& media_format);
25 25
26 protected: 26 protected:
(...skipping 15 matching lines...) Expand all
42 42
43 // A FFmpeg defined structure that holds decoder information, this variable 43 // A FFmpeg defined structure that holds decoder information, this variable
44 // is initialized in OnInitialize(). 44 // is initialized in OnInitialize().
45 AVCodecContext* codec_context_; 45 AVCodecContext* codec_context_;
46 46
47 // Estimated timestamp for next packet. Useful for packets without timestamps. 47 // Estimated timestamp for next packet. Useful for packets without timestamps.
48 base::TimeDelta estimated_next_timestamp_; 48 base::TimeDelta estimated_next_timestamp_;
49 49
50 // Data buffer to carry decoded raw PCM samples. This buffer is created by 50 // Data buffer to carry decoded raw PCM samples. This buffer is created by
51 // av_malloc() and is used throughout the lifetime of this class. 51 // av_malloc() and is used throughout the lifetime of this class.
52 scoped_ptr_malloc<uint8, ScopedPtrAVFree> output_buffer_; 52 scoped_ptr_malloc<uint8, FreeFnAdapter<ScopedPtrAVFree> > output_buffer_;
53 53
54 static const size_t kOutputBufferSize; 54 static const size_t kOutputBufferSize;
55 55
56 DISALLOW_COPY_AND_ASSIGN(FFmpegAudioDecoder); 56 DISALLOW_COPY_AND_ASSIGN(FFmpegAudioDecoder);
57 }; 57 };
58 58
59 } // namespace media 59 } // namespace media
60 60
61 #endif // MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_ 61 #endif // MEDIA_FILTERS_FFMPEG_AUDIO_DECODER_H_
OLDNEW
« no previous file with comments | « media/ffmpeg/ffmpeg_common.h ('k') | media/filters/ffmpeg_video_decode_engine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698