6 #include "AampOcdmBasicSessionAdapter.h"
10 uint32_t payloadDataSize, uint8_t **ppOpaqueData)
12 if (!verifyOutputProtection())
14 return HDCP_COMPLIANCE_CHECK_FAILURE;
19 uint8_t *dataToSend =
const_cast<uint8_t *
>(payloadData);
20 uint32_t sizeToSend = payloadDataSize;
21 std::vector<uint8_t> vdata;
23 if (m_drmHelper->getMemorySystem() !=
nullptr)
25 if (!m_drmHelper->getMemorySystem()->encode(payloadData, payloadDataSize, vdata))
27 AAMPLOG_WARN(
"Failed to encode memory for transmission");
30 sizeToSend = vdata.size();
31 dataToSend = vdata.data();
34 int retvalue = opencdm_session_decrypt(m_pOpenCDMSession,
38 m_keyId.data(), m_keyId.size());
41 if (m_drmHelper->getMemorySystem() !=
nullptr)
43 m_drmHelper->getMemorySystem()->terminateEarly();
45 AAMPLOG_INFO(
"decrypt returned : %d", retvalue);
47 else if (m_drmHelper->getMemorySystem() !=
nullptr)
49 if (!m_drmHelper->getMemorySystem()->decode(dataToSend, sizeToSend,
const_cast<uint8_t*
>(payloadData), payloadDataSize))
51 AAMPLOG_WARN(
"Failed to decode memory for transmission");