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

Unified Diff: trunk/src/media/base/video_decoder.h

Issue 14320005: Revert 194993 "Remove reference counting from media::VideoDecode..." (Closed) Base URL: svn://svn.chromium.org/chrome/
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/src/media/base/pipeline_unittest.cc ('k') | trunk/src/media/base/video_renderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/media/base/video_decoder.h
===================================================================
--- trunk/src/media/base/video_decoder.h (revision 195011)
+++ trunk/src/media/base/video_decoder.h (working copy)
@@ -16,7 +16,8 @@
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 @@
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 @@
// 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);
};
« no previous file with comments | « trunk/src/media/base/pipeline_unittest.cc ('k') | trunk/src/media/base/video_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698