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

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

Issue 1846683003: Merge M50: "Spitzer: Report Opus in Ogg as supported by unified pipeline" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 8 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 | « 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 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 // A list of media types (https://en.wikipedia.org/wiki/Media_type) and 78 // A list of media types (https://en.wikipedia.org/wiki/Media_type) and
79 // corresponding media codecs supported by these types/containers. 79 // corresponding media codecs supported by these types/containers.
80 // Media formats marked as PROPRIETARY are not supported by Chromium, only 80 // Media formats marked as PROPRIETARY are not supported by Chromium, only
81 // Google Chrome browser supports them. 81 // Google Chrome browser supports them.
82 static const MediaFormat kFormatCodecMappings[] = { 82 static const MediaFormat kFormatCodecMappings[] = {
83 {"video/webm", COMMON, "opus,vorbis,vp8,vp8.0,vp9,vp9.0"}, 83 {"video/webm", COMMON, "opus,vorbis,vp8,vp8.0,vp9,vp9.0"},
84 {"audio/webm", COMMON, "opus,vorbis"}, 84 {"audio/webm", COMMON, "opus,vorbis"},
85 {"audio/wav", COMMON, "1"}, 85 {"audio/wav", COMMON, "1"},
86 {"audio/x-wav", COMMON, "1"}, 86 {"audio/x-wav", COMMON, "1"},
87 #if defined(OS_ANDROID) 87 #if !defined(OS_ANDROID)
88 // Android does not support Opus in Ogg container. 88 // Note: Android does not support Theora and thus video/ogg.
89 // Android does not support Theora and thus video/ogg.
90 {"audio/ogg", COMMON, "vorbis"},
91 {"application/ogg", COMMON, "vorbis"},
92 #else
93 {"video/ogg", COMMON, "opus,theora,vorbis"}, 89 {"video/ogg", COMMON, "opus,theora,vorbis"},
90 #endif
94 {"audio/ogg", COMMON, "opus,vorbis"}, 91 {"audio/ogg", COMMON, "opus,vorbis"},
92 // Note: Theora is not supported on Android and will be rejected during the
93 // call to IsCodecSupportedOnPlatform().
95 {"application/ogg", COMMON, "opus,theora,vorbis"}, 94 {"application/ogg", COMMON, "opus,theora,vorbis"},
96 #endif
97 #if defined(USE_PROPRIETARY_CODECS) 95 #if defined(USE_PROPRIETARY_CODECS)
98 {"audio/mpeg", PROPRIETARY, "mp3"}, 96 {"audio/mpeg", PROPRIETARY, "mp3"},
99 {"audio/mp3", PROPRIETARY, ""}, 97 {"audio/mp3", PROPRIETARY, ""},
100 {"audio/x-mp3", PROPRIETARY, ""}, 98 {"audio/x-mp3", PROPRIETARY, ""},
101 {"audio/aac", PROPRIETARY, ""}, // AAC / ADTS 99 {"audio/aac", PROPRIETARY, ""}, // AAC / ADTS
102 {"audio/mp4", PROPRIETARY, kMP4AudioCodecsExpression}, 100 {"audio/mp4", PROPRIETARY, kMP4AudioCodecsExpression},
103 {"audio/x-m4a", PROPRIETARY, kMP4AudioCodecsExpression}, 101 {"audio/x-m4a", PROPRIETARY, kMP4AudioCodecsExpression},
104 {"video/mp4", PROPRIETARY, kMP4VideoCodecsExpression}, 102 {"video/mp4", PROPRIETARY, kMP4VideoCodecsExpression},
105 {"video/x-m4v", PROPRIETARY, kMP4VideoCodecsExpression}, 103 {"video/x-m4v", PROPRIETARY, kMP4VideoCodecsExpression},
106 #if BUILDFLAG(ENABLE_MSE_MPEG2TS_STREAM_PARSER) 104 #if BUILDFLAG(ENABLE_MSE_MPEG2TS_STREAM_PARSER)
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 const std::string& mime_type_lower_case, 650 const std::string& mime_type_lower_case,
653 bool is_encrypted) const { 651 bool is_encrypted) const {
654 Codec default_codec = Codec::INVALID_CODEC; 652 Codec default_codec = Codec::INVALID_CODEC;
655 if (!GetDefaultCodecLowerCase(mime_type_lower_case, &default_codec)) 653 if (!GetDefaultCodecLowerCase(mime_type_lower_case, &default_codec))
656 return false; 654 return false;
657 return IsCodecSupported(default_codec, mime_type_lower_case, is_encrypted); 655 return IsCodecSupported(default_codec, mime_type_lower_case, is_encrypted);
658 } 656 }
659 657
660 } // namespace internal 658 } // namespace internal
661 } // namespace media 659 } // namespace media
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