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

Side by Side Diff: net/base/mime_util.cc

Issue 23463020: Make sure canPlayType does not return probably/maybe for VP9 on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove extra blank line.wq Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include <algorithm> 5 #include <algorithm>
6 #include <iterator> 6 #include <iterator>
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 "audio/mp4", 287 "audio/mp4",
288 "audio/x-m4a", 288 "audio/x-m4a",
289 289
290 // MP3. 290 // MP3.
291 "audio/mp3", 291 "audio/mp3",
292 "audio/x-mp3", 292 "audio/x-mp3",
293 "audio/mpeg", 293 "audio/mpeg",
294 }; 294 };
295 295
296 // List of supported codecs when passed in with <source type="...">. 296 // List of supported codecs when passed in with <source type="...">.
297 // This set of codecs is supported by all variations of Chromium. 297 // This set of codecs is supported by all variations of Chromium.
asanka 2013/09/06 19:13:32 This comment is increasingly incorrect.
Tom Finegan 2013/09/06 21:00:48 Agreed. Also, in addition to the accuracy of the c
298 // 298 //
299 // Refer to http://wiki.whatwg.org/wiki/Video_type_parameters#Browser_Support 299 // Refer to http://wiki.whatwg.org/wiki/Video_type_parameters#Browser_Support
300 // for more information. 300 // for more information.
301 // 301 //
302 // The codecs for WAV are integers as defined in Appendix A of RFC2361: 302 // The codecs for WAV are integers as defined in Appendix A of RFC2361:
303 // http://tools.ietf.org/html/rfc2361 303 // http://tools.ietf.org/html/rfc2361
304 static const char* const common_media_codecs[] = { 304 static const char* const common_media_codecs[] = {
305 #if !defined(OS_ANDROID) // Android doesn't support Ogg Theora. 305 #if !defined(OS_ANDROID) // Android doesn't support Ogg Theora.
306 "theora", 306 "theora",
307 "vp9", // TODO(tomfinegan): Move vp9 back down with vp8 once VP9 is supported
308 // on Android. https://crbug.com/285016
307 #endif 309 #endif
308 "vorbis", 310 "vorbis",
309 "vp8", 311 "vp8",
310 "vp9",
311 "1" // WAVE_FORMAT_PCM. 312 "1" // WAVE_FORMAT_PCM.
312 }; 313 };
313 314
314 // List of proprietary codecs only supported by Google Chrome. 315 // List of proprietary codecs only supported by Google Chrome.
315 static const char* const proprietary_media_codecs[] = { 316 static const char* const proprietary_media_codecs[] = {
316 "avc1", 317 "avc1",
317 "mp4a" 318 "mp4a"
318 }; 319 };
319 320
320 // Note: does not include javascript types list (see supported_javascript_types) 321 // Note: does not include javascript types list (see supported_javascript_types)
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 "text/jscript", 407 "text/jscript",
407 "text/livescript" 408 "text/livescript"
408 }; 409 };
409 410
410 struct MediaFormatStrict { 411 struct MediaFormatStrict {
411 const char* mime_type; 412 const char* mime_type;
412 const char* codecs_list; 413 const char* codecs_list;
413 }; 414 };
414 415
415 static const MediaFormatStrict format_codec_mappings[] = { 416 static const MediaFormatStrict format_codec_mappings[] = {
417 // TODO(tomfinegan): Remove this if/else when VP9 is supported on Android.
418 // https://crbug.com/285016
419 #if !defined(OS_ANDROID)
416 { "video/webm", "vorbis,vp8,vp8.0,vp9,vp9.0" }, 420 { "video/webm", "vorbis,vp8,vp8.0,vp9,vp9.0" },
421 #else
422 { "video/webm", "vorbis,vp8,vp8.0" },
423 #endif
417 { "audio/webm", "vorbis" }, 424 { "audio/webm", "vorbis" },
418 { "audio/wav", "1" } 425 { "audio/wav", "1" }
419 }; 426 };
420 427
421 MimeUtil::MimeUtil() { 428 MimeUtil::MimeUtil() {
422 InitializeMimeTypeMaps(); 429 InitializeMimeTypeMaps();
423 } 430 }
424 431
425 // static 432 // static
426 bool MimeUtil::AreSupportedCodecs(const MimeMappings& supported_codecs, 433 bool MimeUtil::AreSupportedCodecs(const MimeMappings& supported_codecs,
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 post_data->append("\r\n" + value + "\r\n"); 1001 post_data->append("\r\n" + value + "\r\n");
995 } 1002 }
996 1003
997 void AddMultipartFinalDelimiterForUpload(const std::string& mime_boundary, 1004 void AddMultipartFinalDelimiterForUpload(const std::string& mime_boundary,
998 std::string* post_data) { 1005 std::string* post_data) {
999 DCHECK(post_data); 1006 DCHECK(post_data);
1000 post_data->append("--" + mime_boundary + "--\r\n"); 1007 post_data->append("--" + mime_boundary + "--\r\n");
1001 } 1008 }
1002 1009
1003 } // namespace net 1010 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698