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

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

Issue 13813016: Remove reference counting from media::Demuxer and friends. (Closed) Base URL: http://git.chromium.org/chromium/src.git@vd_scoped
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
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 12
13 struct vpx_codec_ctx; 13 struct vpx_codec_ctx;
14 struct vpx_image; 14 struct vpx_image;
15 15
16 namespace base { 16 namespace base {
17 class MessageLoopProxy; 17 class MessageLoopProxy;
18 } 18 }
19 19
20 namespace media { 20 namespace media {
21 21
22 class MEDIA_EXPORT VpxVideoDecoder : public VideoDecoder { 22 class MEDIA_EXPORT VpxVideoDecoder : public VideoDecoder {
23 public: 23 public:
24 explicit VpxVideoDecoder( 24 explicit VpxVideoDecoder(
25 const scoped_refptr<base::MessageLoopProxy>& message_loop); 25 const scoped_refptr<base::MessageLoopProxy>& message_loop);
26 virtual ~VpxVideoDecoder(); 26 virtual ~VpxVideoDecoder();
27 27
28 // VideoDecoder implementation. 28 // VideoDecoder implementation.
29 virtual void Initialize(const scoped_refptr<DemuxerStream>& stream, 29 virtual void Initialize(DemuxerStream* stream,
30 const PipelineStatusCB& status_cb, 30 const PipelineStatusCB& status_cb,
31 const StatisticsCB& statistics_cb) OVERRIDE; 31 const StatisticsCB& statistics_cb) OVERRIDE;
32 virtual void Read(const ReadCB& read_cb) OVERRIDE; 32 virtual void Read(const ReadCB& read_cb) OVERRIDE;
33 virtual void Reset(const base::Closure& closure) OVERRIDE; 33 virtual void Reset(const base::Closure& closure) OVERRIDE;
34 virtual void Stop(const base::Closure& closure) OVERRIDE; 34 virtual void Stop(const base::Closure& closure) OVERRIDE;
35 35
36 private: 36 private:
37 enum DecoderState { 37 enum DecoderState {
38 kUninitialized, 38 kUninitialized,
39 kNormal, 39 kNormal,
(...skipping 27 matching lines...) Expand all
67 base::WeakPtrFactory<VpxVideoDecoder> weak_factory_; 67 base::WeakPtrFactory<VpxVideoDecoder> weak_factory_;
68 base::WeakPtr<VpxVideoDecoder> weak_this_; 68 base::WeakPtr<VpxVideoDecoder> weak_this_;
69 69
70 DecoderState state_; 70 DecoderState state_;
71 71
72 StatisticsCB statistics_cb_; 72 StatisticsCB statistics_cb_;
73 ReadCB read_cb_; 73 ReadCB read_cb_;
74 base::Closure reset_cb_; 74 base::Closure reset_cb_;
75 75
76 // Pointer to the demuxer stream that will feed us compressed buffers. 76 // Pointer to the demuxer stream that will feed us compressed buffers.
77 scoped_refptr<DemuxerStream> demuxer_stream_; 77 DemuxerStream* demuxer_stream_;
78 78
79 vpx_codec_ctx* vpx_codec_; 79 vpx_codec_ctx* vpx_codec_;
80 80
81 DISALLOW_COPY_AND_ASSIGN(VpxVideoDecoder); 81 DISALLOW_COPY_AND_ASSIGN(VpxVideoDecoder);
82 }; 82 };
83 83
84 } // namespace media 84 } // namespace media
85 85
86 #endif // MEDIA_FILTERS_VPX_VIDEO_DECODER_H_ 86 #endif // MEDIA_FILTERS_VPX_VIDEO_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698