-
Notifications
You must be signed in to change notification settings - Fork 6k
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
DefaultDrmSession Aquire/Release - Reference Count #7066
Comments
I think the count is typically 6, which consists of the following for audio and video separately:
It should be pretty straightforward for you to attach a debugger or add some logging showing the call stacks in |
Thank you for the quick response. That is indeed where I traced these calls in the stack back to. I was just curious if there was a way to prevent the session from releasing without modifying the reference count manually. I am afraid doing so might have unintended consequences. |
Are you using the IMA extension? If so, this question/bug is a duplicate of #7011. If not, what are you using to insert ad breaks? |
No, we are not using IMA, we are using VAST DAI letting the player handle the breaks. Our content is using DASH/Widevine and our ads are unprotected/clear. Our manifest from our packager does not insert any Content Protection inside the ad periods. |
Thanks for the info. If you have a working solution that increments the reference count, then I think you should be good. This is something we want to do a better job of supporting directly, but we haven't quite gotten around to it yet. |
Ok great, thank you for your quick responses in regard to this question. Our testing so far has not resulted in any issues that are readily apparent. Hopefully, this holds true in production. We just wanted to make sure there wasn't something we were missing. We will keep our eye on release notes in the future, or if you guys have a clear plan, let us know if we can contribute. |
First off thank you in advance for taking the time to respond to this question.
Searched documentation and issues
I have searched for related answers on Stack Overflow, existing issues, ExoPlayer Javadoc and the ExoPlayer Developer Website. I also tried the "Similar to # existing issues" on GitHub which as well yielded no result.
Question
Why is the
referenceCount
inDefaultDrmSession
incremented and decremented multiple times byacquire()
andrelease()
is called and why are the called multiple times?Does manually altering the
referenceCount
to forcefully maintain the session and then forcefully release it cause unforeseen issues? If we need to hold onto this session through add breaks what is an alternative?Problem and Gathered Information
Version: 2.11
When observing the
referenceCount
inDefaultDrmSession
we see this Integer increment when the session is created and then decrement at the end of a session when the asset is finishing or when the player is released. The count is typically 5 and will decrement and release which is the expected behavior. However, there seems to be an issue arising when we transition to commercial breaks, from protected to clear and back to protected content, the player will release the session. This is not Ideal as it requires another Drm License to be retrieved. Initially, our thought was that this was due to the manifest's structure but after extensive testing we have ruled that out. It seems that MediaCodecRender (Audio/Video) is responsible for callingacquire()
andrelease()
but why it is called multiple times is unclear to us. If we alter thereferenceCount
we are able to prevent this issue from happening however, our lack understanding of this field is causing us concern.The text was updated successfully, but these errors were encountered: