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

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

Issue 1624703002: Implement support for vp9 in ISO-BMFF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/mime_util_internal.h ('k') | media/base/mime_util_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 "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "base/strings/string_split.h" 8 #include "base/strings/string_split.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 27 matching lines...) Expand all
38 // mp4a.40.2 - MPEG-4 AAC LC 38 // mp4a.40.2 - MPEG-4 AAC LC
39 // mp4a.40.02 - MPEG-4 AAC LC (leading 0 in aud-oti for compatibility) 39 // mp4a.40.02 - MPEG-4 AAC LC (leading 0 in aud-oti for compatibility)
40 // mp4a.40.5 - MPEG-4 HE-AAC v1 (AAC LC + SBR) 40 // mp4a.40.5 - MPEG-4 HE-AAC v1 (AAC LC + SBR)
41 // mp4a.40.05 - MPEG-4 HE-AAC v1 (AAC LC + SBR) (leading 0 in aud-oti for 41 // mp4a.40.05 - MPEG-4 HE-AAC v1 (AAC LC + SBR) (leading 0 in aud-oti for
42 // compatibility) 42 // compatibility)
43 // mp4a.40.29 - MPEG-4 HE-AAC v2 (AAC LC + SBR + PS) 43 // mp4a.40.29 - MPEG-4 HE-AAC v2 (AAC LC + SBR + PS)
44 // 44 //
45 // avc1.42E0xx - H.264 Baseline 45 // avc1.42E0xx - H.264 Baseline
46 // avc1.4D40xx - H.264 Main 46 // avc1.4D40xx - H.264 Main
47 // avc1.6400xx - H.264 High 47 // avc1.6400xx - H.264 High
48 // vp09.... - VP9
48 static const char kMP4AudioCodecsExpression[] = 49 static const char kMP4AudioCodecsExpression[] =
49 "mp4a.66,mp4a.67,mp4a.68,mp4a.69,mp4a.6B,mp4a.40.2,mp4a.40.02,mp4a.40.5," 50 "mp4a.66,mp4a.67,mp4a.68,mp4a.69,mp4a.6B,mp4a.40.2,mp4a.40.02,mp4a.40.5,"
50 #if BUILDFLAG(ENABLE_AC3_EAC3_AUDIO_DEMUXING) 51 #if BUILDFLAG(ENABLE_AC3_EAC3_AUDIO_DEMUXING)
51 // Only one variant each of ac3 and eac3 codec string is sufficient here, 52 // Only one variant each of ac3 and eac3 codec string is sufficient here,
52 // since these strings are parsed and mapped to MimeUtil::Codec enum values. 53 // since these strings are parsed and mapped to MimeUtil::Codec enum values.
53 "ac-3,ec-3," 54 "ac-3,ec-3,"
54 #endif 55 #endif
55 "mp4a.40.05,mp4a.40.29"; 56 "mp4a.40.05,mp4a.40.29";
56 static const char kMP4VideoCodecsExpression[] = 57 static const char kMP4VideoCodecsExpression[] =
57 // This is not a complete list of supported avc1 codecs. It is simply used 58 // This is not a complete list of supported avc1 codecs. It is simply used
58 // to register support for the corresponding Codec enum. Instead of using 59 // to register support for the corresponding Codec enum. Instead of using
59 // strings in these three arrays, we should use the Codec enum values. 60 // strings in these three arrays, we should use the Codec enum values.
60 // This will avoid confusion and unnecessary parsing at runtime. 61 // This will avoid confusion and unnecessary parsing at runtime.
61 // kUnambiguousCodecStringMap/kAmbiguousCodecStringMap should be the only 62 // kUnambiguousCodecStringMap/kAmbiguousCodecStringMap should be the only
62 // mapping from strings to codecs. See crbug.com/461009. 63 // mapping from strings to codecs. See crbug.com/461009.
63 "avc1.42E00A,avc1.4D400A,avc1.64000A," 64 "avc1.42E00A,avc1.4D400A,avc1.64000A,"
64 #if BUILDFLAG(ENABLE_HEVC_DEMUXING) 65 #if BUILDFLAG(ENABLE_HEVC_DEMUXING)
65 // Any valid unambiguous HEVC codec id will work here, since these strings 66 // Any valid unambiguous HEVC codec id will work here, since these strings
66 // are parsed and mapped to MimeUtil::Codec enum values. 67 // are parsed and mapped to MimeUtil::Codec enum values.
67 "hev1.1.6.L93.B0," 68 "hev1.1.6.L93.B0,"
68 #endif 69 #endif
70 #if BUILDFLAG(ENABLE_MP4_VP9_DEMUXING)
71 // This is not a complete list of supported vp9 codecs. Similar to avc1
ddorwin 2016/04/06 01:43:42 FYI, this code has changed significantly this week
kqyang 2016/04/18 22:23:14 Done. Thanks.
72 // comments above.
73 "vp09.00.00.08.00.01.00.00,"
74 #endif
69 "mp4a.66,mp4a.67,mp4a.68,mp4a.69,mp4a.6B,mp4a.40.2,mp4a.40.02,mp4a.40.5," 75 "mp4a.66,mp4a.67,mp4a.68,mp4a.69,mp4a.6B,mp4a.40.2,mp4a.40.02,mp4a.40.5,"
70 #if BUILDFLAG(ENABLE_AC3_EAC3_AUDIO_DEMUXING) 76 #if BUILDFLAG(ENABLE_AC3_EAC3_AUDIO_DEMUXING)
71 // Only one variant each of ac3 and eac3 codec string is sufficient here, 77 // Only one variant each of ac3 and eac3 codec string is sufficient here,
72 // since these strings are parsed and mapped to MimeUtil::Codec enum values. 78 // since these strings are parsed and mapped to MimeUtil::Codec enum values.
73 "ac-3,ec-3," 79 "ac-3,ec-3,"
74 #endif 80 #endif
75 "mp4a.40.05,mp4a.40.29"; 81 "mp4a.40.05,mp4a.40.29";
76 #endif // USE_PROPRIETARY_CODECS 82 #endif // USE_PROPRIETARY_CODECS
77 83
78 // A list of media types (https://en.wikipedia.org/wiki/Media_type) and 84 // A list of media types (https://en.wikipedia.org/wiki/Media_type) and
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 }; 126 };
121 127
122 // List of codec IDs that provide enough information to determine the 128 // List of codec IDs that provide enough information to determine the
123 // codec and profile being requested. 129 // codec and profile being requested.
124 // 130 //
125 // The "mp4a" strings come from RFC 6381. 131 // The "mp4a" strings come from RFC 6381.
126 static const CodecIDMappings kUnambiguousCodecStringMap[] = { 132 static const CodecIDMappings kUnambiguousCodecStringMap[] = {
127 {"1", MimeUtil::PCM}, // We only allow this for WAV so it isn't ambiguous. 133 {"1", MimeUtil::PCM}, // We only allow this for WAV so it isn't ambiguous.
128 // avc1/avc3.XXXXXX may be unambiguous; handled by ParseAVCCodecId(). 134 // avc1/avc3.XXXXXX may be unambiguous; handled by ParseAVCCodecId().
129 // hev1/hvc1.XXXXXX may be unambiguous; handled by ParseHEVCCodecID(). 135 // hev1/hvc1.XXXXXX may be unambiguous; handled by ParseHEVCCodecID().
136 // vp9, vp9.0, vp09.xx.xx.xx.xx.xx.xx.xx may be unambiguous; handled by
137 // ParseVp9CodecID().
130 {"mp3", MimeUtil::MP3}, 138 {"mp3", MimeUtil::MP3},
131 {"mp4a.66", MimeUtil::MPEG2_AAC_MAIN}, 139 {"mp4a.66", MimeUtil::MPEG2_AAC_MAIN},
132 {"mp4a.67", MimeUtil::MPEG2_AAC_LC}, 140 {"mp4a.67", MimeUtil::MPEG2_AAC_LC},
133 {"mp4a.68", MimeUtil::MPEG2_AAC_SSR}, 141 {"mp4a.68", MimeUtil::MPEG2_AAC_SSR},
134 {"mp4a.69", MimeUtil::MP3}, 142 {"mp4a.69", MimeUtil::MP3},
135 {"mp4a.6B", MimeUtil::MP3}, 143 {"mp4a.6B", MimeUtil::MP3},
136 {"mp4a.40.2", MimeUtil::MPEG4_AAC_LC}, 144 {"mp4a.40.2", MimeUtil::MPEG4_AAC_LC},
137 {"mp4a.40.02", MimeUtil::MPEG4_AAC_LC}, 145 {"mp4a.40.02", MimeUtil::MPEG4_AAC_LC},
138 {"mp4a.40.5", MimeUtil::MPEG4_AAC_SBR_v1}, 146 {"mp4a.40.5", MimeUtil::MPEG4_AAC_SBR_v1},
139 {"mp4a.40.05", MimeUtil::MPEG4_AAC_SBR_v1}, 147 {"mp4a.40.05", MimeUtil::MPEG4_AAC_SBR_v1},
140 {"mp4a.40.29", MimeUtil::MPEG4_AAC_SBR_PS_v2}, 148 {"mp4a.40.29", MimeUtil::MPEG4_AAC_SBR_PS_v2},
141 #if BUILDFLAG(ENABLE_AC3_EAC3_AUDIO_DEMUXING) 149 #if BUILDFLAG(ENABLE_AC3_EAC3_AUDIO_DEMUXING)
142 // TODO(servolk): Strictly speaking only mp4a.A5 and mp4a.A6 codec ids are 150 // TODO(servolk): Strictly speaking only mp4a.A5 and mp4a.A6 codec ids are
143 // valid according to RFC 6381 section 3.3, 3.4. Lower-case oti (mp4a.a5 and 151 // valid according to RFC 6381 section 3.3, 3.4. Lower-case oti (mp4a.a5 and
144 // mp4a.a6) should be rejected. But we used to allow those in older versions 152 // mp4a.a6) should be rejected. But we used to allow those in older versions
145 // of Chromecast firmware and some apps (notably MPL) depend on those codec 153 // of Chromecast firmware and some apps (notably MPL) depend on those codec
146 // types being supported, so they should be allowed for now 154 // types being supported, so they should be allowed for now
147 // (crbug.com/564960). 155 // (crbug.com/564960).
148 {"ac-3", MimeUtil::AC3}, 156 {"ac-3", MimeUtil::AC3},
149 {"mp4a.a5", MimeUtil::AC3}, 157 {"mp4a.a5", MimeUtil::AC3},
150 {"mp4a.A5", MimeUtil::AC3}, 158 {"mp4a.A5", MimeUtil::AC3},
151 {"ec-3", MimeUtil::EAC3}, 159 {"ec-3", MimeUtil::EAC3},
152 {"mp4a.a6", MimeUtil::EAC3}, 160 {"mp4a.a6", MimeUtil::EAC3},
153 {"mp4a.A6", MimeUtil::EAC3}, 161 {"mp4a.A6", MimeUtil::EAC3},
154 #endif 162 #endif
155 {"vorbis", MimeUtil::VORBIS}, 163 {"vorbis", MimeUtil::VORBIS},
156 {"opus", MimeUtil::OPUS}, 164 {"opus", MimeUtil::OPUS},
157 {"vp8", MimeUtil::VP8}, 165 {"vp8", MimeUtil::VP8},
158 {"vp8.0", MimeUtil::VP8}, 166 {"vp8.0", MimeUtil::VP8},
159 {"vp9", MimeUtil::VP9},
160 {"vp9.0", MimeUtil::VP9},
161 {"theora", MimeUtil::THEORA}}; 167 {"theora", MimeUtil::THEORA}};
162 168
163 // List of codec IDs that are ambiguous and don't provide 169 // List of codec IDs that are ambiguous and don't provide
164 // enough information to determine the codec and profile. 170 // enough information to determine the codec and profile.
165 // The codec in these entries indicate the codec and profile 171 // The codec in these entries indicate the codec and profile
166 // we assume the user is trying to indicate. 172 // we assume the user is trying to indicate.
167 static const CodecIDMappings kAmbiguousCodecStringMap[] = { 173 static const CodecIDMappings kAmbiguousCodecStringMap[] = {
168 {"mp4a.40", MimeUtil::MPEG4_AAC_LC}, 174 {"mp4a.40", MimeUtil::MPEG4_AAC_LC},
169 {"avc1", MimeUtil::H264}, 175 {"avc1", MimeUtil::H264},
170 {"avc3", MimeUtil::H264}, 176 {"avc3", MimeUtil::H264},
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 *is_ambiguous = false; 266 *is_ambiguous = false;
261 } 267 }
262 268
263 return true; 269 return true;
264 } 270 }
265 271
266 return false; 272 return false;
267 } 273 }
268 #endif 274 #endif
269 275
276 // Handle parsing of vp9 codec IDs.
277 static bool ParseVp9CodecID(const std::string& mime_type_lower_case,
278 const std::string& codec_id,
279 MimeUtil::Codec* codec) {
280 if (mime_type_lower_case == "video/webm") {
281 if (codec_id == "vp9" || codec_id == "vp9.0") {
282 *codec = MimeUtil::VP9;
283 return true;
284 }
285 // TODO(kqyang): Should we support new codec string in WebM?
286 return false;
287 } else if (mime_type_lower_case == "audio/webm") {
288 return false;
289 }
290
291 #if BUILDFLAG(ENABLE_MP4_VP9_DEMUXING)
292 std::vector<std::string> fields = base::SplitString(
293 codec_id, ".", base::KEEP_WHITESPACE, base::SPLIT_WANT_ALL);
294 if (fields.size() < 1)
295 return false;
296
297 if (fields[0] == "vp09") {
298 *codec = MimeUtil::VP9;
299 } else {
300 return false;
301 }
302
303 if (fields.size() > 8)
304 return false;
305
306 std::vector<int> values;
307 for (size_t i = 1; i < fields.size(); ++i) {
308 // Missing value is not allowed.
309 if (fields[i] == "")
310 return false;
311 int value;
312 if (!base::StringToInt(fields[i], &value))
313 return false;
314 if (value < 0)
315 return false;
316 values.push_back(value);
317 }
318
319 // The spec specifies 8 fields (7 values excluding the first codec field).
320 // We do not allow missing fields.
321 if (values.size() < 7)
322 return false;
323
324 const int profile = values[0];
325 if (profile > 3)
326 return false;
327
328 const int bit_depth = values[2];
329 if (bit_depth != 8 && bit_depth != 10 && bit_depth != 12)
330 return false;
331
332 const int color_space = values[3];
333 if (color_space > 7)
334 return false;
335
336 const int chroma_subsampling = values[4];
337 if (chroma_subsampling > 3)
338 return false;
339
340 const int transfer_function = values[5];
341 if (transfer_function > 1)
342 return false;
343
344 const int video_full_range_flag = values[6];
345 if (video_full_range_flag > 1)
346 return false;
347
348 return true;
349 #else
350 return false;
351 #endif // #if BUILDFLAG(ENABLE_MP4_VP9_DEMUXING)
352 }
353
270 MimeUtil::MimeUtil() : allow_proprietary_codecs_(false) { 354 MimeUtil::MimeUtil() : allow_proprietary_codecs_(false) {
271 #if defined(OS_ANDROID) 355 #if defined(OS_ANDROID)
272 platform_info_.is_unified_media_pipeline_enabled = 356 platform_info_.is_unified_media_pipeline_enabled =
273 IsUnifiedMediaPipelineEnabled(); 357 IsUnifiedMediaPipelineEnabled();
274 // When the unified media pipeline is enabled, we need support for both GPU 358 // When the unified media pipeline is enabled, we need support for both GPU
275 // video decoders and MediaCodec; indicated by HasPlatformDecoderSupport(). 359 // video decoders and MediaCodec; indicated by HasPlatformDecoderSupport().
276 // When the Android pipeline is used, we only need access to MediaCodec. 360 // When the Android pipeline is used, we only need access to MediaCodec.
277 platform_info_.has_platform_decoders = 361 platform_info_.has_platform_decoders =
278 platform_info_.is_unified_media_pipeline_enabled 362 platform_info_.is_unified_media_pipeline_enabled
279 ? HasPlatformDecoderSupport() 363 ? HasPlatformDecoderSupport()
(...skipping 14 matching lines...) Expand all
294 const std::vector<std::string>& codecs, 378 const std::vector<std::string>& codecs,
295 const std::string& mime_type_lower_case, 379 const std::string& mime_type_lower_case,
296 bool is_encrypted) const { 380 bool is_encrypted) const {
297 DCHECK(!supported_codecs.empty()); 381 DCHECK(!supported_codecs.empty());
298 DCHECK(!codecs.empty()); 382 DCHECK(!codecs.empty());
299 383
300 SupportsType result = IsSupported; 384 SupportsType result = IsSupported;
301 for (size_t i = 0; i < codecs.size(); ++i) { 385 for (size_t i = 0; i < codecs.size(); ++i) {
302 bool is_ambiguous = true; 386 bool is_ambiguous = true;
303 Codec codec = INVALID_CODEC; 387 Codec codec = INVALID_CODEC;
304 if (!StringToCodec(codecs[i], &codec, &is_ambiguous)) 388 if (!StringToCodec(mime_type_lower_case, codecs[i], &codec, &is_ambiguous))
305 return IsNotSupported; 389 return IsNotSupported;
306 390
307 if (!IsCodecSupported(codec, mime_type_lower_case, is_encrypted) || 391 if (!IsCodecSupported(codec, mime_type_lower_case, is_encrypted) ||
308 supported_codecs.find(codec) == supported_codecs.end()) { 392 supported_codecs.find(codec) == supported_codecs.end()) {
309 return IsNotSupported; 393 return IsNotSupported;
310 } 394 }
311 395
312 if (is_ambiguous) 396 if (is_ambiguous)
313 result = MayBeSupported; 397 result = MayBeSupported;
314 } 398 }
(...skipping 20 matching lines...) Expand all
335 // Initialize the supported media formats. 419 // Initialize the supported media formats.
336 for (size_t i = 0; i < arraysize(kFormatCodecMappings); ++i) { 420 for (size_t i = 0; i < arraysize(kFormatCodecMappings); ++i) {
337 std::vector<std::string> mime_type_codecs; 421 std::vector<std::string> mime_type_codecs;
338 ParseCodecString(kFormatCodecMappings[i].codecs_list, &mime_type_codecs, 422 ParseCodecString(kFormatCodecMappings[i].codecs_list, &mime_type_codecs,
339 false); 423 false);
340 424
341 CodecSet codecs; 425 CodecSet codecs;
342 for (size_t j = 0; j < mime_type_codecs.size(); ++j) { 426 for (size_t j = 0; j < mime_type_codecs.size(); ++j) {
343 Codec codec = INVALID_CODEC; 427 Codec codec = INVALID_CODEC;
344 bool is_ambiguous = true; 428 bool is_ambiguous = true;
345 CHECK(StringToCodec(mime_type_codecs[j], &codec, &is_ambiguous)); 429 CHECK(StringToCodec(kFormatCodecMappings[i].mime_type,
430 mime_type_codecs[j], &codec, &is_ambiguous));
346 DCHECK(!is_ambiguous); 431 DCHECK(!is_ambiguous);
347 codecs.insert(codec); 432 codecs.insert(codec);
348 } 433 }
349 434
350 media_format_map_[kFormatCodecMappings[i].mime_type] = codecs; 435 media_format_map_[kFormatCodecMappings[i].mime_type] = codecs;
351 } 436 }
352 } 437 }
353 438
354 bool MimeUtil::IsSupportedMediaMimeType(const std::string& mime_type) const { 439 bool MimeUtil::IsSupportedMediaMimeType(const std::string& mime_type) const {
355 return media_format_map_.find(base::ToLowerASCII(mime_type)) != 440 return media_format_map_.find(base::ToLowerASCII(mime_type)) !=
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 622
538 // MediaPlayer can always play VP8. Note: This is incorrect for MSE, but 623 // MediaPlayer can always play VP8. Note: This is incorrect for MSE, but
539 // MSE does not use this code. http://crbug.com/587303. 624 // MSE does not use this code. http://crbug.com/587303.
540 return true; 625 return true;
541 626
542 case VP9: { 627 case VP9: {
543 // If clear, the unified pipeline can always decode VP9 in software. 628 // If clear, the unified pipeline can always decode VP9 in software.
544 if (!is_encrypted && platform_info.is_unified_media_pipeline_enabled) 629 if (!is_encrypted && platform_info.is_unified_media_pipeline_enabled)
545 return true; 630 return true;
546 631
547 // Otherwise, platform support is required. 632 if (!platform_info.supports_vp9)
548 return platform_info.supports_vp9; 633 return false;
634
635 // Encrypted content is demuxed so the container is irrelevant.
636 if (is_encrypted)
637 return true;
638
639 // MediaPlayer only supports VP9 in WebM.
640 return mime_type_lower_case == "video/webm";
549 } 641 }
550 } 642 }
551 643
552 return false; 644 return false;
553 } 645 }
554 646
555 bool MimeUtil::StringToCodec(const std::string& codec_id, 647 bool MimeUtil::StringToCodec(const std::string& mime_type_lower_case,
648 const std::string& codec_id,
556 Codec* codec, 649 Codec* codec,
557 bool* is_ambiguous) const { 650 bool* is_ambiguous) const {
558 StringToCodecMappings::const_iterator itr = 651 StringToCodecMappings::const_iterator itr =
559 string_to_codec_map_.find(codec_id); 652 string_to_codec_map_.find(codec_id);
560 if (itr != string_to_codec_map_.end()) { 653 if (itr != string_to_codec_map_.end()) {
561 *codec = itr->second.codec; 654 *codec = itr->second.codec;
562 *is_ambiguous = itr->second.is_ambiguous; 655 *is_ambiguous = itr->second.is_ambiguous;
563 return true; 656 return true;
564 } 657 }
565 658
(...skipping 11 matching lines...) Expand all
577 uint8_t level_idc = 0; 670 uint8_t level_idc = 0;
578 if (ParseAVCCodecId(codec_id, &profile, &level_idc)) { 671 if (ParseAVCCodecId(codec_id, &profile, &level_idc)) {
579 *codec = MimeUtil::H264; 672 *codec = MimeUtil::H264;
580 *is_ambiguous = 673 *is_ambiguous =
581 (profile != H264PROFILE_BASELINE && profile != H264PROFILE_MAIN && 674 (profile != H264PROFILE_BASELINE && profile != H264PROFILE_MAIN &&
582 profile != H264PROFILE_HIGH) || 675 profile != H264PROFILE_HIGH) ||
583 !IsValidH264Level(level_idc); 676 !IsValidH264Level(level_idc);
584 return true; 677 return true;
585 } 678 }
586 679
680 if (ParseVp9CodecID(mime_type_lower_case, codec_id, codec)) {
681 *is_ambiguous = false;
682 return true;
683 }
684
587 DVLOG(4) << __FUNCTION__ << ": Unrecognized codec id " << codec_id; 685 DVLOG(4) << __FUNCTION__ << ": Unrecognized codec id " << codec_id;
588 return false; 686 return false;
589 } 687 }
590 688
591 bool MimeUtil::IsCodecSupported(Codec codec, 689 bool MimeUtil::IsCodecSupported(Codec codec,
592 const std::string& mime_type_lower_case, 690 const std::string& mime_type_lower_case,
593 bool is_encrypted) const { 691 bool is_encrypted) const {
594 DCHECK_NE(codec, INVALID_CODEC); 692 DCHECK_NE(codec, INVALID_CODEC);
595 693
596 #if defined(OS_ANDROID) 694 #if defined(OS_ANDROID)
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 const std::string& mime_type_lower_case, 750 const std::string& mime_type_lower_case,
653 bool is_encrypted) const { 751 bool is_encrypted) const {
654 Codec default_codec = Codec::INVALID_CODEC; 752 Codec default_codec = Codec::INVALID_CODEC;
655 if (!GetDefaultCodecLowerCase(mime_type_lower_case, &default_codec)) 753 if (!GetDefaultCodecLowerCase(mime_type_lower_case, &default_codec))
656 return false; 754 return false;
657 return IsCodecSupported(default_codec, mime_type_lower_case, is_encrypted); 755 return IsCodecSupported(default_codec, mime_type_lower_case, is_encrypted);
658 } 756 }
659 757
660 } // namespace internal 758 } // namespace internal
661 } // namespace media 759 } // namespace media
OLDNEW
« no previous file with comments | « media/base/mime_util_internal.h ('k') | media/base/mime_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698