summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/media/data_source_impl.h
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-03 04:52:53 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-03 04:52:53 +0000
commitd43ed917b1f7e8f875d2ee2aa0587512e265e28e (patch)
tree64b04bda5e59e98a387235000779a2b050f9fa2b /chrome/renderer/media/data_source_impl.h
parent08e6413a6565ba434e1054a1df1c9fb778dad352 (diff)
downloadchromium_src-d43ed917b1f7e8f875d2ee2aa0587512e265e28e.zip
chromium_src-d43ed917b1f7e8f875d2ee2aa0587512e265e28e.tar.gz
chromium_src-d43ed917b1f7e8f875d2ee2aa0587512e265e28e.tar.bz2
Merged with latest media pipeline and cleaned up some style stuff.
Changed WebMediaPlayerDelegateImpl to contains a PipelineImpl object rather keeping a pointer to Pipeline interface. Also added code for task coordination between pipeline thread and main thread. Review URL: http://codereview.chromium.org/19481 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9069 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/media/data_source_impl.h')
-rw-r--r--chrome/renderer/media/data_source_impl.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/chrome/renderer/media/data_source_impl.h b/chrome/renderer/media/data_source_impl.h
index fe5bab8..33cbadf 100644
--- a/chrome/renderer/media/data_source_impl.h
+++ b/chrome/renderer/media/data_source_impl.h
@@ -7,12 +7,15 @@
#include <string>
+#include "media/base/factory.h"
#include "media/base/filters.h"
#include "media/base/media_format.h"
+class WebMediaPlayerDelegateImpl;
+
class DataSourceImpl : public media::DataSource {
public:
- DataSourceImpl();
+ DataSourceImpl(WebMediaPlayerDelegateImpl* delegate);
// media::MediaFilter implementation.
virtual void Stop();
@@ -25,10 +28,22 @@ class DataSourceImpl : public media::DataSource {
virtual bool SetPosition(int64 position);
virtual bool GetSize(int64* size_out);
+ // Static method for creating factory for this object.
+ static media::FilterFactory* CreateFactory(
+ WebMediaPlayerDelegateImpl* delegate) {
+ return new media::FilterFactoryImpl1<DataSourceImpl,
+ WebMediaPlayerDelegateImpl*>(delegate);
+ }
+
+ // Answers question from the factory to see if we accept |format|.
+ static bool IsMediaFormatSupported(const media::MediaFormat* format);
+
protected:
virtual ~DataSourceImpl();
private:
+ WebMediaPlayerDelegateImpl* delegate_;
+
DISALLOW_COPY_AND_ASSIGN(DataSourceImpl);
};