RDK Documentation (Open Sourced RDK Components)
AampOcdmGstSessionAdapter.h
Go to the documentation of this file.
1 /**
2  * @file AampOcdmGstSessionAdapter.h
3  * @brief File holds operations on OCDM gst sessions
4  */
5 
6 
7 #include <dlfcn.h>
8 #include <mutex>
9 #include <gst/gst.h>
10 #include "opencdmsessionadapter.h"
11 
12 
13 /**
14  * @class AAMPOCDMGSTSessionAdapter
15  * @brief OCDM Gstreamer session to decrypt
16  */
17 
19 {
20 #ifdef AMLOGIC
21  void ExtractSEI( GstBuffer *buffer);
22 #endif
23 public:
24  AAMPOCDMGSTSessionAdapter(AampLogManager *logObj, std::shared_ptr<AampDrmHelper> drmHelper) : AAMPOCDMSessionAdapter(logObj, drmHelper)
25 #if defined(AMLOGIC)
26 , AAMPOCDMGSTSessionDecrypt(nullptr)
27  {
28  const char* ocdmgstsessiondecrypt = "opencdm_gstreamer_session_decrypt_ex";
29  AAMPOCDMGSTSessionDecrypt = (OpenCDMError(*)(struct OpenCDMSession*, GstBuffer*, GstBuffer*, const uint32_t, GstBuffer*, GstBuffer*, uint32_t, GstCaps*))dlsym(RTLD_DEFAULT, ocdmgstsessiondecrypt);
30  if (AAMPOCDMGSTSessionDecrypt)
31  logprintf("Has opencdm_gstreamer_session_decrypt_ex");
32  else
33  logprintf("No opencdm_gstreamer_session_decrypt_ex found");
34 #else
35  {
36 #endif
37  };
39 
40  int decrypt(GstBuffer* keyIDBuffer, GstBuffer* ivBuffer, GstBuffer* buffer, unsigned subSampleCount, GstBuffer* subSamplesBuffer, GstCaps* caps);
41  int decrypt(const uint8_t *f_pbIV, uint32_t f_cbIV, const uint8_t *payloadData, uint32_t payloadDataSize, uint8_t **ppOpaqueData);
42 private:
43 #if defined(AMLOGIC)
44  OpenCDMError(*AAMPOCDMGSTSessionDecrypt)(struct OpenCDMSession*, GstBuffer*, GstBuffer*, const uint32_t, GstBuffer*, GstBuffer*, uint32_t, GstCaps*);
45 #endif
46 };
AAMPOCDMGSTSessionAdapter::decrypt
int decrypt(GstBuffer *keyIDBuffer, GstBuffer *ivBuffer, GstBuffer *buffer, unsigned subSampleCount, GstBuffer *subSamplesBuffer, GstCaps *caps)
decrypt the data
Definition: AampOcdmGstSessionAdapter.cpp:273
logprintf
void logprintf(const char *format,...)
Print logs to console / log fil.
Definition: aamplogging.cpp:432
AampLogManager
AampLogManager Class.
Definition: AampLogManager.h:150
AAMPOCDMGSTSessionAdapter
OCDM Gstreamer session to decrypt.
Definition: AampOcdmGstSessionAdapter.h:18
AAMPOCDMSessionAdapter
Open CDM DRM session.
Definition: opencdmsessionadapter.h:82
opencdmsessionadapter.h
Handles operation with OCDM session to handle DRM License data.