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

Unified Diff: content/common/gpu/media/android_video_decode_accelerator.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: Fix compile error. 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
« no previous file with comments | « content/child/runtime_features.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 6269b6f9f08244ca6b546c001ce301a3010f562c..bf99f48201606f8f043da9ebe74f91af8eec319e 100644
--- a/content/common/gpu/media/android_video_decode_accelerator.cc
+++ b/content/common/gpu/media/android_video_decode_accelerator.cc
@@ -22,9 +22,11 @@
#include "gpu/command_buffer/service/gles2_cmd_decoder.h"
#include "gpu/command_buffer/service/gpu_switches.h"
#include "gpu/command_buffer/service/mailbox_manager.h"
+#include "media/base/android/media_codec_util.h"
#include "media/base/bind_to_current_loop.h"
#include "media/base/bitstream_buffer.h"
#include "media/base/limits.h"
+#include "media/base/media.h"
#include "media/base/media_switches.h"
#include "media/base/timestamp_constants.h"
#include "media/base/video_decoder_config.h"
@@ -1005,15 +1007,19 @@ AndroidVideoDecodeAccelerator::GetCapabilities() {
SupportedProfile profile;
- profile.profile = media::VP8PROFILE_ANY;
- profile.min_resolution.SetSize(0, 0);
- profile.max_resolution.SetSize(1920, 1088);
- profiles.push_back(profile);
+ if (media::MediaCodecUtil::IsVp8DecoderAvailable()) {
+ profile.profile = media::VP8PROFILE_ANY;
+ profile.min_resolution.SetSize(0, 0);
+ profile.max_resolution.SetSize(1920, 1088);
+ profiles.push_back(profile);
+ }
- profile.profile = media::VP9PROFILE_ANY;
- profile.min_resolution.SetSize(0, 0);
- profile.max_resolution.SetSize(1920, 1088);
- profiles.push_back(profile);
+ if (media::PlatformHasVp9Support()) {
+ profile.profile = media::VP9PROFILE_ANY;
+ profile.min_resolution.SetSize(0, 0);
+ profile.max_resolution.SetSize(1920, 1088);
+ profiles.push_back(profile);
+ }
for (const auto& supported_profile : kSupportedH264Profiles) {
SupportedProfile profile;
« no previous file with comments | « content/child/runtime_features.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698