On Wed Dec 6 01:51:41 2023 +0000, Ziqing Hui wrote:
Do we actually need to set streamheader? Are there any elements that
need it, or can we just revert 320383c594c4eef821ea380b52021d32c8073056? Yeah, we actually need that. It is needed by h264parse[1], byte-stream H264 need streamheader to be set or the streamheader should be sent to the h264parse as the first data buffer. I think it's easier to set it as a streamheader field in caps because this is what PE side does: setting the h264 header in a standalone field.
As a side note, it would be rather nice to have more tests for the mp4
muxer, ideally tests that use realistic formats like H.264 and AAC, and tests that actually feed samples in and get data out. Testing that the data is correct is likely to be a lot harder, but currently we aren't doing any streaming at all. I have a local test program[1] to produce a mp4 file with H264 video stream (audio stream is not tested though). After this patch, a playable mp4 file can be successfully consumed. It fails before this patch. [1] https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/blob/master/gst/v... [2] [mp4.c](/uploads/d2221e2e9575973502ddc2aadcaa40b1/mp4.c) This program is also tested on Windows, it can produce a playable mp4 file on Windows too.
Also, I did submitted some tests before: !3369. I'll try to get it upstreamed.