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

Unified Diff: content/common/gpu/client/gpu_video_decode_accelerator_host.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/client/gpu_video_decode_accelerator_host.cc
diff --git a/content/common/gpu/client/gpu_video_decode_accelerator_host.cc b/content/common/gpu/client/gpu_video_decode_accelerator_host.cc
index 41a4dbc1a1dac45037abcfcd92a77a68ee62770f..bd401f51b47cd16c48f68cbde52cad89935a2f84 100644
--- a/content/common/gpu/client/gpu_video_decode_accelerator_host.cc
+++ b/content/common/gpu/client/gpu_video_decode_accelerator_host.cc
@@ -56,6 +56,7 @@ bool GpuVideoDecodeAcceleratorHost::OnMessageReceived(const IPC::Message& msg) {
OnFlushDone)
IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderHostMsg_ResetDone,
OnResetDone)
+ IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderHostMsg_CdmSet, OnCdmSet)
IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderHostMsg_ErrorNotification,
OnNotifyError)
IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderHostMsg_DismissPictureBuffer,
@@ -176,6 +177,13 @@ void GpuVideoDecodeAcceleratorHost::Reset() {
Send(new AcceleratedVideoDecoderMsg_Reset(decoder_route_id_));
}
+void GpuVideoDecodeAcceleratorHost::SetCdm(int cdm_id) {
+ DCHECK(CalledOnValidThread());
+ if (!channel_)
+ return;
+ Send(new AcceleratedVideoDecoderMsg_SetCdm(decoder_route_id_, cdm_id));
+}
+
void GpuVideoDecodeAcceleratorHost::Destroy() {
DCHECK(CalledOnValidThread());
if (channel_)
@@ -260,6 +268,12 @@ void GpuVideoDecodeAcceleratorHost::OnResetDone() {
client_->NotifyResetDone();
}
+void GpuVideoDecodeAcceleratorHost::OnCdmSet(bool success) {
+ DCHECK(CalledOnValidThread());
+ if (client_)
+ client_->NotifyCdmSet(success);
+}
+
void GpuVideoDecodeAcceleratorHost::OnNotifyError(uint32 error) {
DCHECK(CalledOnValidThread());
if (!client_)

Powered by Google App Engine
This is Rietveld 408576698