Closed Bug 1690661 Opened 4 years ago Closed 4 years ago

Figure out if we should remove or keep sending `DecoderDoctorDiagnostics` in `ChannelMediaDecoder::Create()`

Categories

(Core :: Audio/Video: Playback, task, P3)

task

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: alwu, Assigned: alwu)

References

Details

Attachments

(1 file)

ChannelMediaDecoder::Create(MediaDecoderInit& aInit, DecoderDoctorDiagnostics* aDiagnostics) receives a DecoderDoctorDiagnostics as a parameter, but we didn't use that at all, which is an useless parameter.

That was introduced in this, and at that time that parameter was already useless.

We should figure that either to make that parameter useful (hook that with the DecoderTraits::IsSupportedType()) or simply to remove that.

Severity: -- → N/A
Type: defect → task

Thank you for looking into this.

(In reply to Alastor Wu [:alwu] from comment #0)

That was introduced in this, and at that time that parameter was already useless.

To be fair, "this" was bug 1409178 moving some code.
The real initial code was from bug 1248507, DecoderTraits::CreateDecoder() was passing DecoderDoctorDiagnostics to other functions, where it could be updated with diagnostic information. So it was not useless initially.

Anyway, regardless of this history, yes you'll need to decide if it's worth keeping this parameter now -- Could it ever be useful again in the future?

We should figure that either to make that parameter useful (hook that with the DecoderTraits::IsSupportedType()) or simply to remove that.

Right, I see DecoderTraits::CreateDecoder() is calling DecoderTraits::IsSupportedType (without DecoderDoctorDiagnostics), which interestingly is calling MP4Decoder::IsSupportedTypeWithoutDiagnostics! Maybe instead we could pass DecoderDoctorDiagnostics through to MP4Decoder::IsSupportedType?

Doing that allows us to accquire the error information from the DecoderDoctorDiagnostics.

Pushed by alwu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4c2f16aad48f use `CanHandleContainerType()` for asking if the container type is supported. r=bryce
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: