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

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

Issue 1485043002: Passed is_encrypted parameter to the VDA initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments 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
Index: content/common/gpu/media/v4l2_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/v4l2_video_decode_accelerator.cc b/content/common/gpu/media/v4l2_video_decode_accelerator.cc
index f2170807a7a60a8662b7230d033fb3782a7d67fd..64672fccdd75c83bdc7c0885a3134edbbb429d4e 100644
--- a/content/common/gpu/media/v4l2_video_decode_accelerator.cc
+++ b/content/common/gpu/media/v4l2_video_decode_accelerator.cc
@@ -199,16 +199,21 @@ V4L2VideoDecodeAccelerator::~V4L2VideoDecodeAccelerator() {
DCHECK(output_buffer_map_.empty());
}
-bool V4L2VideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile,
+bool V4L2VideoDecodeAccelerator::Initialize(const Config& config,
Client* client) {
DVLOG(3) << "Initialize()";
+ if (config.is_encrypted) {
+ NOTREACHED() << "Encrypted streams are not supported for this VDA";
+ return false;
+ }
+
DCHECK(child_task_runner_->BelongsToCurrentThread());
DCHECK_EQ(decoder_state_, kUninitialized);
client_ptr_factory_.reset(new base::WeakPtrFactory<Client>(client));
client_ = client_ptr_factory_->GetWeakPtr();
- switch (profile) {
+ switch (config.profile) {
case media::H264PROFILE_BASELINE:
DVLOG(2) << "Initialize(): profile H264PROFILE_BASELINE";
break;
@@ -225,10 +230,10 @@ bool V4L2VideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile,
DVLOG(2) << "Initialize(): profile VP9PROFILE_ANY";
break;
default:
- DLOG(ERROR) << "Initialize(): unsupported profile=" << profile;
+ DLOG(ERROR) << "Initialize(): unsupported profile=" << config.profile;
return false;
};
- video_profile_ = profile;
+ video_profile_ = config.profile;
if (egl_display_ == EGL_NO_DISPLAY) {
LOG(ERROR) << "Initialize(): could not get EGLDisplay";
« no previous file with comments | « content/common/gpu/media/v4l2_video_decode_accelerator.h ('k') | content/common/gpu/media/vaapi_video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698