Problems with sink elements not going into playing state

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems with sink elements not going into playing state

James Liggett
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
here.

Thanks again,
James Liggett

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

gst-test.c (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Problems with sink elements not going into playing state

James Liggett
On Mon, 2008-01-07 at 22:14 -0800, James Liggett wrote:

> Is this
> a known problem, or am I just doing something wrong, being a total
> GStreamer newbie?

Problem solved by adding queues to each branch in my pipeline.
Everything works now. Sorry for the noise...



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel