My simple transcoding app hangs, code review requested

Andrey Utkin andrey.krieger.utkin at gmail.com
Wed Oct 2 08:53:16 PDT 2013


2013/10/2 Josh Doe <josh at joshdoe.com>:
> 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.

Thank you Josh, your points make a lot of sense.
I've added queues to both branches. First i added it between demuxer
and decoders, but it didn't help, then i added more queues between
encoders and muxer. But it still didn't help, i still get freezes with
same result.
Updated sources are there: https://gist.github.com/krieger-od/6795897
GDB output is there: https://gist.github.com/krieger-od/6795867
Program output with gstreamer debug:
https://gist.github.com/krieger-od/6795884/raw/691524bb77b12841c515ed0e29fdca5865783899/gstreamer_test2.out

-- 
Andrey Utkin


More information about the gstreamer-devel mailing list