[gst-devel] gst_parse_bin_from_description and pad creation

laura la stringarray at gmail.com
Sat Jan 22 01:46:42 CET 2011


Hi All,

I'm trying to use rsvgoverlay plugin from gst-plugins-bad, it overlays
a .svg file above a video. It has two sinks, "data_sink" for the .svg
data, and "sink" for video data.

The gst-launch command works fine:

gst-launch v4l2src device=/dev/video0 ! ffmpegcolorspace ! rsvgoverlay
location=/usr/share/icons/gnome/scalable/places/gnome-foot.svg !
ffmpegcolorspace ! videoscale ! video/x-raw-yuv,width=640,height=480 !
ffmpegcolorspace ! ximagesink

or

gst-launch -v videotestsrc ! ffmpegcolorspace ! rsvgoverlay
location=foo.svg ! ffmpegcolorspace ! autovideosink

Here are a couple more examples in the plugin code itself:

http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/ext/rsvg/gstrsvgoverlay.c

I need to create the GstElement using gst_parse_bin_from_description:

GstElement * overlay = gst_parse_bin_from_description ("rsvgoverlay
location=foo.svg", TRUE, NULL);

and then link it to other elements of the stream. This isn't working.

Here is a simplified code snippet with working and not working ways to
create the GstElement. http://pastebin.com/uiqDZR1Y

This works:
overlay = gst_element_factory_make ("rsvgoverlay", "overlay");
g_object_set (overlay, "location", "foo.svg", NULL);

But I using  gst_parse_bin_from_description I get errors about
negotiating format. I think during linking it's trying to use
"data_sink" instead of "sink" in rsvgoverlay element. But I'm not 100%
sure.

I tried variations of the pipeline description, for example
ffmpegcolorspace ! rsvgoverlay location=foo.svg ! ffmpegcolorspace but
it doesn't work either.

Here is a GST_DEBUG=4 log file in case you want to take a look:
http://ubuntuone.com/p/Z4L

I'm a participant in the GNOME Outreach program for Women 2010, I'm
working on Cheese application, and the idea is to add funny .svg hats
that follow you around with face recognition. See more here:
http://programmermusings.blogspot.com/
http://projects.gnome.org/cheese/

Bye!
Laura




More information about the gstreamer-devel mailing list