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

Unified Diff: media/filters/gpu_video_decoder.h

Issue 1450173002: media: Support SetCdm() on GpuVideoDecoder. (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
« no previous file with comments | « no previous file | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/gpu_video_decoder.h
diff --git a/media/filters/gpu_video_decoder.h b/media/filters/gpu_video_decoder.h
index 271d2fb7339c89476c5522236189462f430dba75..065ac38d068abecdea8bdc5b769fd6fbec54f915 100644
--- a/media/filters/gpu_video_decoder.h
+++ b/media/filters/gpu_video_decoder.h
@@ -58,6 +58,7 @@ class MEDIA_EXPORT GpuVideoDecoder
int GetMaxDecodeRequests() const override;
// VideoDecodeAccelerator::Client implementation.
+ void NotifyCdmAttached(bool success) override;
void ProvidePictureBuffers(uint32 count,
const gfx::Size& size,
uint32 texture_target) override;
@@ -102,6 +103,10 @@ class MEDIA_EXPORT GpuVideoDecoder
typedef std::map<int32, PictureBuffer> PictureBufferMap;
+ // Callback to set CDM. |cdm_attached_cb| is called when the decryptor in the
+ // CDM has been completely attached to the pipeline.
+ void SetCdm(CdmContext* cdm_context, const CdmAttachedCB& cdm_attached_cb);
+
void DeliverFrame(const scoped_refptr<VideoFrame>& frame);
// Static method is to allow it to run even after GVD is deleted.
@@ -145,6 +150,7 @@ class MEDIA_EXPORT GpuVideoDecoder
// occurs.
scoped_ptr<VideoDecodeAccelerator> vda_;
+ InitCB init_cb_;
OutputCB output_cb_;
DecodeCB eos_decode_cb_;
@@ -156,6 +162,10 @@ class MEDIA_EXPORT GpuVideoDecoder
VideoDecoderConfig config_;
+ // Callback to request/cancel CDM ready notification.
+ SetCdmReadyCB set_cdm_ready_cb_;
+ CdmAttachedCB cdm_attached_cb_;
+
// Shared-memory buffer pool. Since allocating SHM segments requires a
// round-trip to the browser process, we keep allocation out of the
// steady-state of the decoder.
« no previous file with comments | « no previous file | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698