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

Unified Diff: content/common/gpu/media/android_video_decode_accelerator.cc

Issue 1530063002: Switch from build-time to run-time flags for Project Spitzer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable tests confused by codec support. Created 5 years 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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/android_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/android_video_decode_accelerator.cc b/content/common/gpu/media/android_video_decode_accelerator.cc
index fa0a03e21a1b8f9fb33dc89c061c896169e864ab..4a57edaef900912c3f588bc68e0a05ad4e35f24a 100644
--- a/content/common/gpu/media/android_video_decode_accelerator.cc
+++ b/content/common/gpu/media/android_video_decode_accelerator.cc
@@ -43,7 +43,6 @@ enum { kNumPictureBuffers = media::limits::kMaxVideoFrames + 1 };
// NotifyEndOfBitstreamBuffer() before getting output from the bitstream.
enum { kMaxBitstreamsNotifiedInAdvance = 32 };
-#if defined(ENABLE_MEDIA_PIPELINE_ON_ANDROID)
// MediaCodec is only guaranteed to support baseline, but some devices may
// support others. Advertise support for all H264 profiles and let the
// MediaCodec fail when decoding if it's not actually supported. It's assumed
@@ -61,7 +60,6 @@ static const media::VideoCodecProfile kSupportedH264Profiles[] = {
media::H264PROFILE_STEREOHIGH,
media::H264PROFILE_MULTIVIEWHIGH
};
-#endif
// Because MediaCodec is thread-hostile (must be poked on a single thread) and
// has no callback mechanism (b/11990118), we must drive it by polling for
@@ -119,11 +117,9 @@ bool AndroidVideoDecodeAccelerator::Initialize(const Config& config,
codec_ = VideoCodecProfileToVideoCodec(config.profile);
is_encrypted_ = config.is_encrypted;
- bool profile_supported = codec_ == media::kCodecVP8;
-#if defined(ENABLE_MEDIA_PIPELINE_ON_ANDROID)
- profile_supported |=
- (codec_ == media::kCodecVP9 || codec_ == media::kCodecH264);
-#endif
+ bool profile_supported = codec_ == media::kCodecVP8 ||
+ codec_ == media::kCodecVP9 ||
+ codec_ == media::kCodecH264;
if (!profile_supported) {
LOG(ERROR) << "Unsupported profile: " << config.profile;
@@ -648,12 +644,8 @@ void AndroidVideoDecodeAccelerator::NotifyError(
// static
bool AndroidVideoDecodeAccelerator::UseDeferredRenderingStrategy() {
-#if defined(ENABLE_MEDIA_PIPELINE_ON_ANDROID)
return base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableUnifiedMediaPipeline);
-#endif
-
- return false;
}
// static
@@ -671,7 +663,6 @@ AndroidVideoDecodeAccelerator::GetCapabilities() {
profiles.push_back(profile);
}
-#if defined(ENABLE_MEDIA_PIPELINE_ON_ANDROID)
if (!media::VideoCodecBridge::IsKnownUnaccelerated(
media::kCodecVP9, media::MEDIA_CODEC_DECODER)) {
SupportedProfile profile;
@@ -691,7 +682,6 @@ AndroidVideoDecodeAccelerator::GetCapabilities() {
profile.max_resolution.SetSize(3840, 2160);
profiles.push_back(profile);
}
-#endif
if (UseDeferredRenderingStrategy()) {
capabilities.flags = media::VideoDecodeAccelerator::Capabilities::
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698