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

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

Issue 2700893003: Various MimeUtil cleanups. (Closed)
Patch Set: Feedback Created 3 years, 10 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 | « content/renderer/media/recorder/media_recorder_handler.cc ('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
1 // Copyright 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_BASE_MIME_UTIL_H_ 5 #ifndef MEDIA_BASE_MIME_UTIL_H_
6 #define MEDIA_BASE_MIME_UTIL_H_ 6 #define MEDIA_BASE_MIME_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "media/base/media_export.h" 11 #include "media/base/media_export.h"
12 12
13 namespace media { 13 namespace media {
14 14
15 // Check to see if a particular MIME type is in the list of 15 // Check to see if a particular MIME type is in the list of
16 // supported/recognized MIME types. 16 // supported/recognized MIME types.
17 MEDIA_EXPORT bool IsSupportedMediaMimeType(const std::string& mime_type); 17 MEDIA_EXPORT bool IsSupportedMediaMimeType(const std::string& mime_type);
18 18
19 // Parses a codec string, populating |codecs_out| with the prefix of each codec 19 // Splits various codecs into |codecs_out|, conditionally stripping the profile
20 // in the string |codecs_in|. For example, passed "aaa.b.c,dd.eee", if 20 // and level info when |strip| == true. For example, passed "aaa.b.c,dd.eee", if
21 // |strip| == true |codecs_out| will contain {"aaa", "dd"}, if |strip| == false 21 // |strip| == true |codecs_out| will contain {"aaa", "dd"}, if |strip| == false
22 // |codecs_out| will contain {"aaa.b.c", "dd.eee"}. 22 // |codecs_out| will contain {"aaa.b.c", "dd.eee"}.
23 // See http://www.ietf.org/rfc/rfc4281.txt. 23 // See http://www.ietf.org/rfc/rfc4281.txt.
24 MEDIA_EXPORT void ParseCodecString(const std::string& codecs, 24 MEDIA_EXPORT void SplitCodecsToVector(const std::string& codecs,
25 std::vector<std::string>* codecs_out, 25 std::vector<std::string>* codecs_out,
26 bool strip); 26 bool strip);
27 27
28 // Indicates that the MIME type and (possible codec string) are supported. 28 // Indicates that the MIME type and (possible codec string) are supported.
29 enum SupportsType { 29 enum SupportsType {
30 // The given MIME type and codec combination is not supported. 30 // The given MIME type and codec combination is not supported.
31 IsNotSupported, 31 IsNotSupported,
32 32
33 // The given MIME type and codec combination is supported. 33 // The given MIME type and codec combination is supported.
34 IsSupported, 34 IsSupported,
35 35
36 // There's not enough information to determine if the given MIME type and 36 // There's not enough information to determine if the given MIME type and
(...skipping 23 matching lines...) Expand all
60 60
61 // Test only method that removes proprietary media types and codecs from the 61 // Test only method that removes proprietary media types and codecs from the
62 // list of supported MIME types and codecs. These types and codecs must be 62 // list of supported MIME types and codecs. These types and codecs must be
63 // removed to ensure consistent layout test results across all Chromium 63 // removed to ensure consistent layout test results across all Chromium
64 // variations. 64 // variations.
65 MEDIA_EXPORT void RemoveProprietaryMediaTypesAndCodecsForTests(); 65 MEDIA_EXPORT void RemoveProprietaryMediaTypesAndCodecsForTests();
66 66
67 } // namespace media 67 } // namespace media
68 68
69 #endif // MEDIA_BASE_MIME_UTIL_H_ 69 #endif // MEDIA_BASE_MIME_UTIL_H_
OLDNEW
« no previous file with comments | « content/renderer/media/recorder/media_recorder_handler.cc ('k') | media/base/mime_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698