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

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

Issue 14217008: Remove reference counting from media::DemuxerStream and friends. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 <list> 8 #include <list>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 12 matching lines...) Expand all
23 23
24 class DecoderBuffer; 24 class DecoderBuffer;
25 25
26 class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder { 26 class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder {
27 public: 27 public:
28 explicit FFmpegVideoDecoder( 28 explicit FFmpegVideoDecoder(
29 const scoped_refptr<base::MessageLoopProxy>& message_loop); 29 const scoped_refptr<base::MessageLoopProxy>& message_loop);
30 virtual ~FFmpegVideoDecoder(); 30 virtual ~FFmpegVideoDecoder();
31 31
32 // VideoDecoder implementation. 32 // VideoDecoder implementation.
33 virtual void Initialize(const scoped_refptr<DemuxerStream>& stream, 33 virtual void Initialize(DemuxerStream* stream,
34 const PipelineStatusCB& status_cb, 34 const PipelineStatusCB& status_cb,
35 const StatisticsCB& statistics_cb) OVERRIDE; 35 const StatisticsCB& statistics_cb) OVERRIDE;
36 virtual void Read(const ReadCB& read_cb) OVERRIDE; 36 virtual void Read(const ReadCB& read_cb) OVERRIDE;
37 virtual void Reset(const base::Closure& closure) OVERRIDE; 37 virtual void Reset(const base::Closure& closure) OVERRIDE;
38 virtual void Stop(const base::Closure& closure) OVERRIDE; 38 virtual void Stop(const base::Closure& closure) OVERRIDE;
39 39
40 // Callback called from within FFmpeg to allocate a buffer based on 40 // Callback called from within FFmpeg to allocate a buffer based on
41 // the dimensions of |codec_context|. See AVCodecContext.get_buffer 41 // the dimensions of |codec_context|. See AVCodecContext.get_buffer
42 // documentation inside FFmpeg. 42 // documentation inside FFmpeg.
43 int GetVideoBuffer(AVCodecContext *codec_context, AVFrame* frame); 43 int GetVideoBuffer(AVCodecContext *codec_context, AVFrame* frame);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 StatisticsCB statistics_cb_; 80 StatisticsCB statistics_cb_;
81 81
82 ReadCB read_cb_; 82 ReadCB read_cb_;
83 base::Closure reset_cb_; 83 base::Closure reset_cb_;
84 84
85 // FFmpeg structures owned by this object. 85 // FFmpeg structures owned by this object.
86 AVCodecContext* codec_context_; 86 AVCodecContext* codec_context_;
87 AVFrame* av_frame_; 87 AVFrame* av_frame_;
88 88
89 // Pointer to the demuxer stream that will feed us compressed buffers. 89 // Pointer to the demuxer stream that will feed us compressed buffers.
90 scoped_refptr<DemuxerStream> demuxer_stream_; 90 DemuxerStream* demuxer_stream_;
91 91
92 std::list<scoped_refptr<VideoFrame> > decoded_frames_; 92 std::list<scoped_refptr<VideoFrame> > decoded_frames_;
93 93
94 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder); 94 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder);
95 }; 95 };
96 96
97 } // namespace media 97 } // namespace media
98 98
99 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ 99 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698