Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(838)

Unified Diff: media/base/factory.h

Issue 18546: Implementation of Pipeline and FilterHost interfaces. This is a large change... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/thread_unittest.cc ('k') | media/base/filter_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/factory.h
===================================================================
--- media/base/factory.h (revision 8731)
+++ media/base/factory.h (working copy)
@@ -47,7 +47,7 @@
// bool success = Create<AudioDecoder>(media_format, &filter);
template <class T>
bool Create(const MediaFormat* media_format, T** filter_out) {
- return Create(T::kFilterType, media_format,
+ return Create(T::filter_type(), media_format,
reinterpret_cast<MediaFilter**>(filter_out));
}
@@ -77,7 +77,7 @@
//
// You can create the filter factory like so:
// new TypeFilterFactory<YourFilterType>()
-template <class T>
+template <class Filter>
class TypeFilterFactory : public FilterFactory {
public:
TypeFilterFactory() {}
@@ -87,9 +87,10 @@
// Create is declared.
virtual bool Create(FilterType filter_type, const MediaFormat* media_format,
MediaFilter** filter_out) {
- T* typed_out;
- if (T::kFilterType == filter_type && T::Create(media_format, &typed_out)) {
- *filter_out = typed_out;
+ Filter* filter;
+ if (Filter::filter_type() == filter_type &&
+ Filter::Create(media_format, &filter)) {
+ *filter_out = filter;
return true;
}
return false;
« no previous file with comments | « base/thread_unittest.cc ('k') | media/base/filter_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698