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

Unified Diff: media/filters/vpx_video_decoder.cc

Issue 2803823003: Query LibVPX for VP9 profile support.
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/vpx_video_decoder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/vpx_video_decoder.cc
diff --git a/media/filters/vpx_video_decoder.cc b/media/filters/vpx_video_decoder.cc
index 5fb9439c5fcb640215e41a9a8169ddd9951d0eeb..932439b7a5f80ba742b8de55c6c68ddb969751dc 100644
--- a/media/filters/vpx_video_decoder.cc
+++ b/media/filters/vpx_video_decoder.cc
@@ -349,6 +349,29 @@ VpxVideoDecoder::~VpxVideoDecoder() {
DCHECK(!offload_task_runner_);
}
+// static
+bool VpxVideoDecoder::IsVideoConfigSupported(const VideoConfig& config) {
+ if (config.codec != kCodecVP8 && config.codec != kCodecVP9)
+ return false;
+
+ if (config.codec == kCodecVP9) {
+ switch (config.profile) {
+ case VP9PROFILE_PROFILE0:
+ case VP9PROFILE_PROFILE1:
+ return true;
+ case VP9PROFILE_PROFILE2:
+ case VP9PROFILE_PROFILE3: {
+ vpx_codec_caps_t vp9_caps = vpx_codec_get_caps(vpx_codec_vp9_dx());
+ return (vp9_caps & VPX_CODEC_CAP_HIGHBITDEPTH);
+ }
+ default:
+ NOTREACHED();
+ }
+ }
+
+ return false;
+}
+
std::string VpxVideoDecoder::GetDisplayName() const {
return "VpxVideoDecoder";
}
« no previous file with comments | « media/filters/vpx_video_decoder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698