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

Unified Diff: media/filters/ffmpeg_video_decoder.h

Issue 14348007: Reland: Remove reference counting from media::VideoDecoder and friends. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/decrypting_video_decoder_unittest.cc ('k') | media/filters/ffmpeg_video_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_video_decoder.h
diff --git a/media/filters/ffmpeg_video_decoder.h b/media/filters/ffmpeg_video_decoder.h
index 4c6629e2f8ef2dcc73d1476579c1a827777cbfdc..de8381460a887ee398d2596d259d6e208f392694 100644
--- a/media/filters/ffmpeg_video_decoder.h
+++ b/media/filters/ffmpeg_video_decoder.h
@@ -8,7 +8,7 @@
#include <list>
#include "base/callback.h"
-#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
#include "media/base/demuxer_stream.h"
#include "media/base/video_decoder.h"
@@ -27,6 +27,7 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder {
public:
explicit FFmpegVideoDecoder(
const scoped_refptr<base::MessageLoopProxy>& message_loop);
+ virtual ~FFmpegVideoDecoder();
// VideoDecoder implementation.
virtual void Initialize(const scoped_refptr<DemuxerStream>& stream,
@@ -41,9 +42,6 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder {
// documentation inside FFmpeg.
int GetVideoBuffer(AVCodecContext *codec_context, AVFrame* frame);
- protected:
- virtual ~FFmpegVideoDecoder();
-
private:
enum DecoderState {
kUninitialized,
@@ -74,6 +72,8 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder {
void DoReset();
scoped_refptr<base::MessageLoopProxy> message_loop_;
+ base::WeakPtrFactory<FFmpegVideoDecoder> weak_factory_;
+ base::WeakPtr<FFmpegVideoDecoder> weak_this_;
DecoderState state_;
« no previous file with comments | « media/filters/decrypting_video_decoder_unittest.cc ('k') | media/filters/ffmpeg_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698