summaryrefslogtreecommitdiffstats
path: root/media/base/pipeline.h
diff options
context:
space:
mode:
authorscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-08 16:23:05 +0000
committerscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-08 16:23:05 +0000
commitd964ebab8bf3d9748306e17813e7d96972524554 (patch)
tree1e89612134fd5abe149e3e3c5ab109785f7abf76 /media/base/pipeline.h
parentf5d35e6f89d98ce00010f3874f3962516d7c6f5a (diff)
downloadchromium_src-d964ebab8bf3d9748306e17813e7d96972524554.zip
chromium_src-d964ebab8bf3d9748306e17813e7d96972524554.tar.gz
chromium_src-d964ebab8bf3d9748306e17813e7d96972524554.tar.bz2
Revert 198760 "Remove reference counting from media::Pipeline."
> Remove reference counting from media::Pipeline. > > BUG=173313 > R=acolwell@chromium.org > > Review URL: https://codereview.chromium.org/14371023 BUG=238908 TBR=scherkus@chromium.org Review URL: https://codereview.chromium.org/14972012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198922 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/pipeline.h')
-rw-r--r--media/base/pipeline.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/media/base/pipeline.h b/media/base/pipeline.h
index a91176e..aa92269 100644
--- a/media/base/pipeline.h
+++ b/media/base/pipeline.h
@@ -63,7 +63,9 @@ class VideoRenderer;
// If any error ever happens, this object will transition to the "Error" state
// from any state. If Stop() is ever called, this object will transition to
// "Stopped" state.
-class MEDIA_EXPORT Pipeline : public DemuxerHost {
+class MEDIA_EXPORT Pipeline
+ : public base::RefCountedThreadSafe<Pipeline>,
+ public DemuxerHost {
public:
// Buffering states the pipeline transitions between during playback.
// kHaveMetadata:
@@ -83,7 +85,6 @@ class MEDIA_EXPORT Pipeline : public DemuxerHost {
// Constructs a media pipeline that will execute on |message_loop|.
Pipeline(const scoped_refptr<base::MessageLoopProxy>& message_loop,
MediaLog* media_log);
- virtual ~Pipeline();
// Build a pipeline to using the given filter collection to construct a filter
// chain, executing |seek_cb| when the initial seek/preroll has completed.
@@ -197,6 +198,10 @@ class MEDIA_EXPORT Pipeline : public DemuxerHost {
FRIEND_TEST_ALL_PREFIXES(PipelineTest, AudioStreamShorterThanVideo);
friend class MediaLog;
+ // Only allow ourselves to be deleted by reference counting.
+ friend class base::RefCountedThreadSafe<Pipeline>;
+ virtual ~Pipeline();
+
// Pipeline states, as described above.
enum State {
kCreated,