RDK Documentation (Open Sourced RDK Components)
AampHlsDrmSessionManager.h
Go to the documentation of this file.
1 /*
2  * If not stated otherwise in this file or this component's license file the
3  * following copyright and licenses apply:
4  *
5  * Copyright 2020 RDK Management
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18 */
19 
20 #ifndef _AAMP_HLS_DRM_SESSION_MGR_H
21 #define _AAMP_HLS_DRM_SESSION_MGR_H
22 
23 /**
24  * @file AampHlsDrmSessionManager.h
25  * @brief Operations for HLS DRM
26  */
27 
28 
29 #include "HlsDrmBase.h"
30 #include "AampDrmSession.h"
31 
32 
33 /**
34  * @class AampHlsDrmSessionManager
35  * @brief DRM Session manager for HLS stream operations
36  */
37 
39 {
40  AampDrmSession* mDrmSession;
41 public:
42  /**
43  * @fn getInstance
44  * @return Aamp Hls Drm Session Manager instance
45  */
47 
48  /**
49  * @fn isDrmSupported
50  * @param drmInfo DrmInfo built by the HLS manifest parser
51  * @return true if a DRM support available, false otherwise
52  */
53  bool isDrmSupported(const struct DrmInfo& drmInfo) const;
54 
55  /**
56  * @fn createSession
57  * @param aampInstance aampContext
58  * @param drmInfo DrmInfo built by the HLS manifest parser
59  * @return true if a DRM support available, false otherwise
60  */
61  std::shared_ptr<HlsDrmBase> createSession(PrivateInstanceAAMP* aampInstance, const struct DrmInfo& drmInfo, MediaType streamType, AampLogManager *logObj=NULL);
62 };
63 
64 #endif //_AAMP_HLS_DRM_SESSION_MGR_H
AampHlsDrmSessionManager::createSession
std::shared_ptr< HlsDrmBase > createSession(PrivateInstanceAAMP *aampInstance, const struct DrmInfo &drmInfo, MediaType streamType, AampLogManager *logObj=NULL)
createSession create session for DRM
Definition: AampHlsDrmSessionManager.cpp:54
AampHlsDrmSessionManager
DRM Session manager for HLS stream operations.
Definition: AampHlsDrmSessionManager.h:38
AampLogManager
AampLogManager Class.
Definition: AampLogManager.h:150
DrmInfo
DRM information required to decrypt.
Definition: AampDrmInfo.h:47
MediaType
MediaType
Media types.
Definition: AampMediaType.h:37
AampHlsDrmSessionManager::getInstance
static AampHlsDrmSessionManager & getInstance()
getInstance Get DRM instance Get an instance of the Hls DRM Session Manager
Definition: AampHlsDrmSessionManager.cpp:37
AampDrmSession
Base class for DRM sessions.
Definition: AampDrmSession.h:69
PrivateInstanceAAMP
Class representing the AAMP player's private instance, which is not exposed to outside world.
Definition: priv_aamp.h:640
HlsDrmBase.h
Declaration common to various HLS DRM implementations.
AampHlsDrmSessionManager::isDrmSupported
bool isDrmSupported(const struct DrmInfo &drmInfo) const
Check stream is DRM supported.
Definition: AampHlsDrmSessionManager.cpp:46
AampDrmSession.h
Header file for AampDrmSession.