summaryrefslogtreecommitdiffstats
path: root/media/base/demuxer.h
diff options
context:
space:
mode:
authorscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-05 04:31:30 +0000
committerscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-05 04:31:30 +0000
commitd09ef258f1ffc7f67810359cca9f40badce37466 (patch)
tree273786f816a5f79d5397b125ae202a05c8367838 /media/base/demuxer.h
parent91b01b8c73d97cefdec5a965caf02a7871119138 (diff)
downloadchromium_src-d09ef258f1ffc7f67810359cca9f40badce37466.zip
chromium_src-d09ef258f1ffc7f67810359cca9f40badce37466.tar.gz
chromium_src-d09ef258f1ffc7f67810359cca9f40badce37466.tar.bz2
Move Demuxer::set_host() to Initialize().
BUG=111585 Review URL: https://chromiumcodereview.appspot.com/9968117 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130842 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/demuxer.h')
-rw-r--r--media/base/demuxer.h25
1 files changed, 5 insertions, 20 deletions
diff --git a/media/base/demuxer.h b/media/base/demuxer.h
index 3647a9d..4458ce0 100644
--- a/media/base/demuxer.h
+++ b/media/base/demuxer.h
@@ -34,22 +34,16 @@ class MEDIA_EXPORT DemuxerHost : public DataSourceHost {
virtual void OnDemuxerError(PipelineStatus error) = 0;
};
-class MEDIA_EXPORT Demuxer
- : public base::RefCountedThreadSafe<Demuxer> {
+class MEDIA_EXPORT Demuxer : public base::RefCountedThreadSafe<Demuxer> {
public:
Demuxer();
- // Sets the private member |host_|. This is the first method called by
- // the DemuxerHost after a demuxer is created. The host holds a strong
- // reference to the demuxer. The reference held by the host is guaranteed
- // to be released before the host object is destroyed by the pipeline.
- virtual void set_host(DemuxerHost* host);
-
// Completes initialization of the demuxer.
//
- // TODO(scherkus): pass in DemuxerHost here instead of using set_host(),
- // see http://crbug.com/111585
- virtual void Initialize(const PipelineStatusCB& status_cb) = 0;
+ // The demuxer does not own |host| as it is guaranteed to outlive the
+ // lifetime of the demuxer. Don't delete it!
+ virtual void Initialize(DemuxerHost* host,
+ const PipelineStatusCB& status_cb) = 0;
// The pipeline playback rate has been changed. Demuxers may implement this
// method if they need to respond to this call.
@@ -90,19 +84,10 @@ class MEDIA_EXPORT Demuxer
virtual bool IsSeekable() = 0;
protected:
- // Only allow derived objects access to the DemuxerHost. This is
- // kept out of the public interface because demuxers need to be
- // aware of all calls made to the host object so they can insure
- // the state presented to the host is always consistent with its own
- // state.
- DemuxerHost* host() { return host_; }
-
friend class base::RefCountedThreadSafe<Demuxer>;
virtual ~Demuxer();
private:
- DemuxerHost* host_;
-
DISALLOW_COPY_AND_ASSIGN(Demuxer);
};