OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chromecast/browser/media/cast_browser_cdm_factory.h" |
| 6 |
| 7 namespace chromecast { |
| 8 namespace media { |
| 9 |
| 10 scoped_ptr< ::media::BrowserCdm> CastBrowserCdmFactory::CreateBrowserCdm( |
| 11 const std::string& key_system_name, |
| 12 const ::media::BrowserCdm::SessionCreatedCB& session_created_cb, |
| 13 const ::media::BrowserCdm::SessionMessageCB& session_message_cb, |
| 14 const ::media::BrowserCdm::SessionReadyCB& session_ready_cb, |
| 15 const ::media::BrowserCdm::SessionClosedCB& session_closed_cb, |
| 16 const ::media::BrowserCdm::SessionErrorCB& session_error_cb) { |
| 17 CastKeySystem key_system(GetKeySystemByName(key_system_name)); |
| 18 |
| 19 // TODO(gunsch): handle ClearKey decryption. See crbug.com/441957 |
| 20 |
| 21 scoped_ptr< ::media::BrowserCdm> platform_cdm( |
| 22 CreatePlatformBrowserCdm(key_system, |
| 23 session_created_cb, |
| 24 session_message_cb, |
| 25 session_ready_cb, |
| 26 session_closed_cb, |
| 27 session_error_cb)); |
| 28 if (platform_cdm) { |
| 29 return platform_cdm.Pass(); |
| 30 } |
| 31 |
| 32 LOG(INFO) << "No matching key system found."; |
| 33 return scoped_ptr< ::media::BrowserCdm>(); |
| 34 } |
| 35 |
| 36 } // namespace media |
| 37 } // namespace chromecast |
OLD | NEW |