On Thu Mar 21 19:31:14 2024 +0000, Zebediah Figura wrote:
The AAC encoder does not require the `MF_MT_USER_DATA` attribute, if
it's missing it will simply generate one from other attributes. Sure, but that shouldn't require doing anything manually, right? We just need to query the codec_data that's set as caps on our sink pad. That'll require some code changes, but they'd be less awkward than reconstructing the codec_data from parsed data... Unless the native AAC encoder doesn't actually set that attribute?
The AAC encoder actually doesn't expose the generated `MF_MT_USER_DATA` in the output type, you were right. Which only makes it more important that we either generate it in the IMFMediaSink or parse it from the input stream.
I already did an experiment with just putting an `aacparse` element at the start of the wg_muxer pipeline, but that didn't make GStreamer happy. It might be that the input to the media sink is an AAC stream in "raw" format, and I think you can't parse out codec data from that. In which case I don't see a way around generating the user data separately in some way from the attributes set on the input type of the IMFMediaSink, either directly in Wine or with the Gstreamer-based method.