25 #ifndef aampoutputprotection_h
26 #define aampoutputprotection_h
39 #include "libIBusDaemon.h"
46 typedef int dsHdcpProtocolVersion_t;
47 #define dsHDCP_VERSION_MAX 30
48 #define dsHDCP_VERSION_2X 22
49 #define dsHDCP_VERSION_1X 14
58 #include <drmbuild_oem.h>
59 #include <drmcommon.h>
60 #include <drmmanager.h>
61 #include <drmmathsafe.h>
72 #define UHD_WITDH 3840
73 #define UHD_HEIGHT 2160
84 pthread_mutex_init(&m_refCountMutex, NULL);
88 pthread_mutex_destroy(&m_refCountMutex);
92 uint32_t AddRef()
const {
93 pthread_mutex_lock(&m_refCountMutex);
95 pthread_mutex_unlock(&m_refCountMutex);
100 void Release()
const {
101 pthread_mutex_lock(&m_refCountMutex);
103 pthread_mutex_unlock(&m_refCountMutex);
105 if(m_refCount == 0) {
111 mutable pthread_mutex_t m_refCountMutex;
112 mutable int m_refCount;
126 struct MinOPLevelsplayReady
128 DRM_WORD compressedDigitalVideo;
129 DRM_WORD uncompressedDigitalVideo;
130 DRM_WORD analogVideo;
131 DRM_WORD compressedDigitalAudio;
132 DRM_WORD uncompressedDigitalAudio;
137 pthread_mutex_t m_opProtectMutex;
141 MinOPLevelsplayReady m_minOPLevels;
148 bool m_isHDCPEnabled;
149 dsHdcpProtocolVersion_t m_hdcpCurrentProtocol;
150 GstElement* m_gstElement;
155 void SetHDMIStatus();
161 void SetResolution(
int width,
int height);
191 MinOPLevelsplayReady* getPlayReadyLevels() {
return & m_minOPLevels; }
198 static DRM_RESULT DRM_CALL PR_OP_Callback(
const DRM_VOID *f_pvOutputLevelsData,
199 DRM_POLICY_CALLBACK_TYPE f_dwCallbackType,
200 const DRM_VOID *data);
213 static void HDMIEventHandler(
const char *owner, IARM_EventId_t eventId,
void *data,
size_t len);
221 static void ResolutionHandler(
const char *owner, IARM_EventId_t eventId,
void *data,
size_t len);
242 void GetDisplayResolution(
int &width,
int &height);
261 static bool IsAampOutputProcectionInstanceActive();
265 #endif // aampoutputprotection_h