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

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

Issue 1438063002: media: Support SetCdm() on VideoDecodeAccelerator interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/gpu_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.cc b/content/common/gpu/media/gpu_video_decode_accelerator.cc
index 302caea392dc8823a23c359aeed7a0c4cca9769c..a1eb6efa208d0cad993c8577a3308e08d27ed8ff 100644
--- a/content/common/gpu/media/gpu_video_decode_accelerator.cc
+++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc
@@ -164,6 +164,7 @@ bool GpuVideoDecodeAccelerator::OnMessageReceived(const IPC::Message& msg) {
OnReusePictureBuffer)
IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_Flush, OnFlush)
IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_Reset, OnReset)
+ IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_SetCdm, OnSetCdm)
IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderMsg_Destroy, OnDestroy)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -549,6 +550,11 @@ void GpuVideoDecodeAccelerator::OnReset() {
video_decode_accelerator_->Reset();
}
+void GpuVideoDecodeAccelerator::OnSetCdm(int cdm_id) {
+ DCHECK(video_decode_accelerator_.get());
dcheng 2015/11/12 18:48:43 Nit: no .get() when testing a smart pointer
xhwang 2015/11/13 01:16:55 Done.
+ video_decode_accelerator_->SetCdm(cdm_id);
+}
+
void GpuVideoDecodeAccelerator::OnDestroy() {
DCHECK(video_decode_accelerator_.get());
OnWillDestroyStub();
@@ -580,6 +586,11 @@ void GpuVideoDecodeAccelerator::NotifyResetDone() {
DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_ResetDone) failed";
}
+void GpuVideoDecodeAccelerator::NotifyCdmSet(bool success) {
+ if (!Send(new AcceleratedVideoDecoderHostMsg_CdmSet(host_route_id_, success)))
+ DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_CdmSet) failed";
+}
+
void GpuVideoDecodeAccelerator::OnWillDestroyStub() {
// The stub is going away, so we have to stop and destroy VDA here, before
// returning, because the VDA may need the GL context to run and/or do its

Powered by Google App Engine
This is Rietveld 408576698