1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MEDIA_FILTERS_STREAM_PARSER_FACTORY_H_
6 #define MEDIA_FILTERS_STREAM_PARSER_FACTORY_H_
12 #include "media/base/media_export.h"
13 #include "media/base/media_log.h"
19 class MEDIA_EXPORT StreamParserFactory {
21 // Checks to see if the specified |type| and |codecs| list are supported.
22 // Returns true if |type| and all codecs listed in |codecs| are supported.
23 static bool IsTypeSupported(
24 const std::string& type, const std::vector<std::string>& codecs);
26 // Creates a new StreamParser object if the specified |type| and |codecs| list
27 // are supported. |media_log| can be used to report errors if there is
28 // something wrong with |type| or the codec IDs in |codecs|.
29 // Returns a new StreamParser object if |type| and all codecs listed in
30 // |codecs| are supported.
31 // Returns NULL otherwise.
32 static std::unique_ptr<StreamParser> Create(
33 const std::string& type,
34 const std::vector<std::string>& codecs,
40 #endif // MEDIA_FILTERS_STREAM_PARSER_FACTORY_H_