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

Unified Diff: media/filters/stream_parser_factory.h

Issue 12713004: Add Chromium-side changes for MediaSource::isTypeSupported() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Relax DEPS strictness to media/filters & rebased. Created 7 years, 9 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 | « media/filters/chunk_demuxer.cc ('k') | media/filters/stream_parser_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/stream_parser_factory.h
diff --git a/media/filters/stream_parser_factory.h b/media/filters/stream_parser_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..ccf394150bcd73978452d313b7c18d7c74951a86
--- /dev/null
+++ b/media/filters/stream_parser_factory.h
@@ -0,0 +1,42 @@
+// Copyright (c) 2013 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.
+
+#ifndef MEDIA_FILTERS_STREAM_PARSER_FACTORY_H_
+#define MEDIA_FILTERS_STREAM_PARSER_FACTORY_H_
+
+#include <string>
+#include <vector>
+
+#include "base/memory/scoped_ptr.h"
+#include "media/base/media_export.h"
+#include "media/base/media_log.h"
+
+namespace media {
+
+class StreamParser;
+
+class MEDIA_EXPORT StreamParserFactory {
+ public:
+ // Checks to see if the specified |type| and |codecs| list are supported.
+ // Returns true if |type| and all codecs listed in |codecs| are supported.
+ static bool IsTypeSupported(
+ const std::string& type, const std::vector<std::string>& codecs);
+
+ // Creates a new StreamParser object if the specified |type| and |codecs| list
+ // are supported. |log_cb| can be used to report errors if there is something
+ // wrong with |type| or the codec IDs in |codecs|.
+ // Returns a new StreamParser object if |type| and all codecs listed in
+ // |codecs| are supported.
+ // |has_audio| is true if an audio codec was specified.
+ // |has_video| is true if a video codec was specified.
+ // Returns NULL otherwise. The values of |has_audio| and |has_video| are
+ // undefined.
+ static scoped_ptr<media::StreamParser> Create(
+ const std::string& type, const std::vector<std::string>& codecs,
+ const LogCB& log_cb, bool* has_audio, bool* has_video);
+};
+
+} // namespace media
+
+#endif // MEDIA_FILTERS_STREAM_PARSER_FACTORY_H_
« no previous file with comments | « media/filters/chunk_demuxer.cc ('k') | media/filters/stream_parser_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698