Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/audio_codecs.h" | |
| 11 #include "media/base/media_export.h" | 12 #include "media/base/media_export.h" |
| 13 #include "media/base/video_codecs.h" | |
| 12 | 14 |
| 13 namespace media { | 15 namespace media { |
| 14 | 16 |
| 15 // Check to see if a particular MIME type is in the list of | 17 // Check to see if a particular MIME type is in the list of |
| 16 // supported/recognized MIME types. | 18 // supported/recognized MIME types. |
| 17 MEDIA_EXPORT bool IsSupportedMediaMimeType(const std::string& mime_type); | 19 MEDIA_EXPORT bool IsSupportedMediaMimeType(const std::string& mime_type); |
| 18 | 20 |
| 19 // Splits various codecs into |codecs_out|, conditionally stripping the profile | 21 // Splits various codecs into |codecs_out|, conditionally stripping the profile |
| 20 // and level info when |strip| == true. For example, passed "aaa.b.c,dd.eee", if | 22 // 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 | 23 // |strip| == true |codecs_out| will contain {"aaa", "dd"}, if |strip| == false |
| 22 // |codecs_out| will contain {"aaa.b.c", "dd.eee"}. | 24 // |codecs_out| will contain {"aaa.b.c", "dd.eee"}. |
| 23 // See http://www.ietf.org/rfc/rfc4281.txt. | 25 // See http://www.ietf.org/rfc/rfc4281.txt. |
| 24 MEDIA_EXPORT void SplitCodecsToVector(const std::string& codecs, | 26 MEDIA_EXPORT void SplitCodecsToVector(const std::string& codecs, |
| 25 std::vector<std::string>* codecs_out, | 27 std::vector<std::string>* codecs_out, |
| 26 bool strip); | 28 bool strip); |
| 27 | 29 |
| 30 MEDIA_EXPORT bool ParseVideoCodecString(const std::string& mime_type, | |
| 31 const std::string& codec_id, | |
| 32 bool* out_is_ambiguous, | |
| 33 VideoCodec* out_codec, | |
| 34 VideoCodecProfile* out_profile, | |
| 35 uint8_t* out_level, | |
| 36 VideoColorSpace* out_colorspace); | |
| 37 | |
| 38 MEDIA_EXPORT bool ParseAudioCodecString(const std::string& mime_type, | |
| 39 const std::string& codec_id, | |
| 40 bool* out_is_ambiguous, | |
| 41 AudioCodec* out_codec); | |
|
mlamouri (slow - plz ping)
2017/05/11 09:59:07
Here and for the internal header too, it would be
| |
| 42 | |
| 28 // Indicates that the MIME type and (possible codec string) are supported. | 43 // Indicates that the MIME type and (possible codec string) are supported. |
| 29 enum SupportsType { | 44 enum SupportsType { |
| 30 // The given MIME type and codec combination is not supported. | 45 // The given MIME type and codec combination is not supported. |
| 31 IsNotSupported, | 46 IsNotSupported, |
| 32 | 47 |
| 33 // The given MIME type and codec combination is supported. | 48 // The given MIME type and codec combination is supported. |
| 34 IsSupported, | 49 IsSupported, |
| 35 | 50 |
| 36 // There's not enough information to determine if the given MIME type and | 51 // There's not enough information to determine if the given MIME type and |
| 37 // codec combination can be rendered or not before actually trying to play it. | 52 // codec combination can be rendered or not before actually trying to play it. |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 60 | 75 |
| 61 // Test only method that removes proprietary media types and codecs from the | 76 // 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 | 77 // list of supported MIME types and codecs. These types and codecs must be |
| 63 // removed to ensure consistent layout test results across all Chromium | 78 // removed to ensure consistent layout test results across all Chromium |
| 64 // variations. | 79 // variations. |
| 65 MEDIA_EXPORT void RemoveProprietaryMediaTypesAndCodecsForTests(); | 80 MEDIA_EXPORT void RemoveProprietaryMediaTypesAndCodecsForTests(); |
| 66 | 81 |
| 67 } // namespace media | 82 } // namespace media |
| 68 | 83 |
| 69 #endif // MEDIA_BASE_MIME_UTIL_H_ | 84 #endif // MEDIA_BASE_MIME_UTIL_H_ |
| OLD | NEW |