-
Notifications
You must be signed in to change notification settings - Fork 153
RDKDEV-1148: Release CDM resources when not used #1580
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
base: wpe-2.38
Are you sure you want to change the base?
RDKDEV-1148: Release CDM resources when not used #1580
Conversation
When HTMLMediaElement has been created in WPE and HTMLMediaElement::setMediaKeys() method was called to set DRM keys, CDMThunder implementation already allocates CDM resources and they're not released until HTMLMediaElement object is destructed. HTMLMediaElement destruction is non-deterministic and it's relying on Garbage Collector. In this case very often we observe that after WPE exit (WPE process is not closed, but some #boot address is being loaded), CDM resources are not released immediately and CDM can't be used by other applications like IP Player or Netflix. Proposed solution introduces following changes: 1) CDMPrivateThunder implementation doesn't occupy CDM resources permanently, as it only needs CDM resources to check if server certificate is supported so CDM resources can be acquired before check and released afterwards 2) CDMInstanceThunder object's CDM resources are released on HTMLMediaElement::stop() to not wait for Garbage Collector
|
I would need a test case, please. |
|
@calvaris is manual test case enough (description how to reproduce the problem)? |
yes. |
|
but it has to show that the resources are not released before the patch and are released after building with the patch. |
|
To reproduce the problem below steps should be performed:
|
|
Might the retained HTMLMediaElement issue have been solved by this recent commit (in wpe-2.46, might be applicable to wpe-2.38 too)? |
This patch is applicable to 2.38 and looks related to issue we're observing. |
|
Patch proactively backported it to wpe-2.38 as a087bcd |
When HTMLMediaElement has been created in WPE and HTMLMediaElement::setMediaKeys() method was called to set DRM keys, CDMThunder implementation already allocates CDM resources and they're not released until HTMLMediaElement object is destructed.
HTMLMediaElement destruction is non-deterministic and it's relying on Garbage Collector.
In this case very often we observe that after WPE exit (WPE process is not closed, but some #boot address is being loaded), CDM resources are not released immediately and CDM can't be used by other applications like IP Player or Netflix.
Proposed solution introduces following changes:
CDMPrivateThunder implementation doesn't occupy CDM resources permanently, as it only needs CDM resources to check if server certificate is supported so CDM resources can be acquired before check and released afterwards
CDMInstanceThunder object's CDM resources are released on HTMLMediaElement::stop() to not wait for Garbage Collector
2c36c43