diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-11 18:25:17 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-11 18:25:17 +0000 |
commit | add51775d1c026558f12a2ae65960db83ff79f88 (patch) | |
tree | 71a00175d4fd74e093297b66b975608e36c54c0f /media | |
parent | c4e944f68c080d06737f15ecb60fa69caf001275 (diff) | |
download | chromium_src-add51775d1c026558f12a2ae65960db83ff79f88.zip chromium_src-add51775d1c026558f12a2ae65960db83ff79f88.tar.gz chromium_src-add51775d1c026558f12a2ae65960db83ff79f88.tar.bz2 |
Enable <video> in test_shell
This is a work in progress draft.
Summary of changes:
1. Moved code shared by chrome and test_shell to webkie/glue:
WebMediaPlayerImpl
SimpleDataSource
VideoRendererImpl
2. Since WebMediaPlayerImpl is shared, chrome specific renderers
are enabled by passing the FilterFactoryCollection into
WebMediaPlayerImpl, this is done in RenderView. And
WebMediaPlayerImpl provides some default renderer filters,
which are used by the test shell and also chrome.
Review URL: http://codereview.chromium.org/119229
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18182 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r-- | media/base/factory.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/media/base/factory.h b/media/base/factory.h index 91e5bc4..3ccfcb1 100644 --- a/media/base/factory.h +++ b/media/base/factory.h @@ -156,6 +156,28 @@ class FilterFactoryImpl1 : public FilterFactory { DISALLOW_COPY_AND_ASSIGN(FilterFactoryImpl1); }; +template <class Filter, class A, class B> +class FilterFactoryImpl2 : public FilterFactory { + public: + FilterFactoryImpl2(A a, B b) : a_(a), b_(b) {} + + protected: + virtual MediaFilter* Create(FilterType filter_type, + const MediaFormat& media_format) { + Filter* filter = NULL; + if (Filter::filter_type() == filter_type && + Filter::IsMediaFormatSupported(media_format)) { + filter = new Filter(a_, b_); + } + return filter; + } + + private: + A const a_; + B const b_; + + DISALLOW_COPY_AND_ASSIGN(FilterFactoryImpl2); +}; //------------------------------------------------------------------------------ |