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

Unified Diff: media/gpu/android_video_decode_accelerator.h

Issue 1963903002: Remove VideoDecodeAccelerator::SetCdm() and pass the cdm in Initialize() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add cdm_id to paramtraits Created 4 years, 7 months 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 | « media/filters/gpu_video_decoder.cc ('k') | media/gpu/android_video_decode_accelerator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/android_video_decode_accelerator.h
diff --git a/media/gpu/android_video_decode_accelerator.h b/media/gpu/android_video_decode_accelerator.h
index 5d94987ba30ea82b4b3b4f974c80ee0a38559ac4..04a6d1132b7b6df9d487abae7cdd2775c4808c66 100644
--- a/media/gpu/android_video_decode_accelerator.h
+++ b/media/gpu/android_video_decode_accelerator.h
@@ -123,7 +123,6 @@ class MEDIA_GPU_EXPORT AndroidVideoDecodeAccelerator
// media::VideoDecodeAccelerator implementation:
bool Initialize(const Config& config, Client* client) override;
- void SetCdm(int cdm_id) override;
void Decode(const media::BitstreamBuffer& bitstream_buffer) override;
void AssignPictureBuffers(
const std::vector<media::PictureBuffer>& buffers) override;
@@ -259,12 +258,15 @@ class MEDIA_GPU_EXPORT AndroidVideoDecodeAccelerator
// |bitstream_buffer| of id as -1 indicates a flush command.
void DecodeBuffer(const media::BitstreamBuffer& bitstream_buffer);
- // This callback is called after CDM obtained a MediaCrypto object.
+ // Called during Initialize() for encrypted streams to set up the CDM.
+ void InitializeCdm(int cdm_id);
+
+ // Called after the CDM obtains a MediaCrypto object.
void OnMediaCryptoReady(
media::MediaDrmBridgeCdmContext::JavaObjectPtr media_crypto,
bool needs_protected_surface);
- // This callback is called when a new key is added to CDM.
+ // Called when a new key is added to the CDM.
void OnKeyAdded();
// Notifies the client of the result of deferred initialization.
@@ -386,8 +388,6 @@ class MEDIA_GPU_EXPORT AndroidVideoDecodeAccelerator
// and other types, see IsDrainingForResetOrDestroy().
DrainType drain_type_;
- // CDM related stuff.
-
// Holds a ref-count to the CDM to avoid using the CDM after it's destroyed.
scoped_refptr<media::MediaKeys> cdm_for_reference_holding_only_;
« no previous file with comments | « media/filters/gpu_video_decoder.cc ('k') | media/gpu/android_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698