[gst-devel] Problems with sink elements not going into playing state

James Liggett jrliggett at cox.net
Tue Jan 8 07:14:58 CET 2008

Hi Everybody,
For the past two weeks I've been taking my first stabs at developing a
webcam app with GStreamer. I got the display part of it working just
fine. But, the problems start when I try to implement recording.
Basically I have a pipeline that connects a v4l2src, an
ffmpegcolorspace, a tee, and an xvimagesink for the display. The problem
comes in when I try to connect the recording elements (theoraenc,
oggmux, and filesink) to my setup with the tee. What happens is the
pipeline just stops; I only get one frame of video, if anything at all,
from the display and an empty .ogg file. After some long debugging
sessions I found that the filesink was the culprit; everything else was
doing its job, but this element, and strangely the image sink, never
completes the state change from paused to playing, while all the other
elements do. In fact, when I set the debug level to 5 it shows me some
of the Theora data that the pipeline produces. 

Even more strangely, when I stop recording and go back to display only,
the display resumes again. I played with gst-inspect a little and found
out that I could reproduce the problem with this pipeline:

gst-launch v4l2src ! video/x-raw-yuv,width=640,height=480 !
ffmpegcolorspace ! xvimagesink . fakesink 

But if I just do

gst-launch v4l2src ! video/x-raw-yuv,width=640,height=480 !
ffmpegcolorspace ! xvimagesink

Everything works fine. I also have a test program (attached) that uses
videotestsrc and fakesink, and it shows the same problem. If I introduce
more than one sink into my pipeline, all the sinks get stuck in the
paused state. It doesn't even have to be connected to anything, it just
has to be in the pipeline, and it'll bring the whole thing down. Is this
a known problem, or am I just doing something wrong, being a total
GStreamer newbie?

To compile the test program, do:

gcc gst-test.c `pkg-config gstreamer-0.10 gstreamer-plugins-base-0.10
gtk+-2.0 --cflags --libs` -lgstinterfaces-0.10 -o gst-test

Note that you'll have to enable the part that adds the fakesink to the
pipleine to see the problem; with it disabled everything seems to work.
This is on Ubuntu Gutsy with gstreamer 0.10.14 packages. I also tried
compiling .15 from source; it gives the same results. 

Thanks in advance for you help. Also, please CC me as I'm not subscribed

Thanks again,
James Liggett
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gst-test.c
Type: text/x-csrc
Size: 2745 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20080107/79d83a97/attachment.c>

More information about the gstreamer-devel mailing list