In RDK, I saw below comment:

* @note Application should install at most one callback function per handle.

dsError_t dsRegisterHdcpStatusCallback (int handle, dsHDCPStatusCallback_t cb);

 

 

But it is limited by define HAS_HDCP_CALLBACK.

And using NULL handle in server - dsVideoPort.c

#ifdef HAS_HDCP_CALLBACK
dsRegisterHdcpStatusCallback(NULL,_dsHdcpCallback);
#endif

 

How do i implement it ?

Or it's not a necessary DeviceSettingHalAPI ?

 

  • No labels

1 Comment

  1. This is a register callback function used to notify about HDCP events from ds/hal to ds/srv layer.

    In srv layer:
    The registering of callback is happening with dsRegisterHdcpStatusCallback function call and handling of callback is happening in _dsHdcpCallback function.

    In hal layer:
    Implementation of register function (dsRegisterHdcpStatusCallback) and invoking of callback function is expected.

    Something like this:

    dsHDCPStatusCallback_t _callback;

    dsError_t dsRegisterHdcpStatusCallback(int handle, dsHDCPStatusCallback_t cb)
    {
    // Register the callback
    _callback = cb;
    }

    when you need to do callback: call _callback(handle, HDCP_STATUS).
    This will invoke the _dsHdcpCallback in srv layer because of callback mechanism.

    You can define the HAS_HDCP_CALLBACK flag when implementing this. The NULL handle while registering the callback doesn't matter but there should not be a null
    handle while invoking it and it will be handled properly in the callback function _dsHdcpCallback in srv layer.