[Widevine][android] Implementing KID status callback#2004
[Widevine][android] Implementing KID status callback#2004CastagnaIT merged 1 commit intoxbmc:Piersfrom
Conversation
📝 Kodiai Draft Review Summary
What ChangedImplements KID (Key ID) status change callbacks for Android Widevine to track session key statuses through Reviewed: core logic, docs Strengths
ObservationsImpact[MAJOR] src/decrypters/widevineandroid/WVCdmAdapter.cpp (240, 248): Null-terminated string assumption on binary data [MAJOR] src/decrypters/widevineandroid/WVCdmAdapter.cpp (109, 122): Exception check performed after listener assignment [MEDIUM] depends/android/libandroidjni/libandroidjni.txt (1): Non-reproducible dependency reference Suggestions
Verdict🔴 Address before merging -- 2 blocking issue(s) found Review Details
|
ReviewMust Fix | Exception check regression ( Critical | Undefined behavior: non-null-terminated LOG::LogF(LOGDEBUG, "MediaDrm OnKeyStatusChange event: SID %s", sessionId.data());
Must Fix | Mutable branch URL in dependency ( Medium | Wrong log level for normal key status events ( Minor | Signed/unsigned comparison in loop ( |
85b8583 to
8d41904
Compare
|
@kodiai i updated the PR, please review |
kodiai responseGood progress! The exception checking issues from the previous review have been fixed (WVCdmAdapter.cpp:102-109, 115-122). However, there are still some items to address before this can be approved: Issues: (1) [major] src/decrypters/widevineandroid/WVCencSingleSampleDecrypter.cpp (213): The (2) [major] src/decrypters/widevineandroid/WVCencSingleSampleDecrypter.h: Missing
Without these, the Android implementation can't track KID statuses or support (3) [major] src/decrypters/widevineandroid/WVDecrypter.h: Missing Next step: Implement the missing key tracking infrastructure ( |
914d6ea to
a28063f
Compare
Code ReviewCritical - Two bugs found in the CDM v2 key status path (missing emplace_back + SendOnKeyStatusChange inside the loop). Must Fix - HasLicenseKey error path returns false instead of nullopt. Medium - Semantic mismatch: kReleased maps to EXPIRED. Minor - Constructor parameter name inconsistency in WVCdmAdapter.h. |
|
@kodiai updated pr with fixes, please review, and ignore dependecy tarball link is not updated yet |
Description
allow to keep track of the status of the session KIDs
at each license update will trigger
OnKeyStatusChangecallbackthis in the future it may also be useful for better managing the widevine key rotation feature
and should allow to implement a real solution for issue #1973
this will rework part of relative key status change callbacks also on non-android (CDM) interface
each adapter now has its own status "management"
on android wv interface allowed to implement the missing
HasLicenseKey/HasKeyIdmethodsthis PR depends from:
xbmc/libandroidjni#55
xbmc/xbmc#27923
Motivation and context
never implemented from early versions of this add-on a long standing todo
non-android widevine interface (CDM) already has this feature implemented in similar way
How has this been tested?
Screenshots (if appropriate):
Types of change
Checklist: