diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-06 19:56:48 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-06 19:56:48 +0000 |
commit | ab34f092957afab2f4e9f93bbc15b87290506f86 (patch) | |
tree | 914ca246864ed8d872101aa413528d5179c3dd8b /media | |
parent | 7e042d142e6f9cbb634beb77689ca6a400f3ffcb (diff) | |
download | chromium_src-ab34f092957afab2f4e9f93bbc15b87290506f86.zip chromium_src-ab34f092957afab2f4e9f93bbc15b87290506f86.tar.gz chromium_src-ab34f092957afab2f4e9f93bbc15b87290506f86.tar.bz2 |
Checking in stubbed out media::FilterHostImpl and updated Windows and Linux build files.
Review URL: http://codereview.chromium.org/17067
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7602 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r-- | media/base/filter_host_impl.cc | 87 | ||||
-rw-r--r-- | media/base/filter_host_impl.h | 53 | ||||
-rw-r--r-- | media/build/media.vcproj | 8 | ||||
-rw-r--r-- | media/media_lib.scons | 1 |
4 files changed, 149 insertions, 0 deletions
diff --git a/media/base/filter_host_impl.cc b/media/base/filter_host_impl.cc new file mode 100644 index 0000000..bd17b59 --- /dev/null +++ b/media/base/filter_host_impl.cc @@ -0,0 +1,87 @@ +// 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. + +#include "base/task.h" +#include "media/base/filter_host_impl.h" + +namespace media { + +FilterHostImpl::FilterHostImpl() { +} + +int64 FilterHostImpl::GetTime() const { + // TODO(scherkus): implement GetTime. + return 0; +} + +void FilterHostImpl::SetTime(int64 time) { + // TODO(scherkus): implement SetTime. +} + +int64 FilterHostImpl::GetDuration() const { + // TODO(scherkus): implement GetDuration. + return 0; +} + +void FilterHostImpl::SetDuration(int64 duration) { + // TODO(scherkus): implement SetDuration. +} + +void FilterHostImpl::PostTask(Task* task) { + // TODO(scherkus): implement PostTask. +} + +bool FilterHostImpl::PlayComplete() { + // TODO(scherkus): implement PlayComplete. + return false; +} + +bool FilterHostImpl::PauseComplete() { + // TODO(scherkus): implement PauseComplete. + return false; +} + +bool FilterHostImpl::SeekComplete() { + // TODO(scherkus): implement SeekComplete. + return false; +} + +bool FilterHostImpl::ShutdownComplete() { + // TODO(scherkus): implement ShutdownComplete. + return false; +} + +void FilterHostImpl::Error(int error) { + // TODO(scherkus): implement Error. +} + +void FilterHostImpl::EndOfStream() { + // TODO(scherkus): implement EndOfStream. +} + +void FilterHostImpl::SetPlayCallback(Callback0::Type* callback) { + play_callback_.reset(callback); +} + +void FilterHostImpl::SetPauseCallback(Callback1<bool>::Type* callback) { + pause_callback_.reset(callback); +} + +void FilterHostImpl::SetSeekCallback(Callback1<int64>::Type* callback) { + seek_callback_.reset(callback); +} + +void FilterHostImpl::SetShutdownCallback(Callback0::Type* callback) { + shutdown_callback_.reset(callback); +} + +void FilterHostImpl::SetClockCallback(Callback1<int64>::Type* callback) { + clock_callback_.reset(callback); +} + +void FilterHostImpl::SetErrorCallback(Callback1<int>::Type* callback) { + error_callback_.reset(callback); +} + +} // namespace media diff --git a/media/base/filter_host_impl.h b/media/base/filter_host_impl.h new file mode 100644 index 0000000..5ab5d92 --- /dev/null +++ b/media/base/filter_host_impl.h @@ -0,0 +1,53 @@ +// 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 FilterHostInterface. + +#ifndef MEDIA_BASE_FILTER_HOST_IMPL_H_ +#define MEDIA_BASE_FILTER_HOST_IMPL_H_ + +#include "base/task.h" +#include "media/base/filter_host.h" + +namespace media { + +class FilterHostImpl : public FilterHostInterface { + public: + FilterHostImpl(); + + // FilterHostInterface implementation. + virtual int64 GetTime() const; + virtual void SetTime(int64 time); + virtual int64 GetDuration() const; + virtual void SetDuration(int64 duration); + virtual void PostTask(Task* task); + virtual bool PlayComplete(); + virtual bool PauseComplete(); + virtual bool SeekComplete(); + virtual bool ShutdownComplete(); + virtual void Error(int error); + virtual void EndOfStream(); + + virtual void SetPlayCallback(Callback0::Type* callback); + virtual void SetPauseCallback(Callback1<bool>::Type* callback); + virtual void SetSeekCallback(Callback1<int64>::Type* callback); + virtual void SetShutdownCallback(Callback0::Type* callback); + virtual void SetClockCallback(Callback1<int64>::Type* callback); + virtual void SetErrorCallback(Callback1<int>::Type* callback); + + protected: + virtual ~FilterHostImpl() {} + + private: + scoped_ptr<Callback0::Type> play_callback_; + scoped_ptr<Callback1<bool>::Type> pause_callback_; + scoped_ptr<Callback1<int64>::Type> seek_callback_; + scoped_ptr<Callback0::Type> shutdown_callback_; + scoped_ptr<Callback1<int64>::Type> clock_callback_; + scoped_ptr<Callback1<int>::Type> error_callback_; +}; + +} // namespace media + +#endif // MEDIA_BASE_FILTER_HOST_IMPL_H_ diff --git a/media/build/media.vcproj b/media/build/media.vcproj index 8b406de..b3fb4f6 100644 --- a/media/build/media.vcproj +++ b/media/build/media.vcproj @@ -141,6 +141,14 @@ > </File> <File + RelativePath="..\base\filter_host_impl.cc" + > + </File> + <File + RelativePath="..\base\filter_host_impl.h" + > + </File> + <File RelativePath="..\base\filters.h" > </File> diff --git a/media/media_lib.scons b/media/media_lib.scons index cb49698..d17421c 100644 --- a/media/media_lib.scons +++ b/media/media_lib.scons @@ -26,6 +26,7 @@ env.Prepend( # cross-platform live below. input_files = [ 'base/data_buffer.cc', + 'base/filter_host_impl.cc', 'base/media_format.cc', ] |