summaryrefslogtreecommitdiffstats
path: root/media/base/video_decoder.h
diff options
context:
space:
mode:
Diffstat (limited to 'media/base/video_decoder.h')
-rw-r--r--media/base/video_decoder.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/media/base/video_decoder.h b/media/base/video_decoder.h
index 4611645..97566da 100644
--- a/media/base/video_decoder.h
+++ b/media/base/video_decoder.h
@@ -16,7 +16,8 @@ namespace media {
class DemuxerStream;
class VideoFrame;
-class MEDIA_EXPORT VideoDecoder {
+class MEDIA_EXPORT VideoDecoder
+ : public base::RefCountedThreadSafe<VideoDecoder> {
public:
// Status codes for read operations on VideoDecoder.
enum Status {
@@ -25,9 +26,6 @@ class MEDIA_EXPORT VideoDecoder {
kDecryptError // Decrypting error happened.
};
- VideoDecoder();
- virtual ~VideoDecoder();
-
// Initializes a VideoDecoder with the given DemuxerStream, executing the
// |status_cb| upon completion.
// |statistics_cb| is used to update the global pipeline statistics.
@@ -79,7 +77,11 @@ class MEDIA_EXPORT VideoDecoder {
// use a fixed set of VideoFrames for decoding.
virtual bool HasOutputFrameAvailable() const;
- private:
+ protected:
+ friend class base::RefCountedThreadSafe<VideoDecoder>;
+ virtual ~VideoDecoder();
+ VideoDecoder();
+
DISALLOW_COPY_AND_ASSIGN(VideoDecoder);
};