GNOME Bugzilla – Bug 115559
Deadlock with video thread
Last modified: 2004-12-22 21:47:04 UTC
I'm using gstreamer to transcode a MPEG audio and video file to a propiate file format for an old computer system. I'm using the main pipeline and three thread. The (main) pipeline devileres the mpegdemux element the datas. One thread is then doing the audio decoding/encoding. The second thread is doing video decoding/converting/encoding. The third and last thread is doing multiplexing. The video thread seems to be totally broken (freezes) because if I disable the video thread my app is running till the whole source file (mpeg audio/video file is transcoded). But if I disable audio thread my whole app is broken finding no parent elements anymore for example. Attaching output from gdb (That are 5 processes)
Created attachment 17634 [details] gdb output of all processes
What pipeline are you using exactly? What elements?
Normal pipeline created via gst_pipeline_new(...) with a filesrc and mpegdemux element. In first thread (called "video_thread") there are: video_input_queue (queue), video_decoder (mpeg2dec), video_converter (colorspace), video_encoder (my sam_video_encoder codec) and video_output queue. The second thread (called "audio_thread") contains of: audio_input_queue (queue), audio_decoder (mpeg2dec), audio_encoder (my sam_audio_encoder codec) and audio_output queue. The third and last thread has: muxer (my sam_multiplexer codec) and a filesink. That's all. I tried different schedulers but all stop completely working after 0,19% up to 1,20% of 700MB transcoded. If I apply a gst-mask=0x100 I get sometimes (really only sometime) that queues get decoupled!
Forgot! The threads are in pipeline but I guess you guessed!
Yeah. ;). Is the muxer chain-based or loop-based? Only loop-based elements are supported for now.
Show loop-based first. But pulling datas from the both output queue resulted always in nothing. I got no datas to push them to the filesink. After changing the muxer to a chain-based it got datas.
Then there's your problem, chain-based muxers don't work. Loop-based should. Could you show some code? Loop-based works for me...
Created attachment 17660 [details] Multiplexer source code derived from example plugin source code provided by gstreamer
Created attachment 17680 [details] Debug logfile with source code containing loop-based multiplexer
This is working now, closing...