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

Side by Side Diff: media/filters/vpx_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/video_renderer_base_unittest.cc ('k') | media/filters/vpx_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_VPX_VIDEO_DECODER_H_ 5 #ifndef MEDIA_FILTERS_VPX_VIDEO_DECODER_H_
6 #define MEDIA_FILTERS_VPX_VIDEO_DECODER_H_ 6 #define MEDIA_FILTERS_VPX_VIDEO_DECODER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "media/base/demuxer_stream.h" 10 #include "media/base/demuxer_stream.h"
11 #include "media/base/video_decoder.h" 11 #include "media/base/video_decoder.h"
12 #include "media/base/video_frame.h" 12 #include "media/base/video_frame.h"
13 13
14 struct vpx_codec_ctx; 14 struct vpx_codec_ctx;
15 struct vpx_image; 15 struct vpx_image;
16 16
17 namespace base { 17 namespace base {
18 class MessageLoopProxy; 18 class MessageLoopProxy;
19 } 19 }
20 20
21 namespace media { 21 namespace media {
22 22
23 class MEDIA_EXPORT VpxVideoDecoder : public VideoDecoder { 23 class MEDIA_EXPORT VpxVideoDecoder : public VideoDecoder {
24 public: 24 public:
25 explicit VpxVideoDecoder( 25 explicit VpxVideoDecoder(
26 const scoped_refptr<base::MessageLoopProxy>& message_loop); 26 const scoped_refptr<base::MessageLoopProxy>& message_loop);
27 virtual ~VpxVideoDecoder(); 27 virtual ~VpxVideoDecoder();
28 28
29 // VideoDecoder implementation. 29 // VideoDecoder implementation.
30 virtual void Initialize(const scoped_refptr<DemuxerStream>& stream, 30 virtual void Initialize(DemuxerStream* stream,
31 const PipelineStatusCB& status_cb, 31 const PipelineStatusCB& status_cb,
32 const StatisticsCB& statistics_cb) OVERRIDE; 32 const StatisticsCB& statistics_cb) OVERRIDE;
33 virtual void Read(const ReadCB& read_cb) OVERRIDE; 33 virtual void Read(const ReadCB& read_cb) OVERRIDE;
34 virtual void Reset(const base::Closure& closure) OVERRIDE; 34 virtual void Reset(const base::Closure& closure) OVERRIDE;
35 virtual void Stop(const base::Closure& closure) OVERRIDE; 35 virtual void Stop(const base::Closure& closure) OVERRIDE;
36 36
37 private: 37 private:
38 enum DecoderState { 38 enum DecoderState {
39 kUninitialized, 39 kUninitialized,
40 kNormal, 40 kNormal,
(...skipping 29 matching lines...) Expand all
70 base::WeakPtrFactory<VpxVideoDecoder> weak_factory_; 70 base::WeakPtrFactory<VpxVideoDecoder> weak_factory_;
71 base::WeakPtr<VpxVideoDecoder> weak_this_; 71 base::WeakPtr<VpxVideoDecoder> weak_this_;
72 72
73 DecoderState state_; 73 DecoderState state_;
74 74
75 StatisticsCB statistics_cb_; 75 StatisticsCB statistics_cb_;
76 ReadCB read_cb_; 76 ReadCB read_cb_;
77 base::Closure reset_cb_; 77 base::Closure reset_cb_;
78 78
79 // Pointer to the demuxer stream that will feed us compressed buffers. 79 // Pointer to the demuxer stream that will feed us compressed buffers.
80 scoped_refptr<DemuxerStream> demuxer_stream_; 80 DemuxerStream* demuxer_stream_;
81 81
82 vpx_codec_ctx* vpx_codec_; 82 vpx_codec_ctx* vpx_codec_;
83 vpx_codec_ctx* vpx_codec_alpha_; 83 vpx_codec_ctx* vpx_codec_alpha_;
84 84
85 DISALLOW_COPY_AND_ASSIGN(VpxVideoDecoder); 85 DISALLOW_COPY_AND_ASSIGN(VpxVideoDecoder);
86 }; 86 };
87 87
88 } // namespace media 88 } // namespace media
89 89
90 #endif // MEDIA_FILTERS_VPX_VIDEO_DECODER_H_ 90 #endif // MEDIA_FILTERS_VPX_VIDEO_DECODER_H_
OLDNEW
« no previous file with comments | « media/filters/video_renderer_base_unittest.cc ('k') | media/filters/vpx_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698