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

Unified Diff: media/base/android/browser_cdm_factory_android.cc

Issue 1341883003: Prepare MediaDrmBridge to work with MediaCodecPlayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bug526755
Patch Set: Cleanup Created 5 years, 3 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
Index: media/base/android/browser_cdm_factory_android.cc
diff --git a/media/base/android/browser_cdm_factory_android.cc b/media/base/android/browser_cdm_factory_android.cc
index 82f11d1385f4318d429f3a0b433f1e7d61a0582f..adcacb7377220f3b42011812b63433f94e5a1e8c 100644
--- a/media/base/android/browser_cdm_factory_android.cc
+++ b/media/base/android/browser_cdm_factory_android.cc
@@ -13,7 +13,7 @@
namespace media {
-scoped_ptr<BrowserCdm> BrowserCdmFactoryAndroid::CreateBrowserCdm(
+BrowserCdmPtr BrowserCdmFactoryAndroid::CreateBrowserCdm(
const std::string& key_system,
bool use_hw_secure_codecs,
const SessionMessageCB& session_message_cb,
@@ -23,16 +23,16 @@ scoped_ptr<BrowserCdm> BrowserCdmFactoryAndroid::CreateBrowserCdm(
const SessionExpirationUpdateCB& session_expiration_update_cb) {
if (!MediaDrmBridge::IsKeySystemSupported(key_system)) {
NOTREACHED() << "Unsupported key system: " << key_system;
- return scoped_ptr<BrowserCdm>();
+ return BrowserCdmPtr();
}
- scoped_ptr<MediaDrmBridge> cdm(
+ scoped_ptr<MediaDrmBridge, BrowserCdmDeleter> cdm(
MediaDrmBridge::Create(key_system, session_message_cb, session_closed_cb,
legacy_session_error_cb, session_keys_change_cb,
session_expiration_update_cb));
if (!cdm) {
NOTREACHED() << "MediaDrmBridge cannot be created for " << key_system;
- return scoped_ptr<BrowserCdm>();
+ return BrowserCdmPtr();
}
if (key_system == kWidevineKeySystem) {
@@ -41,7 +41,7 @@ scoped_ptr<BrowserCdm> BrowserCdmFactoryAndroid::CreateBrowserCdm(
: MediaDrmBridge::SECURITY_LEVEL_3;
if (!cdm->SetSecurityLevel(security_level)) {
DVLOG(1) << "failed to set security level " << security_level;
- return scoped_ptr<BrowserCdm>();
+ return BrowserCdmPtr();
}
} else {
// Assume other key systems require hardware-secure codecs and thus do not
@@ -50,7 +50,7 @@ scoped_ptr<BrowserCdm> BrowserCdmFactoryAndroid::CreateBrowserCdm(
NOTREACHED()
<< key_system
<< " may require use_video_overlay_for_embedded_encrypted_video";
- return scoped_ptr<BrowserCdm>();
+ return BrowserCdmPtr();
}
}

Powered by Google App Engine
This is Rietveld 408576698