Don't kown how to make avdec_h264 working under multi-threads modes, seems not working with max-threads
Nicolas Dufresne
nicolas at ndufresne.ca
Thu Mar 18 15:31:34 UTC 2021
Le jeudi 18 mars 2021 à 00:48 -0500, wanted002 a écrit :
> Thanks~ . My gstreamer is 1.16.2 , and the pipeline executed on my Linux (
> ubuntu20.04). Because there's no hardware providing hardware-acceleration,
> CPU has to take the decoding job and thus cause a high cost, which I
> consider lead to the latency.
Perhaps you want to be aware of this:
https://gitlab.freedesktop.org/gstreamer/gst-libav/-/blob/master/ext/libav/gstavviddec.c#L561
If the pipeline is live, we kow that frame base threading will introduce a lot
of latency, so we flip it to slice base threading. For for this mode to run on
multiple threads, the encoded stream needs to have at least as many slices as
the number of threads you want to use. If you have control over the encoder,
that's the approch I would use.
You can always override this by setting the property "thread-type" to frame/1.
Now that you get 1 frame latency per thread, as the threading requires
introducing render delays. The paralellism still vary on the encoding of
references, since sometimes you have to decode the reference before you can do
anything else.
Nicolas
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list