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

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: comments addressed 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..a329dcc54dce45b5524dbdef39ed211d297e4e46 100644
--- a/content/common/gpu/client/gpu_video_decode_accelerator_host.cc
+++ b/content/common/gpu/client/gpu_video_decode_accelerator_host.cc
@@ -46,6 +46,8 @@ bool GpuVideoDecodeAcceleratorHost::OnMessageReceived(const IPC::Message& msg) {
DCHECK(CalledOnValidThread());
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(GpuVideoDecodeAcceleratorHost, msg)
+ IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderHostMsg_CdmAttached,
+ OnCdmAttached)
IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed,
OnBitstreamBufferProcessed)
IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderHostMsg_ProvidePictureBuffers,
@@ -104,6 +106,13 @@ bool GpuVideoDecodeAcceleratorHost::Initialize(media::VideoCodecProfile profile,
return true;
}
+void GpuVideoDecodeAcceleratorHost::SetCdm(int cdm_id) {
+ DCHECK(CalledOnValidThread());
+ if (!channel_)
+ return;
+ Send(new AcceleratedVideoDecoderMsg_SetCdm(decoder_route_id_, cdm_id));
+}
+
void GpuVideoDecodeAcceleratorHost::Decode(
const media::BitstreamBuffer& bitstream_buffer) {
DCHECK(CalledOnValidThread());
@@ -209,6 +218,12 @@ void GpuVideoDecodeAcceleratorHost::Send(IPC::Message* message) {
}
}
+void GpuVideoDecodeAcceleratorHost::OnCdmAttached(bool success) {
+ DCHECK(CalledOnValidThread());
+ if (client_)
+ client_->NotifyCdmAttached(success);
+}
+
void GpuVideoDecodeAcceleratorHost::OnBitstreamBufferProcessed(
int32 bitstream_buffer_id) {
DCHECK(CalledOnValidThread());

Powered by Google App Engine
This is Rietveld 408576698