mediaCapabilities.decodingInfo() can report HEVC as supported on Windows when it cannot be decoded
Categories
(Core :: Audio/Video: Playback, defect, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr153 | --- | unaffected |
| firefox158 | --- | wontfix |
| firefox159 | --- | wontfix |
| firefox160 | --- | fix-optional |
People
(Reporter: az, Unassigned, NeedInfo)
References
(Depends on 1 open bug, Blocks 1 open bug, Regression)
Details
(Keywords: regression, Whiteboard: [gecko-triage:easy-fix])
In the content process, the RemoteDecoderModule for RemoteMediaIn::UtilityProcess_MFMediaEngineCDM answers synchronous support checks with a guess until that process reports its codec support. For HEVC on Windows the guess is hardware decode support (RemoteMediaManagerChild::Supports).
That location can only create decoders for media engine playback: RemoteMediaManagerChild::CreateVideoDecoder and CreateAudioDecoder reject any request without a media engine id. It still claims support for ordinary queries, so PDMFactory can select it.
In decodingInfo() strict mode this produces a false positive. The strict path creates a decoder through PDMFactory::StrictSupportsAsync. For an HEVC config with no codec setup data, MediaChangeMonitor defers creating the real decoder and resolves right away, so the query reports supported. On CI this shows up as the strict-mode HEVC "is supported" subtests in testing/web-platform/mozilla/meta/media-capabilities/decodingInfo-api-modes.any.js.ini passing or failing depending on timing on Windows.
Bug 2051510 hid this by waiting for the process to report before answering. Bug 2082265 removesthat wait for queries without a media engine id, because on some machines the process launch never completes and every video decodingInfo() call hung. On such a machine the guess is never replaced, so HEVC is reported as supported permanently, as it was before bug 2051510.
Proposed fix: make RemoteDecoderModule::Supports return no support for the media engine CDM location when aParams.mMediaEngineId is not set, mirroring the existing check that limits media engine queries to that location. MFMediaEngineDecoderModule::SupportsConfig calls RemoteDecoderModule::Supports without a media engine id, so it would need to query RemoteMediaManagerChild::Supports directly instead. This also changes MediaSource.isTypeSupported() results on Windows where that location was the only one claiming support, so it needs checking against media engine playback with media.wmf.media-engine.enabled set to 1 and 3.
Once this lands, the strict-mode HEVC expectations on Windows can go back to FAIL.
Comment 1•1 month ago
|
||
Set release status flags based on info from the regressing bug 2051510
Comment 2•1 month ago
|
||
| gecko-triage | ||
The analysis in comment 0 matches the current code.
Analysis
- RemoteDecoderModule.cpp clears support only when a media engine id comes with a location other than
UtilityProcess_MFMediaEngineCDM. It does not clear support for that location when the media engine id is missing. - Before that process reports, RemoteMediaManagerChild.cpp guesses
HardwareDecodefor HEVC on Windows. PDMFactorycan then select the media engine CDM location. For HEVC with no setup data,MediaChangeMonitordefers the real decoder, soStrictSupportsAsyncresolves as supported.- MFMediaEngineDecoderModule.cpp calls
RemoteDecoderModule::Supportswithout a media engine id. The proposed check breaks it unless it callsRemoteMediaManagerChild::Supportsdirectly.
The defect is older than bug 2051510. That bug only hid it with a wait for the process. Bug 2082265 part 1 (9473c92d8d72) removed the wait and exposed the defect again, so this bug now names bug 2082265 as the regressor. We suggest that a person remove bug 2051510 from "Regressed by".
Next steps
The fix direction in comment 0 is correct. Also check the other support callers that pass no media engine id, for example PDMFactory::SupportsAsync.
This bug now blocks bug 1758786, the MediaCapabilities API meta bug.
Bug 2082953 is a copy of this bug from the same reporter. We suggest that a person close it as a duplicate of this bug.
To give feedback on this comment, add a thumbs-up or thumbs-down reaction.
Updated•1 month ago
|
Updated•1 month ago
|
Updated•1 month ago
|
Updated•1 month ago
|
Updated•27 days ago
|
Description
•