OLD | NEW |
| (Empty) |
1 // Copyright 2015 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/common/media/cast_media_client_android.h" | |
6 | |
7 #include "chromecast/media/base/key_systems_common.h" | |
8 | |
9 namespace chromecast { | |
10 namespace media { | |
11 | |
12 CastMediaClientAndroid::CastMediaClientAndroid() {} | |
13 | |
14 CastMediaClientAndroid::~CastMediaClientAndroid() {} | |
15 | |
16 void CastMediaClientAndroid::AddKeySystemUUIDMappings(KeySystemUuidMap* map) { | |
17 // Note: MediaDrmBridge adds the Widevine UUID mapping automatically. | |
18 #if defined(PLAYREADY_CDM_AVAILABLE) | |
19 (*map)[kChromecastPlayreadyKeySystem] = playready_delegate_.GetUUID(); | |
20 #endif | |
21 } | |
22 | |
23 ::media::MediaDrmBridgeDelegate* | |
24 CastMediaClientAndroid::GetMediaDrmBridgeDelegate( | |
25 const ::media::UUID& scheme_uuid) { | |
26 #if defined(PLAYREADY_CDM_AVAILABLE) | |
27 if (scheme_uuid == playready_delegate_.GetUUID()) | |
28 return &playready_delegate_; | |
29 #endif | |
30 | |
31 if (scheme_uuid == widevine_delegate_.GetUUID()) | |
32 return &widevine_delegate_; | |
33 | |
34 return nullptr; | |
35 } | |
36 | |
37 } // namespace media | |
38 } // namespace chromecast | |
OLD | NEW |