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

Unified Diff: media/mojo/services/mojo_renderer_impl.cc

Issue 840473002: media: Support creation and SetCdm() for mojo based CDM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase only; compiles but needs more polish... Created 5 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/mojo/services/mojo_media_application.cc ('k') | media/mojo/services/mojo_renderer_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/mojo_renderer_impl.cc
diff --git a/media/mojo/services/mojo_renderer_impl.cc b/media/mojo/services/mojo_renderer_impl.cc
index 5bbb95f09dcf48e3a2d9013157a5e2d6359f1cce..d51fc2433b42700381d76b9273f56d48d497bfd2 100644
--- a/media/mojo/services/mojo_renderer_impl.cc
+++ b/media/mojo/services/mojo_renderer_impl.cc
@@ -81,8 +81,14 @@ void MojoRendererImpl::SetCdm(CdmContext* cdm_context,
const CdmAttachedCB& cdm_attached_cb) {
DVLOG(1) << __FUNCTION__;
DCHECK(task_runner_->BelongsToCurrentThread());
- NOTIMPLEMENTED();
- cdm_attached_cb.Run(false);
+
+ int32_t cdm_id = cdm_context->GetCdmId();
+ if (cdm_id == CdmContext::kInvalidCdmId) {
+ cdm_attached_cb.Run(false);
+ return;
+ }
+
+ remote_media_renderer_->SetCdm(cdm_id, cdm_attached_cb);
}
void MojoRendererImpl::Flush(const base::Closure& flush_cb) {
« no previous file with comments | « media/mojo/services/mojo_media_application.cc ('k') | media/mojo/services/mojo_renderer_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698