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

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: rebase 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
« no previous file with comments | « media/filters/ffmpeg_demuxer_unittest.cc ('k') | media/filters/ffmpeg_video_decoder.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) 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 StatisticsCB statistics_cb_; 81 StatisticsCB statistics_cb_;
82 82
83 ReadCB read_cb_; 83 ReadCB read_cb_;
84 base::Closure reset_cb_; 84 base::Closure reset_cb_;
85 85
86 // FFmpeg structures owned by this object. 86 // FFmpeg structures owned by this object.
87 AVCodecContext* codec_context_; 87 AVCodecContext* codec_context_;
88 AVFrame* av_frame_; 88 AVFrame* av_frame_;
89 89
90 // Pointer to the demuxer stream that will feed us compressed buffers. 90 // Pointer to the demuxer stream that will feed us compressed buffers.
91 scoped_refptr<DemuxerStream> demuxer_stream_; 91 DemuxerStream* demuxer_stream_;
92 92
93 std::list<scoped_refptr<VideoFrame> > decoded_frames_; 93 std::list<scoped_refptr<VideoFrame> > decoded_frames_;
94 94
95 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder); 95 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder);
96 }; 96 };
97 97
98 } // namespace media 98 } // namespace media
99 99
100 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ 100 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_
OLDNEW
« no previous file with comments | « media/filters/ffmpeg_demuxer_unittest.cc ('k') | media/filters/ffmpeg_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698