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

Side by Side Diff: media/base/mime_util_internal.cc

Issue 2928873002: Enable VP9 in MP4 by default (Closed)
Patch Set: Created 3 years, 6 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 | « media/base/media_switches.cc ('k') | media/filters/chunk_demuxer_unittest.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 #include "media/base/mime_util_internal.h" 5 #include "media/base/mime_util_internal.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 return kStringToCodecMap; 83 return kStringToCodecMap;
84 } 84 }
85 85
86 static bool ParseVp9CodecID(const std::string& mime_type_lower_case, 86 static bool ParseVp9CodecID(const std::string& mime_type_lower_case,
87 const std::string& codec_id, 87 const std::string& codec_id,
88 VideoCodecProfile* out_profile, 88 VideoCodecProfile* out_profile,
89 uint8_t* out_level, 89 uint8_t* out_level,
90 VideoColorSpace* out_color_space) { 90 VideoColorSpace* out_color_space) {
91 if (mime_type_lower_case == "video/mp4") { 91 if (mime_type_lower_case == "video/mp4") {
92 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 92 // Only new style is allowed for mp4.
93 switches::kEnableVp9InMp4)) { 93 return ParseNewStyleVp9CodecID(codec_id, out_profile, out_level,
94 // Only new style is allowed for mp4. 94 out_color_space);
95 return ParseNewStyleVp9CodecID(codec_id, out_profile, out_level,
96 out_color_space);
97 }
98 } else if (mime_type_lower_case == "video/webm") { 95 } else if (mime_type_lower_case == "video/webm") {
99 if (HasNewVp9CodecStringSupport() && 96 if (HasNewVp9CodecStringSupport() &&
100 ParseNewStyleVp9CodecID(codec_id, out_profile, out_level, 97 ParseNewStyleVp9CodecID(codec_id, out_profile, out_level,
101 out_color_space)) { 98 out_color_space)) {
102 return true; 99 return true;
103 } 100 }
104 101
105 return ParseLegacyVp9CodecID(codec_id, out_profile, out_level); 102 return ParseLegacyVp9CodecID(codec_id, out_profile, out_level);
106 } 103 }
107 return false; 104 return false;
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 if (mime_type == "audio/flac") { 967 if (mime_type == "audio/flac") {
971 *default_codec = MimeUtil::FLAC; 968 *default_codec = MimeUtil::FLAC;
972 return true; 969 return true;
973 } 970 }
974 971
975 return false; 972 return false;
976 } 973 }
977 974
978 } // namespace internal 975 } // namespace internal
979 } // namespace media 976 } // namespace media
OLDNEW
« no previous file with comments | « media/base/media_switches.cc ('k') | media/filters/chunk_demuxer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698