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

Unified Diff: media/filters/stream_parser_factory.cc

Issue 1690063002: Fix mime type mappings when the unified media pipeline is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify, test, rebase on split. Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: media/filters/stream_parser_factory.cc
diff --git a/media/filters/stream_parser_factory.cc b/media/filters/stream_parser_factory.cc
index 87b84540bc758053eee8b927e84f07321cfd39b3..256bd7bcd129151cdb235a08f434e3db40c440ca 100644
--- a/media/filters/stream_parser_factory.cc
+++ b/media/filters/stream_parser_factory.cc
@@ -14,6 +14,7 @@
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "build/build_config.h"
+#include "media/base/media.h"
#include "media/base/media_switches.h"
#include "media/formats/mpeg/adts_stream_parser.h"
#include "media/formats/mpeg/mpeg1_audio_stream_parser.h"
@@ -21,7 +22,7 @@
#include "media/media_features.h"
#if defined(OS_ANDROID)
-#include "base/android/build_info.h"
+#include "media/base/android/media_codec_util.h"
#endif
#if defined(USE_PROPRIETARY_CODECS)
@@ -330,14 +331,18 @@ static bool VerifyCodec(
return true;
case CodecInfo::VIDEO:
#if defined(OS_ANDROID)
- // VP9 is only supported on KitKat+ (API Level 19).
+ if (codec_info->tag == CodecInfo::HISTOGRAM_H264 &&
+ !MediaCodecUtil::IsMediaCodecAvailable()) {
+ return false;
+ }
if (codec_info->tag == CodecInfo::HISTOGRAM_VP9 &&
ddorwin 2016/02/17 21:18:40 Do we need to check VP8 blacklisting as well?
DaleCurtis 2016/02/18 03:58:10 Again, good catch. Done.
- base::android::BuildInfo::GetInstance()->sdk_int() < 19) {
+ !media::MediaCodecUtil::PlatformHasVp9Support() &&
+ !media::IsUnifiedMediaPipelineEnabledForMse()) {
return false;
}
- // Opus is only supported on Lollipop+ (API Level 21).
if (codec_info->tag == CodecInfo::HISTOGRAM_OPUS &&
- base::android::BuildInfo::GetInstance()->sdk_int() < 21) {
+ !media::MediaCodecUtil::PlatformHasOpusSupport() &&
+ !media::IsUnifiedMediaPipelineEnabledForMse()) {
return false;
}
#endif
« media/base/mime_util_unittest.cc ('K') | « media/blink/key_system_config_selector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698