Add Rialto DRM adapter as separate path from OCDM#1601
Draft
anshephe wants to merge 3 commits into
Draft
Conversation
Introduce a standalone Rialto DRM session implementation alongside the existing OCDM path, gated behind a new USE_DIRECT_RIALTO_ADAPTER compile flag and CMAKE_USE_DIRECT_RIALTO_ADAPTER CMake variable. New classes under middleware/drm/rialto/: - RialtoMediaKeySession: wraps a single Rialto key session lifecycle (update, close, destruct, key-status tracking) - RialtoMediaKeySystem: owns the IMediaKeys instance and creates sessions; inner MediaKeysClient routes IMediaKeysClient callbacks - RialtoMediaKeySessionAdapter: DrmSession implementation that connects DrmHelper and DrmCallbacks to the Rialto path DrmSessionFactory: add bool useDirectRialto parameter to GetDrmSession to avoid reading gpGlobalConfig directly; Rialto branch is compiled only when USE_DIRECT_RIALTO_ADAPTER is defined. DrmSessionManager: reads eAAMPConfig_useDirectRialto from config and passes the result as a bool into DrmSessionFactory::GetDrmSession. Build: - middleware/CMakeLists.txt: add if(CMAKE_USE_DIRECT_RIALTO_ADAPTER) block (mirrors the OCDM pattern) that appends the three Rialto sources, sets the compiler define, and links Rialto libraries - CMakeLists.txt (top-level): set CMAKE_USE_DIRECT_RIALTO_ADAPTER TRUE after Rialto/RialtoSimulator is resolved so the adapter is always enabled in aamp builds - test/rialto/RialtoSimulator.cpp: add IMediaKeysFactory::createFactory stub so simulator builds satisfy the linker Unit tests under middleware/test/utests/tests/: - RialtoMediaKeySessionTests - RialtoMediaKeySystemTests - RialtoMediaKeySessionAdapterTests Each test suite has its own CMakeLists.txt per project conventions. Stub Rialto headers (IMediaKeys.h, IMediaKeysClient.h, MediaCommon.h) and a GoogleMock (MockRialtoMediaKeys.h) are provided under test/utests/rialto/ and test/utests/mocks/ respectively.
With both adapters enabled simultaneously, the order of
operations in CMakeLists.txt is:
1. Rialto block: set(DEPENDS ${DEPENDS} ${RIALTO_LIBRARIES}) —
list append, DEPENDS is now a semicolon-separated list ending
in /path/to/libRialtoClient.so
2. OCDM block: set(DEPENDS "${DEPENDS} -lgstvideo-1.0") —
string concat, which joins the last list item with -lgstvideo-1.0
via a space
Ninja then sees /path/to/libRialtoClient.so -lgstvideo-1.0 as a
single file path prerequisite → fails immediately.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce a standalone Rialto DRM session implementation alongside the existing OCDM path, gated behind a new USE_DIRECT_RIALTO_ADAPTER compile flag and CMAKE_USE_DIRECT_RIALTO_ADAPTER CMake variable.
New classes under middleware/drm/rialto/:
DrmSessionFactory: add bool useDirectRialto parameter to GetDrmSession to avoid reading gpGlobalConfig directly; Rialto branch is compiled only when USE_DIRECT_RIALTO_ADAPTER is defined.
DrmSessionManager: reads eAAMPConfig_useDirectRialto from config and passes the result as a bool into DrmSessionFactory::GetDrmSession.
Build:
Unit tests under middleware/test/utests/tests/:
Each test suite has its own CMakeLists.txt per project conventions. Stub Rialto headers (IMediaKeys.h, IMediaKeysClient.h, MediaCommon.h) and a GoogleMock (MockRialtoMediaKeys.h) are provided under test/utests/rialto/ and test/utests/mocks/ respectively.