| 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_INTERNAL_H_ | 5 #ifndef MEDIA_BASE_MIME_UTIL_INTERNAL_H_ |
| 6 #define MEDIA_BASE_MIME_UTIL_INTERNAL_H_ | 6 #define MEDIA_BASE_MIME_UTIL_INTERNAL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 bool is_encrypted) const; | 102 bool is_encrypted) const; |
| 103 | 103 |
| 104 // Converts a codec ID into an Codec enum value and indicates | 104 // Converts a codec ID into an Codec enum value and indicates |
| 105 // whether the conversion was ambiguous. | 105 // whether the conversion was ambiguous. |
| 106 // Returns true if this method was able to map |codec_id| to a specific | 106 // Returns true if this method was able to map |codec_id| to a specific |
| 107 // Codec enum value. |codec| and |is_ambiguous| are only valid if true | 107 // Codec enum value. |codec| and |is_ambiguous| are only valid if true |
| 108 // is returned. Otherwise their value is undefined after the call. | 108 // is returned. Otherwise their value is undefined after the call. |
| 109 // |is_ambiguous| is true if |codec_id| did not have enough information to | 109 // |is_ambiguous| is true if |codec_id| did not have enough information to |
| 110 // unambiguously determine the proper Codec enum value. If |is_ambiguous| | 110 // unambiguously determine the proper Codec enum value. If |is_ambiguous| |
| 111 // is true |codec| contains the best guess for the intended Codec enum value. | 111 // is true |codec| contains the best guess for the intended Codec enum value. |
| 112 // |is_encrypted| means the codec will be used with encrypted blocks. |
| 112 bool StringToCodec(const std::string& codec_id, | 113 bool StringToCodec(const std::string& codec_id, |
| 113 Codec* codec, | 114 Codec* codec, |
| 114 bool* is_ambiguous) const; | 115 bool* is_ambiguous, |
| 116 bool is_encrypted) const; |
| 115 | 117 |
| 116 // Returns true if |codec| is supported when contained in | 118 // Returns true if |codec| is supported when contained in |
| 117 // |mime_type_lower_case|. Note: This method will always return false for | 119 // |mime_type_lower_case|. Note: This method will always return false for |
| 118 // proprietary codecs if |allow_proprietary_codecs_| is set to false. | 120 // proprietary codecs if |allow_proprietary_codecs_| is set to false. |
| 119 // |is_encrypted| means the codec will be used with encrypted blocks. | 121 // |is_encrypted| means the codec will be used with encrypted blocks. |
| 120 bool IsCodecSupported(Codec codec, | 122 bool IsCodecSupported(Codec codec, |
| 121 const std::string& mime_type_lower_case, | 123 const std::string& mime_type_lower_case, |
| 122 bool is_encrypted) const; | 124 bool is_encrypted) const; |
| 123 | 125 |
| 124 // Returns true if |codec| refers to a proprietary codec. | 126 // Returns true if |codec| refers to a proprietary codec. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 151 // Lookup table for string compare based string -> Codec mappings. | 153 // Lookup table for string compare based string -> Codec mappings. |
| 152 StringToCodecMappings string_to_codec_map_; | 154 StringToCodecMappings string_to_codec_map_; |
| 153 | 155 |
| 154 DISALLOW_COPY_AND_ASSIGN(MimeUtil); | 156 DISALLOW_COPY_AND_ASSIGN(MimeUtil); |
| 155 }; | 157 }; |
| 156 | 158 |
| 157 } // namespace internal | 159 } // namespace internal |
| 158 } // namespace media | 160 } // namespace media |
| 159 | 161 |
| 160 #endif // MEDIA_BASE_MIME_UTIL_INTERNAL_H_ | 162 #endif // MEDIA_BASE_MIME_UTIL_INTERNAL_H_ |
| OLD | NEW |