[gst-devel] Newbie question - how to get video frames from pipeline

Tim-Philipp Müller t.i.m at zen.co.uk
Tue Mar 31 21:37:57 CEST 2009


On Tue, 2009-03-31 at 20:03 +0200, Štěpán wrote:

>     thanks for your example, it helped me a lot. In fact, it nearly
> works already for me (I'll post the sourcecode when I am finished), but
> I have one slight problem - I cannot resize the video during playback.
> The important parts of code I am using are:
> ...
> gchar * descr = g_strdup_printf ("uridecodebin uri=file://%s !
> ffmpegcolorspace ! videoscale ! capsfilter name=flt !"
>           " appsink name=sink caps=\"" CAPS "\"", filename);
>       pipeline = gst_parse_launch (descr, &errorMessage);

There shouldn't be any need for that capsfilter element, you should be
able to just put the width=x,height=y parameters into the appsink CAPS
and then change those via gst_app_sink_set_caps() or g_object_set
(appsink, "caps", new_caps, NULL);

Changing caps of a capsfilter element has been a bit problematic in the
past. I think it should work now with the latest GStreamer core release,
but it might not work with older releases.

> Everything works fine until the changeResolution() is called, then it
> stops giving me new buffers in on_new_buffer_from_source.

You should get an error message on the pipeline bus (presumably an
"internal flow error: not-negotiated").

Cheers
 -Tim






More information about the gstreamer-devel mailing list