GMP shutdown needs to be after MediaDecoder shutdown

NEW
Unassigned

Status

()

Core
Audio/Video: GMP
P3
normal
Rank:
25
4 years ago
8 months ago

People

(Reporter: cpearce, Unassigned)

Tracking

29 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
Currently the GMP's shutdown observer runs before the MediaDecoder stack's, so we're unable to shutdown MediaDecoder cleanly if we're using a GMP.

In order to shutdown cleanly, the MediaDecoder stack must shutdown things in a specific order. We have a singleton (MediaShutdownManager) that manages our shutdown and ensures that the various parts of our stack are shutdown in the right sequence.

The GeckoMediaPluginService should register itself with the MediaShutdownManager, and let the MediaShutdownManager's shutdown observer tell it when it's safe to shutdown.

The WebRTC stack (and/or any other GMP clients) may also need to be involved here to ensure they have clean shutdown too.

OR maybe we can just have the GMPService to not shutdown until all active API objects have been destroyed by their users (who have their own shutdown observers) and/or all mozIGeckoMediaPluginService references have been released. Then we don't need to track the dependency explicitly.
Component: Audio/Video → Audio/Video: MSG/cubeb/GMP
Component: Audio/Video: MediaStreamGraph → Audio/Video: GMP
Rank: 15
Priority: -- → P1
Rank: 15 → 25
Priority: P1 → P2
Mass change P2->P3 to align with new Mozilla triage process.
Priority: P2 → P3
You need to log in before you can comment on or make changes to this bug.