| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 #include <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "net/base/mime_util.h" | 7 #include "net/base/mime_util.h" |
| 8 #include "net/base/platform_mime_util.h" | 8 #include "net/base/platform_mime_util.h" |
| 9 | 9 |
| 10 #include "base/hash_tables.h" | 10 #include "base/hash_tables.h" |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 }; | 182 }; |
| 183 | 183 |
| 184 // A list of media types: http://en.wikipedia.org/wiki/Internet_media_type | 184 // A list of media types: http://en.wikipedia.org/wiki/Internet_media_type |
| 185 // A comprehensive mime type list: http://plugindoc.mozdev.org/winmime.php | 185 // A comprehensive mime type list: http://plugindoc.mozdev.org/winmime.php |
| 186 static const char* const supported_media_types[] = { | 186 static const char* const supported_media_types[] = { |
| 187 // Ogg. | 187 // Ogg. |
| 188 "video/ogg", | 188 "video/ogg", |
| 189 "audio/ogg", | 189 "audio/ogg", |
| 190 "application/ogg", | 190 "application/ogg", |
| 191 | 191 |
| 192 #if defined(GOOGLE_CHROME_BUILD) | 192 #if defined(GOOGLE_CHROME_BUILD) || defined(USE_PROPRIETARY_CODECS) |
| 193 // MPEG-4. | 193 // MPEG-4. |
| 194 "video/mp4", | 194 "video/mp4", |
| 195 "video/x-m4v", | 195 "video/x-m4v", |
| 196 "audio/mp4", | 196 "audio/mp4", |
| 197 "audio/x-m4a", | 197 "audio/x-m4a", |
| 198 | 198 |
| 199 // MP3. | 199 // MP3. |
| 200 "audio/mp3", | 200 "audio/mp3", |
| 201 "audio/x-mp3", | 201 "audio/x-mp3", |
| 202 "audio/mpeg", | 202 "audio/mpeg", |
| 203 #endif | 203 #endif |
| 204 }; | 204 }; |
| 205 | 205 |
| 206 // List of supported codecs when passed in with <source type="...">. | 206 // List of supported codecs when passed in with <source type="...">. |
| 207 // | 207 // |
| 208 // Refer to http://wiki.whatwg.org/wiki/Video_type_parameters#Browser_Support | 208 // Refer to http://wiki.whatwg.org/wiki/Video_type_parameters#Browser_Support |
| 209 // for more information. | 209 // for more information. |
| 210 static const char* const supported_media_codecs[] = { | 210 static const char* const supported_media_codecs[] = { |
| 211 #if defined(GOOGLE_CHROME_BUILD) | 211 #if defined(GOOGLE_CHROME_BUILD) || defined(USE_PROPRIETARY_CODECS) |
| 212 "avc1", | 212 "avc1", |
| 213 "mp4a", | 213 "mp4a", |
| 214 #endif | 214 #endif |
| 215 "theora", | 215 "theora", |
| 216 "vorbis", | 216 "vorbis", |
| 217 }; | 217 }; |
| 218 | 218 |
| 219 // Note: does not include javascript types list (see supported_javascript_types) | 219 // Note: does not include javascript types list (see supported_javascript_types) |
| 220 static const char* const supported_non_image_types[] = { | 220 static const char* const supported_non_image_types[] = { |
| 221 "text/cache-manifest", | 221 "text/cache-manifest", |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 bool AreSupportedMediaCodecs(const std::vector<std::string>& codecs) { | 447 bool AreSupportedMediaCodecs(const std::vector<std::string>& codecs) { |
| 448 return GetMimeUtil()->AreSupportedMediaCodecs(codecs); | 448 return GetMimeUtil()->AreSupportedMediaCodecs(codecs); |
| 449 } | 449 } |
| 450 | 450 |
| 451 void ParseCodecString(const std::string& codecs, | 451 void ParseCodecString(const std::string& codecs, |
| 452 std::vector<std::string>* codecs_out) { | 452 std::vector<std::string>* codecs_out) { |
| 453 GetMimeUtil()->ParseCodecString(codecs, codecs_out); | 453 GetMimeUtil()->ParseCodecString(codecs, codecs_out); |
| 454 } | 454 } |
| 455 | 455 |
| 456 } // namespace net | 456 } // namespace net |
| OLD | NEW |