Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanups / Improvements to PSSH, KID, init data #1668

Merged
merged 6 commits into from
Aug 30, 2024

Conversation

CastagnaIT
Copy link
Collaborator

@CastagnaIT CastagnaIT commented Aug 29, 2024

Description

  1. Reorganized code about PSSH parsing/generation to separate files

  2. changed a bit InitializeDRM basically the same just changed order of variables, and following changes:

  • if default KID missing can extract it from the (pssh) init data
  • ExtractStreamProtectionData can extract also the default KID, where previously was used only when init data was missing
  • ExtractStreamProtectionData has been limited to MP4, atoms used are MP4 should not works with other media types
  1. to dashtree add missing parsing pssh for use case when ContentProtection pro is provided without cenc:pssh
  2. add remaining missing pssh conversions to parsers, this allow to remove the code to convert init data (pssh) from widevine decrypters
  3. add code to fix playready header data, this is an attempt to investigate to Playready problems of issue [Bug] PlayReady DRM dont works on android #1642.
    to make tests for example the DRM::FixPrHeader method can be added to DRM::PSSH::Make by checking that systemId is playready, part of this solution come from exoplayer https://github.com/google/ExoPlayer/blob/dd430f7053a1a3958deea3ead6a0565150c06bfc/library/core/src/main/java/com/google/android/exoplayer2/drm/FrameworkMediaDrm.java#L491-L496. In my tests i see changes on android logcat but dont work yet.

Motivation and context

another step to future drm rework

How has this been tested?

Screenshots (if appropriate):

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)

Checklist:

  • I have read the Contributing document
  • My code follows the Code Guidelines of this project
  • My change requires a change to the Wiki documentation
  • I have updated the documentation accordingly

@CastagnaIT CastagnaIT added Type: Cleanup non-breaking change which removes non-working or unmaintained functionality Type: Improvement non-breaking change which improves existing functionality v22 Piers labels Aug 29, 2024
@CastagnaIT CastagnaIT marked this pull request as draft August 29, 2024 15:06
To full remove in the widevine decrypter the init data conversion
All code paths where PSSH is retrieved should be now all covered
with appropriate conversions where needed
Currently unused just to make tests since there are problems with some streams
part of these fixes come from exoplayer
@CastagnaIT CastagnaIT marked this pull request as ready for review August 30, 2024 13:07
@CastagnaIT CastagnaIT merged commit e2a9dd4 into xbmc:Piers Aug 30, 2024
10 checks passed
@CastagnaIT CastagnaIT deleted the pssh_kid_improvs branch August 30, 2024 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Cleanup non-breaking change which removes non-working or unmaintained functionality Type: Improvement non-breaking change which improves existing functionality v22 Piers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant