Rialto  0.1
Rialto media pipeline API
Public Member Functions | List of all members
firebolt::rialto::IMediaKeys Class Referenceabstract

The definition of the IMediaKeys interface. More...

#include <IMediaKeys.h>

Public Member Functions

 IMediaKeys (const IMediaKeys &)=delete
 
IMediaKeysoperator= (const IMediaKeys &)=delete
 
 IMediaKeys (IMediaKeys &&)=delete
 
IMediaKeysoperator= (IMediaKeys &&)=delete
 
virtual MediaKeyErrorStatus selectKeyId (int32_t keySessionId, const std::vector< uint8_t > &keyId)=0
 Selects the specified keyId for the key session. Netflix specific API. More...
 
virtual bool containsKey (int32_t keySessionId, const std::vector< uint8_t > &keyId)=0
 Returns true if the Key Session object contains the specified key. More...
 
virtual MediaKeyErrorStatus createKeySession (KeySessionType sessionType, std::weak_ptr< IMediaKeysClient > client, bool isLDL, int32_t &keySessionId)=0
 Creates a session and returns the session id. More...
 
virtual MediaKeyErrorStatus generateRequest (int32_t keySessionId, InitDataType initDataType, const std::vector< uint8_t > &initData)=0
 Generates a licence request. More...
 
virtual MediaKeyErrorStatus loadSession (int32_t keySessionId)=0
 Loads an existing key session. More...
 
virtual MediaKeyErrorStatus updateSession (int32_t keySessionId, const std::vector< uint8_t > &responseData)=0
 Updates a key session's state. More...
 
virtual MediaKeyErrorStatus setDrmHeader (int32_t keySessionId, const std::vector< uint8_t > &requestData)=0
 Set DRM Header for a key session. More...
 
virtual MediaKeyErrorStatus closeKeySession (int32_t keySessionId)=0
 Closes a key session. More...
 
virtual MediaKeyErrorStatus removeKeySession (int32_t keySessionId)=0
 Removes a key session. More...
 
virtual MediaKeyErrorStatus deleteDrmStore ()=0
 Delete the DRM store for the object's key system. More...
 
virtual MediaKeyErrorStatus deleteKeyStore ()=0
 Delete the key store for the object's key system. More...
 
virtual MediaKeyErrorStatus getDrmStoreHash (std::vector< unsigned char > &drmStoreHash)=0
 Gets a hash of the DRM store for the object's key system. More...
 
virtual MediaKeyErrorStatus getKeyStoreHash (std::vector< unsigned char > &keyStoreHash)=0
 Gets a hash of the Key store for the object's key system. More...
 
virtual MediaKeyErrorStatus getLdlSessionsLimit (uint32_t &ldlLimit)=0
 Get the limit on the number of ldl key sessions for the object's key system. More...
 
virtual MediaKeyErrorStatus getLastDrmError (int32_t keySessionId, uint32_t &errorCode)=0
 Get the last cdm specific DRM error code. More...
 
virtual MediaKeyErrorStatus getDrmTime (uint64_t &drmTime)=0
 Get the DRM system time for the object's key system. More...
 
virtual MediaKeyErrorStatus getCdmKeySessionId (int32_t keySessionId, std::string &cdmKeySessionId)=0
 Get the internal CDM key session ID. More...
 
virtual MediaKeyErrorStatus releaseKeySession (int32_t keySessionId)=0
 Releases a key session. More...
 

Detailed Description

The definition of the IMediaKeys interface.

This interface defines the public API of Rialto for EME decryption of AV content which should be implemented by both Rialto Client & Rialto Server.

Member Function Documentation

◆ closeKeySession()

virtual MediaKeyErrorStatus firebolt::rialto::IMediaKeys::closeKeySession ( int32_t  keySessionId)
pure virtual

Closes a key session.

