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: media/base/mime_util_internal.cc

Issue 1842993002: Spitzer: Report Opus in Ogg as supported by unified pipeline (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 // A list of media types (https://en.wikipedia.org/wiki/Media_type) and 51 // A list of media types (https://en.wikipedia.org/wiki/Media_type) and
52 // corresponding media codecs supported by these types/containers. 52 // corresponding media codecs supported by these types/containers.
53 // Media formats marked as PROPRIETARY are not supported by Chromium, only 53 // Media formats marked as PROPRIETARY are not supported by Chromium, only
54 // Google Chrome browser supports them. 54 // Google Chrome browser supports them.
55 static const MediaFormat kFormatCodecMappings[] = { 55 static const MediaFormat kFormatCodecMappings[] = {
56 {"video/webm", COMMON, "opus,vorbis,vp8,vp9"}, 56 {"video/webm", COMMON, "opus,vorbis,vp8,vp9"},
57 {"audio/webm", COMMON, "opus,vorbis"}, 57 {"audio/webm", COMMON, "opus,vorbis"},
58 {"audio/wav", COMMON, "1"}, 58 {"audio/wav", COMMON, "1"},
59 {"audio/x-wav", COMMON, "1"}, 59 {"audio/x-wav", COMMON, "1"},
60 #if defined(OS_ANDROID) 60 #if !defined(OS_ANDROID)
61 // Android does not support Opus in Ogg container. 61 // Note: Android does not support Theora and thus video/ogg.
62 // Android does not support Theora and thus video/ogg.
63 {"audio/ogg", COMMON, "vorbis"},
64 {"application/ogg", COMMON, "vorbis"},
65 #else
66 {"video/ogg", COMMON, "opus,theora,vorbis"}, 62 {"video/ogg", COMMON, "opus,theora,vorbis"},
63 #endif
67 {"audio/ogg", COMMON, "opus,vorbis"}, 64 {"audio/ogg", COMMON, "opus,vorbis"},
65 // Note: Theora is not supported on Android and will be rejected during the
66 // call to IsCodecSupportedOnPlatform().
68 {"application/ogg", COMMON, "opus,theora,vorbis"}, 67 {"application/ogg", COMMON, "opus,theora,vorbis"},
69 #endif
70 #if defined(USE_PROPRIETARY_CODECS) 68 #if defined(USE_PROPRIETARY_CODECS)
71 {"audio/mpeg", PROPRIETARY, "mp3"}, 69 {"audio/mpeg", PROPRIETARY, "mp3"},
72 {"audio/mp3", PROPRIETARY, ""}, 70 {"audio/mp3", PROPRIETARY, ""},
73 {"audio/x-mp3", PROPRIETARY, ""}, 71 {"audio/x-mp3", PROPRIETARY, ""},
74 {"audio/aac", PROPRIETARY, ""}, // AAC / ADTS 72 {"audio/aac", PROPRIETARY, ""}, // AAC / ADTS
75 {"audio/mp4", PROPRIETARY, kMP4AudioCodecsExpression}, 73 {"audio/mp4", PROPRIETARY, kMP4AudioCodecsExpression},
76 {"audio/x-m4a", PROPRIETARY, kMP4AudioCodecsExpression}, 74 {"audio/x-m4a", PROPRIETARY, kMP4AudioCodecsExpression},
77 {"video/mp4", PROPRIETARY, kMP4VideoCodecsExpression}, 75 {"video/mp4", PROPRIETARY, kMP4VideoCodecsExpression},
78 {"video/x-m4v", PROPRIETARY, kMP4VideoCodecsExpression}, 76 {"video/x-m4v", PROPRIETARY, kMP4VideoCodecsExpression},
79 #if BUILDFLAG(ENABLE_MSE_MPEG2TS_STREAM_PARSER) 77 #if BUILDFLAG(ENABLE_MSE_MPEG2TS_STREAM_PARSER)
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 const std::string& mime_type_lower_case, 625 const std::string& mime_type_lower_case,
628 bool is_encrypted) const { 626 bool is_encrypted) const {
629 Codec default_codec = Codec::INVALID_CODEC; 627 Codec default_codec = Codec::INVALID_CODEC;
630 if (!GetDefaultCodecLowerCase(mime_type_lower_case, &default_codec)) 628 if (!GetDefaultCodecLowerCase(mime_type_lower_case, &default_codec))
631 return false; 629 return false;
632 return IsCodecSupported(default_codec, mime_type_lower_case, is_encrypted); 630 return IsCodecSupported(default_codec, mime_type_lower_case, is_encrypted);
633 } 631 }
634 632
635 } // namespace internal 633 } // namespace internal
636 } // namespace media 634 } // 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