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

Side by Side Diff: media/base/mime_util.h

Issue 1123343007: iOS experiments (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added media_blink dependency on media_mime_util Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « media/base/BUILD.gn ('k') | media/base/mime_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2012 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.
4
5 #ifndef MEDIA_BASE_MIME_UTIL_H__
6 #define MEDIA_BASE_MIME_UTIL_H__
7
8 #include <string>
9 #include <vector>
10
11 #include "media/base/media_export.h"
12
13 namespace media {
14
15 // Check to see if a particular MIME type is in the list of
16 // supported/recognized MIME types.
17 bool IsSupportedMediaMimeType(const std::string& mime_type);
18
19 // Returns true if and only if all codecs are supported, false otherwise.
20 bool AreSupportedMediaCodecs(const std::vector<std::string>& codecs);
21
22 // Parses a codec string, populating |codecs_out| with the prefix of each codec
23 // in the string |codecs_in|. For example, passed "aaa.b.c,dd.eee", if
24 // |strip| == true |codecs_out| will contain {"aaa", "dd"}, if |strip| == false
25 // |codecs_out| will contain {"aaa.b.c", "dd.eee"}.
26 // See http://www.ietf.org/rfc/rfc4281.txt.
27 void ParseCodecString(const std::string& codecs,
28 std::vector<std::string>* codecs_out,
29 bool strip);
30
31 // Check to see if a particular MIME type is in our list which only supports a
32 // certain subset of codecs.
33 bool IsStrictMediaMimeType(const std::string& mime_type);
34
35 // Indicates that the MIME type and (possible codec string) are supported by the
36 // underlying platform.
37 enum SupportsType {
38 // The underlying platform is known not to support the given MIME type and
39 // codec combination.
40 IsNotSupported,
41
42 // The underlying platform is known to support the given MIME type and codec
43 // combination.
44 IsSupported,
45
46 // The underlying platform is unsure whether the given MIME type and codec
47 // combination can be rendered or not before actually trying to play it.
48 MayBeSupported
49 };
50
51 // Checks the |mime_type| and |codecs| against the MIME types known to support
52 // only a particular subset of codecs.
53 // * Returns IsSupported if the |mime_type| is supported and all the codecs
54 // within the |codecs| are supported for the |mime_type|.
55 // * Returns MayBeSupported if the |mime_type| is supported and is known to
56 // support only a subset of codecs, but |codecs| was empty. Also returned if
57 // all the codecs in |codecs| are supported, but additional codec parameters
58 // were supplied (such as profile) for which the support cannot be decided.
59 // * Returns IsNotSupported if either the |mime_type| is not supported or the
60 // |mime_type| is supported but at least one of the codecs within |codecs| is
61 // not supported for the |mime_type|.
62 SupportsType IsSupportedStrictMediaMimeType(
63 const std::string& mime_type,
64 const std::vector<std::string>& codecs);
65
66 // Test only method that removes proprietary media types and codecs from the
67 // list of supported MIME types and codecs. These types and codecs must be
68 // removed to ensure consistent layout test results across all Chromium
69 // variations.
70 void RemoveProprietaryMediaTypesAndCodecsForTests();
71
72 } // namespace media
73
74 #endif // MEDIA_BASE_MIME_UTIL_H__
75
OLDNEW
« no previous file with comments | « media/base/BUILD.gn ('k') | media/base/mime_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698