On Tue May 27 10:12:44 2025 +0000, Brendan McGrath wrote:
Can we please keep the formats in alphabetical order?
Done
I'm confused, though, in what situation do we even need to handle
I420_10LE at all, if we're going to force P010_10LE anyway? The decoder we use (`av1dec`) doesn't offer `P010_10LE` as an output. We need to use `videoconvert` for that. But Windows doesn't support `I420_10LE`, instead it offers `P010_10LE`. So we need to set the caps on `videoconvert` to `P010_10LE`. We do that at the moment through `wg_parser_stream_enable` which sets the `desired_caps` and creates a reconfigure event.
Translating I420_10LE to P010_10LE in wg_video_format_from_gst()
doesn't seem like a very clear way to do things. What we are doing is offering `P010_10LE` as an output when GStreamer states the video format is `I420_10LE`. So if the application selects `P010_10LE` as the desired output, we'll use `P010_10LE` as the `desired_caps`. I've separated this part out in to its own commit and I think I have now better explained it in the commit message.
GStreamer doesn't "state" the video format is anything, though. We treat the default format it outputs as "preferred" format, but there isn't actually a sense in which I420_10LE is the correct format. In fact the mfplat frontend ignores the preferred format and substitutes its own list, largely because mfplat applications are especially picky about which formats get enumerated.
The confusion probably comes from 08730dae2, which was committed over my objections.