On Fri Sep 8 10:38:38 2023 +0000, Ziqing Hui wrote:
The problem is that: the gstreamer muxer element itself is using GstTask(https://gstreamer.freedesktop.org/documentation/gstreamer/gsttask.html) at its src pad. GstTask will launch a new thread. In order to synchronize the GstTask thread and our executing main thread, pthread is needed.
![muxer](/uploads/6dc24557dd2b9a4d02abb974d4d59281/muxer.png)
I've dumped a pipeline image of wg_muxer, we can see that there is a "[T]" mark at the src pad of the muxer element. From the left-bottom coner of the image, we know that "[T]" stands for a started GstTask.