Understanding about the 'tee' element

Nirbheek Chauhan nirbheek.chauhan at gmail.com
Tue May 17 21:07:38 UTC 2022

On Mon, May 9, 2022 at 3:15 PM neoragex2002 via gstreamer-devel
<gstreamer-devel at lists.freedesktop.org> wrote:

> That is one of good points. Thanks for your mention! But what I concerned here is not the GIL of python, because there is no computing-bound python probe in the 1st tee-branch.
> According to the docs of gstreamer, the queue-seperated 1st tee-branch and 2nd tee-branch are belong to different streaming threads. Their runnings should not be dependent with each other right?

GIL stands for "global interpreter lock", which means that if the
interpreter is running a function in one thread, other functions in
other threads will wait on that global lock before running.

If you attach a python function to a pad probe, when the function is
triggered, the interpreter will run the function and gstreamer will
wait for the function to return before continuing the streaming
thread. This streaming thread is hence holding the GIL.

When you attach a python function to another pad probe on a different
streaming thread, that thread will also wait for the interpreter to
finish running this callback, which will block on the previous probe
due to the GIL.

So yes. The two will be entirely dependent on each other. Do not
implement any performance-sensitive or multi-threaded pad probes in


More information about the gstreamer-devel mailing list