This method closes an open session. If the session id does not exist an MediaKeyErrorStatus:BAD_SESSION_ID is returned. Any other errors will result in MediaKeyErrorStatus:FAIL.

Parameters
[in]keySessionId: The key session id.
Return values
anerror status.

◆ containsKey()

virtual bool firebolt::rialto::IMediaKeys::containsKey ( int32_t  keySessionId,
const std::vector< uint8_t > &  keyId 
)
pure virtual

Returns true if the Key Session object contains the specified key.

Parameters
[in]keySessionId: The key session id for the session.
[in]keyId: The key id.
Return values
trueif it contains the key.

◆ createKeySession()

virtual MediaKeyErrorStatus firebolt::rialto::IMediaKeys::createKeySession ( KeySessionType  sessionType,
std::weak_ptr< IMediaKeysClient client,
bool  isLDL,
int32_t &  keySessionId 
)
pure virtual

Creates a session and returns the session id.

This method creates a new session and returns the session id in the specified string. Any other errors will result in MediaKeyErrorStatus:FAIL.

Parameters
[in]sessionType: The session type.
[in]client: Client object for callbacks
[in]isLDL: Is this an LDL
[out]keySessionIdThe key session id
Return values
anerror status.

◆ deleteDrmStore()

virtual MediaKeyErrorStatus firebolt::rialto::IMediaKeys::deleteDrmStore ( )
pure virtual

Delete the DRM store for the object's key system.

Return values
thereturn status value.

◆ deleteKeyStore()

virtual MediaKeyErrorStatus firebolt::rialto::IMediaKeys::deleteKeyStore ( )
pure virtual

Delete the key store for the object's key system.

Return values
thereturn status value.

◆ generateRequest()

virtual MediaKeyErrorStatus firebolt::rialto::IMediaKeys::generateRequest ( int32_t  keySessionId,
InitDataType  initDataType,
const std::vector< uint8_t > &  initData 
)
pure virtual

Generates a licence request.

This method triggers generation of a licence request. If the session id does not exist an MediaKeyErrorStatus:BAD_SESSION_ID is returned. If the session type or init data type is not supported a MediaKeyErrorStatus:NOT_SUPPORTED value is be returned. Any other errors will result in MediaKeyErrorStatus:FAIL.

Parameters
[in]keySessionId: The key session id for the session.
[in]initDataType: The init data type.
[in]initData: The init data.
Return values
anerror status.

◆ getCdmKeySessionId()

virtual MediaKeyErrorStatus firebolt::rialto::IMediaKeys::getCdmKeySessionId ( int32_t  keySessionId,
std::string &  cdmKeySessionId 
)
pure virtual

Get the internal CDM key session ID.

Parameters
[in]keySessionId: The key session id for the session.
[out]cdmKeySessionId: The internal CDM key session ID
Return values
thereturn status value.

◆ getDrmStoreHash()

virtual MediaKeyErrorStatus firebolt::rialto::IMediaKeys::getDrmStoreHash ( std::vector< unsigned char > &  drmStoreHash)
pure virtual

Gets a hash of the DRM store for the object's key system.

Parameters
[out]drmStoreHash: the hash value
Return values
thereturn status value.

◆ getDrmTime()

virtual MediaKeyErrorStatus firebolt::rialto::IMediaKeys::getDrmTime ( uint64_t &  drmTime)
pure virtual

Get the DRM system time for the object's key system.

Parameters
[out]drmTime: the DRM system time
Return values
thereturn status value.

◆ getKeyStoreHash()

virtual MediaKeyErrorStatus firebolt::rialto::IMediaKeys::getKeyStoreHash ( std::vector< unsigned char > &  keyStoreHash)
pure virtual

Gets a hash of the Key store for the object's key system.

Parameters
[out]keyStoreHash: the hash value
Return values
thereturn status value.

◆ getLastDrmError()

virtual MediaKeyErrorStatus firebolt::rialto::IMediaKeys::getLastDrmError ( int32_t  keySessionId,
uint32_t &  errorCode 
)
pure virtual

