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

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

Issue 1448303002: media: Add static MojoCdmService::GetCdm(). (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/android_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/android_video_decode_accelerator.cc b/content/common/gpu/media/android_video_decode_accelerator.cc
index 8a0f7db1482e42716f03a58977aadcd920ded71c..3f1e8774a3e52614484cf38de512a1c384f3eb80 100644
--- a/content/common/gpu/media/android_video_decode_accelerator.cc
+++ b/content/common/gpu/media/android_video_decode_accelerator.cc
@@ -21,6 +21,11 @@
#include "ui/gl/android/surface_texture.h"
#include "ui/gl/gl_bindings.h"
+#if defined(ENABLE_MOJO_MEDIA_IN_GPU_PROCESS)
+#include "media/base/media_keys.h"
+#include "media/mojo/services/mojo_cdm_service.h"
+#endif
+
namespace content {
// Max number of bitstreams notified to the client with
@@ -138,8 +143,15 @@ bool AndroidVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile,
return true;
}
-void AndroidVideoDecodeAccelerator::SetCdm(int /* cdm_id */) {
- // TODO(xhwang): Implement CDM setting here.
+void AndroidVideoDecodeAccelerator::SetCdm(int cdm_id) {
+ DVLOG(2) << __FUNCTION__ << ": " << cdm_id;
+
+#if defined(ENABLE_MOJO_MEDIA_IN_GPU_PROCESS)
+ // TODO(timav): Implement CDM setting here. See http://crbug.com/542417
+ scoped_refptr<media::MediaKeys> cdm = media::MojoCdmService::GetCdm(cdm_id);
+ DCHECK(cdm);
+#endif
+
NOTIMPLEMENTED();
NotifyCdmAttached(false);
}

Powered by Google App Engine
This is Rietveld 408576698