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

Implement DRM auto-selection #1724

Draft
wants to merge 1 commit into
base: Piers
Choose a base branch
from
Draft

Conversation

CastagnaIT
Copy link
Collaborator

@CastagnaIT CastagnaIT commented Nov 9, 2024

Description

This is the last big step of my drm rework

i opened the PR to show the changes but this is still in WIP,
different code need to be cleanup and some other code need to be reimplemented in some other way,
at the time of writing i have only tested a Dash Widevine on windows, a very basic test to see if it works, everything else obviously needs to be completed and tested.

--- todo to explain most important changes---

To do

[x] Rework drm info on Dash parser
[ ] Rework drm info on HLS parser
[ ] Rework drm info on Smoothstreaming parser
[ ] Reimplement CheckHDCP
[ ] Adapt test project, if needed
[ ] Enable multi-drm support to "drm" property
[ ] Deprecate old properties
[x] Test stream with single drm widevine
[ ] Test stream with single drm playready
[x] Test stream with clearkey
[ ] Test stream with widevine "to" clearkey
[ ] Test multi drm's stream widevine+playready, between windows and android

To study / unsolved

currently drm engine can store sessions over the time, but there is no implementation for possible cleanups
for example in a multiperiod stream, when an old period is expired (and should be removed from memory) then cleanup old drm sessions. in theory drm sessions on multiperiods should be reused, but idk...

fix #1585 about to separate audio/video sessions

Motivation and context

This PR will finish the multi-drm configuration support for inputstream.adaptive.drm property

What is auto selection of DRM?

in this case we are talking about manifests (usually HLS/DASH) that support multiple DRMs at same time.
Until now, every python video add-on was forced to manually set the appropriate DRM for the type of operating system in use
by setting appropriate inputstream.adaptive.license_type and inputstream.adaptive.license_key (and all other properties).
for example a manifest that support playready and widevine,
on Windows OS is needed that the python addon set the drm configuration for widevine, and on android could be for playready.

This implementation allows a video add-ons to provide all the DRM configurations supported by the provider in a distinct way, so that ISA can automatically select a DRM by finding a match between DRM supported in the operating system in use and the manifest, so a video add-on will no longer have to check if a DRM is compatible with the operating system in use, to configure ISA.

This will be even more useful in the future when a support to new DRMs can be implemented.

How has this been tested?

WIP

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: Fix non-breaking change which fixes an issue WIP RFC PR submitted for gathering feedback Type: Cleanup non-breaking change which removes non-working or unmaintained functionality Type: Feature non-breaking change which adds functionality v22 Piers labels Nov 9, 2024
@CastagnaIT CastagnaIT marked this pull request as draft November 9, 2024 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC PR submitted for gathering feedback Type: Cleanup non-breaking change which removes non-working or unmaintained functionality Type: Feature non-breaking change which adds functionality Type: Fix non-breaking change which fixes an issue v22 Piers WIP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] ORF ON DRM Streams not working on Android Devices
1 participant