Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

PlantUML Macro
formatSVG
titleCreate MKS - Cobalt/OCDM
@startuml

autonumber

box "Container" #LightGreen
participant Cobalt
participant Starboard
participant ocdmProxy
participant rialtoClient
end box

box "Platform" #LightBlue
participant rialtoServer
participant Ocdm
end box


Cobalt       ->  Starboard:     SbDrmGenerateSessionUpdateRequest(media_keys_handle,\n\t\tticket, init_data_type, iv)
Starboard    ->  ocdmProxy:     opencdm_construct_session(media_keys_handle, init_data_type, iv)

ocdmProxy    ->  rialtoClient:  createKeySession(media_keys_handle, sessionType=TEMPORARY, client, isLDL=false)
rialtoClient ->  rialtoServer:  createKeySession(media_keys_handle, type, isLDL)
rialtoServer ->  rialtoServer:  generate unique key_session_id and create local key session object
rialtoServer --> rialtoClient:  status, key_session_id
rialtoClient --> ocdmProxy:     status, key_session_id

ocdmProxy    ->  rialtoClient:  generateRequest(key_session_id, init_data_type, init_data)
rialtoClient ->  rialtoServer:  generateRequest(key_session_id, init_data_type, init_data)
activate rialtoServer

opt ocdm_session not yet created for this key session
rialtoServer ->  Ocdm:          opencdm_construct_session(media_key_system, Temporary, iv, CDMData=NULL)
Ocdm         --> rialtoServer:  status, ocdm_key_session
end

rialtoServer --> rialtoClient:  status
rialtoClient --> ocdmProxy:     status
ocdmProxy    --> Starboard:     status, session_handle
Starboard    --> Cobalt:        

opt no errors

Ocdm         -/  rialtoServer:  process_challenge_callback(ocdm_key_session, url, challenge)
note left: Callback automatically occurs after opencdm_construct_session() for non-Netflix key system
rialtoServer -/  rialtoClient:  onLicenseRequest(key_session_id, challenge, url)
rialtoClient -/  ocdmProxy:     onLicenseRequest(key_session_id, challenge, url)
ocdmProxy    -/  Starboard:     process_challenge_callback(session_handle, url, challenge)
Starboard    -/  Cobalt:        SbDrmSessionUpdateRequestFunc(media_keys_handle, context,\n\t\tticket, kSbDrmStatusSuccess,\n\t\tkSbDrmSessionRequestTypeLicenseRequest,\n\t\tNULL, session_id, challenge, url)

else If generateRequest() fails at any point ensure error callback is made (not showing all cases to keep diagram simple)

opt Server error
rialtoServer --> rialtoClient:  status!=OK
end
rialtoClient --> ocdmProxy:     status!=OK
ocdmProxy    -/  Starboard:     process_challenge_callback(session_handle, url, NULL)
Starboard    -/  Cobalt:        SbDrmSessionUpdateRequestFunc(ticket,\n\t\tUnknownError, RequestTypeLicenseRequest)

end

note across: Rialto API follows EME/libRialtoClient APIs which put IV in generateRequest which doesn't map directly to OCDM/Fusion so some complexity in here but as this model is proven retain it

@enduml

Create - Netflix/OCDM

PlantUML Macro
formatSVG
titleCreate MKS - Netflix/OCDM
@startuml

autonumber

box "Container" #LightGreen
participant Netflix
participant DPI
participant ocdmProxy
participant rialtoClient
end box

box "Platform" #LightBlue
participant rialtoServer
participant Ocdm
end box


Netflix       ->  DPI:     createDrmSession(media_keys, content_id, license_type, drm_header)
DPI    ->  ocdmProxy:     opencdm_construct_session(media_keys_handle, init_data_type, iv)
ocdmProxy    ->  ocdmProxy:  Create internal session object
ocdmProxy    ->  DPI:  session_handle

DPI -> ocdmProxy: opencdm_session_get_challenge_data(session, challenge_buffer, challenge_size, is_ldl)
ocdmProxy    ->  rialtoClient:  createKeySession(media_keys_handle, session_type=TEMPORARY, client, is_ldl)
rialtoClient ->  rialtoServer:  createKeySession(media_keys_handle, type, is_ldl)
rialtoServer ->  rialtoServer:  generate unique key_session_id and create local key session object
rialtoServer --> rialtoClient:  status, key_session_id
rialtoClient --> ocdmProxy:     status, key_session_id

ocdmProxy    ->  rialtoClient:  generateRequest(key_session_id, init_data_type, init_data)
rialtoClient ->  rialtoServer:  generateRequest(key_session_id, init_data_type, init_data)
activate rialtoServer

opt ocdm_session not yet created for this key session
rialtoServer ->  Ocdm:          opencdm_construct_session(media_key_system, Temporary, iv, CDMData=NULL)
Ocdm         --> rialtoServer:  status, ocdm_key_session
end

note over rialtoServer, Ocdm: For Netflix process_challenge_callback() won't be received, Rialto must call\nopencdm_session_get_challenge_data() to get the challenge then call\nonLicenseRequest() with it
rialtoServer ->  Ocdm:          opencdm_session_get_challenge_data(ocdm_session, is_LDL)
Ocdm         --> rialtoServer:  challenge
rialtoServer -/  rialtoClient:  onLicenseRequest(key_session_id, challenge, url="")
deactivate rialtoServer
rialtoClient -/  ocdmProxy:     onLicenseRequest(key_session_id, challenge, url)

rialtoServer --> rialtoClient:  status
rialtoClient --> ocdmProxy:     status
ocdmProxy    --> DPI:     status, challenge_buffer
DPI    --> Netflix:

@enduml


Create - Netflix/native Rialto

PlantUML Macro
formatSVG
titleCreate MKS - Netflix/native Rialto
@startuml

autonumber

box "Container" #LightGreen
participant Netflix
participant DPI
participant rialtoClient
end box

box "Platform" #LightBlue
participant rialtoServer
end box

Netflix      ->  DPI:           createDrmSession(media_keys, content_id, license_type, drm_header)
DPI          ->  DPI:           Create DPI session object
DPI          ->  DPI:           Store content_id, license_type &\ndrm_header in session object
DPI          --> Netflix:       session_handle
Netflix      ->  DPI:           getChallengeData(is_LDL)
DPI          ->  rialtoClient:  createKeySession(media_keys_handle, session_type=TEMPORARY, is_LDL)
rialtoClient ->  rialtoServer:  createKeySession(media_keys_handle, session_type, is_LDL)
note over rialtoServer: As createKeySession() in Cobalt diagram above
rialtoServer --> rialtoClient:  status, key_session_id
rialtoClient --> DPI:           status, key_session_id

DPI          ->  rialtoClient:  generateRequest(key_session_id, init_data_type=DRMHEADER, init_data=drm_header)
rialtoClient ->  rialtoServer:  generateRequest(key_session_id, init_data_type, init_data)
note over rialtoServer:As generateRequest() in Cobalt diagram above,\nsee note that opendm_session_get_challenge_data()
rialtoServer --> rialtoClient:  status
rialtoClient --> DPI:           status
note over DPI: getChallengeData() must block until onLicenseRequest() callback received
rialtoServer -/  rialtoClient:  onLicenseRequest(key_session_id, challenge, url)
rialtoClient -/  DPI:           onLicenseRequest(key_session_id, challenge, url)
DPI          --> Netflix:       status, challenge


@enduml

...