Get the last cdm specific DRM error code.

Parameters
[in]keySessionId: The key session id.
[out]errorCode: the error code.
Return values
thereturn status value.

◆ getLdlSessionsLimit()

virtual MediaKeyErrorStatus firebolt::rialto::IMediaKeys::getLdlSessionsLimit ( uint32_t &  ldlLimit)
pure virtual

Get the limit on the number of ldl key sessions for the object's key system.

Parameters
[out]ldlLimit: the limit on the number of ldl key sessions.
Return values
thereturn status value.

◆ loadSession()

virtual MediaKeyErrorStatus firebolt::rialto::IMediaKeys::loadSession ( int32_t  keySessionId)
pure virtual

Loads an existing key session.

This method loads an existing key session. If the session id does not exist an MediaKeyErrorStatus:BAD_SESSION_ID is returned. If the session type or init data type is not supported a MediaKeyErrorStatus:NOT_SUPPORTED value must be returned. If the session state is invalid an MediaKeyErrorStatus:INVALID_STATE is returned. Any other errors will result in MediaKeyErrorStatus:FAIL.

Parameters
[in]keySessionId: The key session id for the session.
Return values
anerror status.

◆ releaseKeySession()

virtual MediaKeyErrorStatus firebolt::rialto::IMediaKeys::releaseKeySession ( int32_t  keySessionId)
pure virtual

Releases a key session.

This method releases an open session. If the session id does not exist an MediaKeyErrorStatus:BAD_SESSION_ID is returned. Any other errors will result in MediaKeyErrorStatus:FAIL.

Parameters
[in]keySessionId: The key session id.
Return values
anerror status.

◆ removeKeySession()

virtual MediaKeyErrorStatus firebolt::rialto::IMediaKeys::removeKeySession ( int32_t  keySessionId)
pure virtual

Removes a key session.

This method removes an open session. If the session id does not exist an MediaKeyErrorStatus:BAD_SESSION_ID is returned. Any other errors will result in MediaKeyErrorStatus:FAIL.

Parameters
[in]keySessionId: The key session id.
Return values
anerror status.

◆ selectKeyId()

virtual MediaKeyErrorStatus firebolt::rialto::IMediaKeys::selectKeyId ( int32_t  keySessionId,
const std::vector< uint8_t > &  keyId 
)
pure virtual

Selects the specified keyId for the key session. Netflix specific API.

Parameters
[in]keySessionId: The key session id for the session.
[in]keyId: The key id to select.
Return values
anerror status.

◆ setDrmHeader()

virtual MediaKeyErrorStatus firebolt::rialto::IMediaKeys::setDrmHeader ( int32_t  keySessionId,
const std::vector< uint8_t > &  requestData 
)
pure virtual

Set DRM Header for a key session.

This method updates a key session's DRM header. If the session id does not exist an MediaKeyErrorStatus:BAD_SESSION_ID is returned.If the session state is invalid an MediaKeyErrorStatus:INVALID_STATE is returned. Any other errors will result in MediaKeyErrorStatus:FAIL.

Parameters
[in]keySessionId: The session id for the session.
[in]requestData: The request data.
Return values
anerror status.

◆ updateSession()

virtual MediaKeyErrorStatus firebolt::rialto::IMediaKeys::updateSession ( int32_t  keySessionId,
const std::vector< uint8_t > &  responseData 
)
pure virtual

Updates a key session's state.

This method updates a session's state. If the session id does not exist an MediaKeyErrorStatus:BAD_SESSION_ID is returned. If the session state is invalid an MediaKeyErrorStatus:INVALID_STATE is returned. Any other errors will result in MediaKeyErrorStatus:FAIL.

Parameters
[in]keySessionId: The key session id for the session.
[in]responseData: The license response data.
Return values
anerror status.

The documentation for this class was generated from the following file: