My simple transcoding app hangs, code review requested

Josh Doe josh at joshdoe.com
Wed Oct 2 04:51:22 PDT 2013


On Tue, Oct 1, 2013 at 4:16 PM, Andrey Utkin
<andrey.krieger.utkin at gmail.com> wrote:
> I have derived my code from "Hello world" of Gstreamer Application
> Development Manual.
> The source file is there: https://gist.github.com/krieger-od/6784332
> Compiled with
> gcc main.c -o gstreamer_test `pkg-config --cflags --libs
> gstreamer-1.0` -O0 -g -ggdb
> The application freezes, see its output and gdb backtrace below.
> I think i missed some basic concept(s) because the intention is trivial.
> Please anybody brave check my code.

First of all, it's usually more helpful to include a log file. See
these links for debugging:
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/section-checklist-debug.html
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gst-running.html
http://docs.gstreamer.com/display/GstSDK/Basic+tutorial+11%3A+Debugging+tools

I think what's happening is that mpegtsmux is blocking, because it is
waiting for data from both audio and video pads to be present
(performed by gst_collect_pads_chain), and as you only have a single
thread, qtdemux can never get around to pushing any video buffers.
What you'll need to do is add a queue to both the audio and video
branches of the pipeline, which will force the creation of separate
threads for each of the branches.

-Josh


More information about the gstreamer-devel mailing list