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

Side by Side Diff: media/filters/ffmpeg_video_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_VIDEO_DECODER_H_ 5 #ifndef MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_
6 #define MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ 6 #define MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "media/base/filters.h" 12 #include "media/base/filters.h"
13 #include "media/crypto/aes_decryptor.h" 13 #include "media/crypto/aes_decryptor.h"
14 #include "ui/gfx/size.h" 14 #include "ui/gfx/size.h"
15 15
16 class MessageLoop; 16 class MessageLoop;
17 17
18 struct AVCodecContext; 18 struct AVCodecContext;
19 struct AVFrame; 19 struct AVFrame;
20 20
21 namespace media { 21 namespace media {
22 22
23 class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder { 23 class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder {
24 public: 24 public:
25 FFmpegVideoDecoder(const base::Callback<MessageLoop*()>& message_loop_cb); 25 FFmpegVideoDecoder(const base::Callback<MessageLoop*()>& message_loop_cb);
26 virtual ~FFmpegVideoDecoder();
27 26
28 // Filter implementation. 27 // Filter implementation.
29 virtual void Stop(const base::Closure& callback) OVERRIDE; 28 virtual void Stop(const base::Closure& callback) OVERRIDE;
30 virtual void Seek(base::TimeDelta time, const PipelineStatusCB& cb) OVERRIDE; 29 virtual void Seek(base::TimeDelta time, const PipelineStatusCB& cb) OVERRIDE;
31 virtual void Pause(const base::Closure& callback) OVERRIDE; 30 virtual void Pause(const base::Closure& callback) OVERRIDE;
32 virtual void Flush(const base::Closure& callback) OVERRIDE; 31 virtual void Flush(const base::Closure& callback) OVERRIDE;
33 32
34 // VideoDecoder implementation. 33 // VideoDecoder implementation.
35 virtual void Initialize(DemuxerStream* demuxer_stream, 34 virtual void Initialize(DemuxerStream* demuxer_stream,
36 const PipelineStatusCB& status_cb, 35 const PipelineStatusCB& status_cb,
37 const StatisticsCB& statistics_cb) OVERRIDE; 36 const StatisticsCB& statistics_cb) OVERRIDE;
38 virtual void Read(const ReadCB& read_cb) OVERRIDE; 37 virtual void Read(const ReadCB& read_cb) OVERRIDE;
39 virtual const gfx::Size& natural_size() OVERRIDE; 38 virtual const gfx::Size& natural_size() OVERRIDE;
40 39
41 AesDecryptor* decryptor(); 40 AesDecryptor* decryptor();
42 41
43 private: 42 private:
43 virtual ~FFmpegVideoDecoder();
44
44 enum DecoderState { 45 enum DecoderState {
45 kUninitialized, 46 kUninitialized,
46 kNormal, 47 kNormal,
47 kFlushCodec, 48 kFlushCodec,
48 kDecodeFinished, 49 kDecodeFinished,
49 }; 50 };
50 51
51 // Carries out the reading operation scheduled by Read(). 52 // Carries out the reading operation scheduled by Read().
52 void DoRead(const ReadCB& read_cb); 53 void DoRead(const ReadCB& read_cb);
53 54
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 scoped_refptr<DemuxerStream> demuxer_stream_; 103 scoped_refptr<DemuxerStream> demuxer_stream_;
103 104
104 AesDecryptor decryptor_; 105 AesDecryptor decryptor_;
105 106
106 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder); 107 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder);
107 }; 108 };
108 109
109 } // namespace media 110 } // namespace media
110 111
111 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ 112 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698