Closed Bug 1499137 Opened Last year Closed Last year
Prime Videos no longer plays on Android
Bug 1499137 - unbind media manager service only when both codecs and DRM bridges are gone. r?snorp!,jya!
46 bytes, text/x-phabricator-request
|Details | Review|
This is a recent regression. Watching Prime Videos no longer work. This is a recent regression
How to reproduce. On Firefox Nightly on Android, go to https://www.primevideo.com select to get Desktop content. Attempt to watch a video. What happes: playback shows the Amazon Prime jingle, after 5s an error occur What should happen: the video plays
The cause: remote decoder process is killed  (after all codec proxies are released ) while the MediaDrmBridge is still alive, which the CDM proxy is aware of and will reuse it in future decoding session, which causes errors.  https://searchfox.org/mozilla-central/source/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/MediaManager.java#53  https://searchfox.org/mozilla-central/source/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/RemoteManager.java#205
For context: I had to add the termination code to support crash reporting in Firefox Reality. The problem I was having was when the gecko parent process crashed, the spawned crash reporter service needs to wait for all the processes to end before restarting the application to handle the crash data. When the media service was started, it would never shutdown on parent process crash and the crash service would get stuck waiting until the system killed it. Firefox Reality would then never get restarted and the crash would not get reported.
Why kill the decoder process when the parent crashed? Right now it's killed even when the parent doesn't crash.
Killing the decoder process when the parent process is dead sounds reasonable to me. Perhaps we should kill the process through death recipient (or explicit command if the crash reporter can issue one) rather than when service unbinding. Also, I think we should move the list of active MediaDrmProxy  to RemoteManager so it can keep track of that and unbind the manager service only when all codecs and DRM bridges are gone.  https://searchfox.org/mozilla-central/source/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/MediaDrmProxy.java#43
The 2nd part in the previous comment alone should be able to address the regression in this bug. To meet the soft code freeze deadline, I will open another bug for the 1st part in case I cannot make it by this weekend.
Attachment #9017362 - Attachment description: Bug 1499137 - unbind media manager service only when both codecs and DRM bridges are gone. r?jchen!,jya! → Bug 1499137 - unbind media manager service only when both codecs and DRM bridges are gone. r?snorp!,jya!
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/d72b8e9bac3f unbind media manager service only when both codecs and DRM bridges are gone. r=jya,snorp
https://hg.mozilla.org/projects/larch/rev/d72b8e9bac3f8eead0f679b5ad07f9b1b6a7e7d8 Bug 1499137 - unbind media manager service only when both codecs and DRM bridges are gone. r=jya,snorp
You need to log in before you can comment on or make changes to this bug.