diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-14 23:06:09 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-14 23:06:09 +0000 |
commit | 3f5d201c12cc91dbd009388b5f021e149fa1036c (patch) | |
tree | a17484836cfdd82e50cf21197a118bbebdb333b7 /media/base/pipeline_impl.h | |
parent | 4ef2170bc994581f69c50f6330de57b9e7cbc619 (diff) | |
download | chromium_src-3f5d201c12cc91dbd009388b5f021e149fa1036c.zip chromium_src-3f5d201c12cc91dbd009388b5f021e149fa1036c.tar.gz chromium_src-3f5d201c12cc91dbd009388b5f021e149fa1036c.tar.bz2 |
Checking in basic pipeline interface and stubbed out media::PipelineImpl.
This interface is going to be updated some more in the future, but I'd like to get the basics in first.
Review URL: http://codereview.chromium.org/17299
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8046 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/pipeline_impl.h')
-rw-r--r-- | media/base/pipeline_impl.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/media/base/pipeline_impl.h b/media/base/pipeline_impl.h new file mode 100644 index 0000000..941b5e6 --- /dev/null +++ b/media/base/pipeline_impl.h @@ -0,0 +1,46 @@ +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Implementation of Pipeline. + +#ifndef MEDIA_BASE_PIPELINE_IMPL_H_ +#define MEDIA_BASE_PIPELINE_IMPL_H_ + +#include "base/scoped_ptr.h" +#include "media/base/pipeline.h" + +namespace media { + +class PipelineImpl : public Pipeline { + public: + PipelineImpl(); + + // Pipeline implementation. + virtual bool Initialize(FilterFactoryInterface* filter_factory, + const std::string& uri); + virtual bool Play(); + virtual bool Pause(); + virtual bool Seek(int64 seek_position); + virtual void Shutdown(); + virtual int64 GetTime() const; + virtual int64 GetDuration() const; + virtual void SetStateChangedCallback( + Callback1<PipelineState>::Type* callback); + virtual void SetTimeChangedCallback(Callback1<int64>::Type* callback); + + protected: + virtual ~PipelineImpl(); + + private: + int64 time_; + int64 duration_; + scoped_ptr<Callback1<PipelineState>::Type> state_changed_callback_; + scoped_ptr<Callback1<int64>::Type> time_changed_callback_; + + DISALLOW_COPY_AND_ASSIGN(PipelineImpl); +}; + +} // namespace media + +#endif // MEDIA_BASE_PIPELINE_IMPL_H_ |