Open Bug 1263836 Opened 8 years ago Updated 2 years ago

[META] Introduce struct that encapsulates media format MIMEtype, codecs, and DecoderDoctorDiagnostics

Categories

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

48 Branch
task

Tracking

()

Tracking Status
firefox48 --- affected

People

(Reporter: mozbugz, Unassigned)

References

Details

(Keywords: meta)

Spawned from bug 1248507 comment 29 by :jya, in the context of DecoderDoctorDiagnostics being passed as parameters through many methods:
"""
This is starting to look very messy and exacerbate and existing problem when it comes to passing arguments to either the DecoderTraits utility or creating a MediaDataDecoder.

We have two cases:
1- Passing the mimetype as used with canPlayType which is an extended mimetype for the container along side optional codecs.
2- Passing the mimetype to create the decoder. This mimetype is different to the one above in that it refers to the codec itself.

Now depending on the method, sometimes it take a char*, sometimes a nsACString&, something a nsCString&, sometimes an optional string.

And now we're adding one extra parameter.

It would be much better to create a new parameter type that could be extended in the future.
This parameter would allow to pass either type of mimetype, a pointer to the diagnostic structure etc.

It would be complete enough to handle all the current uses and could be universally shared between the media client (either the HTMLMediaElement or the MediaFormatReader) and the end MediaDataDecoder.
"""
To the eventual implementer: There's a lot of information about MIME types&subtypes in bug 1230353 (thank you Jean-Yves).
Bug 1281632 may make this one a bit easier to implement?
Depends on: 1281632
Mass change P2 -> P3
Priority: P2 → P3
Making this bug a META bug, the implementation will be covered by several linked bugs
Keywords: meta
Summary: Introduce struct that encapsulates media format MIMEtype, codecs, and DecoderDoctorDiagnostics → [META] Introduce struct that encapsulates media format MIMEtype, codecs, and DecoderDoctorDiagnostics
Severity: normal → --
Type: defect → task
You need to log in before you can comment on or make changes to this bug.