[gst-devel] gst_parse_bin_from_description and pad creation
Stefan Kost
ensonic at hora-obscura.de
Sat Jan 22 19:27:14 CET 2011
Am 22.01.2011 02:46, schrieb laura la:
> 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);
>
This code is much more recommended for applications as its more directly
expression what you like to do. gst_parse_bin_from_description() might struggle
with the two sinj-pads.
Stefan
> 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
>
> ------------------------------------------------------------------------------
> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
> Finally, a world-class log management solution at an even better price-free!
> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
> February 28th, so secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsight-sfd2d
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list