Gstreamer with multithread app (Qt)

Tim-Philipp Müller t.i.m at
Fri Apr 8 01:34:31 PDT 2011

On Thu, 2011-04-07 at 18:20 -0400, Matias Hernandez Arellano wrote:

> It's possible to use gstreamer in a multithread app?


> I have an Producer/Consumer application where i have two groups 1 with
> 1 Producer and 1 Cosumer (Capture Video with Opencv/Process Image) and
> other group equal ... Take de Process Frame  / Stream the frames...

Have you considered writing a simple source element that captures and
processes the frame directly in a GStreamer pipeline?

> The communication between threads works good, but know i need to add
> the stream part .. I have another app where i test the functionality of
> AppSrc and works!!! .. So i need to add this (Read from the Buffer
> where i have images, push into AppSrc and Stream over network) in a
> thread.
> is this possible??

Why would this not be possible? Have you tried it and run into problems?

GStreamer does (almost) all of its processing in dedicated threads of
its own ("streaming threads"). You should be able to push buffers into
appsrc from any application thread (they will get queued internally in
appsrc and then processed in the GStreamer streaming thread).


More information about the gstreamer-devel mailing list