[Bug 764011] faceoverlay: port to Gstreamer 1.x

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Dec 27 16:10:18 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=764011

--- Comment #3 from César Fabián Orccón Chipana <cfoch.fabian at gmail.com> ---
(In reply to Mathieu Duponchelle from comment #1)
> Review of attachment 324517 [details] [review]:
> 
> Getting there, but not quite OK yet, please read on GstCaps and negotiation,
> it's a fairly essential part of what gstreamer does, arguably the most
> important one, can't hurt to learn about it :)
> 
> ::: gst/faceoverlay/gstfaceoverlay.c
> @@ +82,3 @@
>      GST_PAD_SINK,
>      GST_PAD_ALWAYS,
> +    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{RGB}")));
> 
> You should not just blindly copy paste stuff from other plugins, and instead
> take this as an occasion to learn what GstCaps are, and how to define them,
> for example here in new caps lingo we were previously looking at
> video/x-raw, format=[RGB, YUV], this reduces the plugin to only accepting
> video/x-raw, format=[RGB], which is incorrect. You can experiment by
> defining caps with capsfilters on the command line, something like this
> should work:
> 
>  gst-launch-1.0 autovideosrc ! videoconvert ! video/x-raw, format=yuv !
> faceoverlay location=/path/to/gnome-video-effects/pixmaps/bow.svg x=0.5
> y=0.5 w=0.7 h=0.7 ! videoconvert ! autovideosink
> 
> and it will be refused with your patch, even though the code in this plugin
> can handle both rgb and yuv. This is important to specify these right,
> because it's what is used by gstreamer to let videoconvert convert to an
> acceptable format for the plugin, while not doing unnecessary conversion, as
> this is a costly operation.


Do you mean that by setting only {RGB} on caps I am restricting it to only
accept RGB format as input? Imagine I am developing the element from scratch.
How can I know what should the input formats should be?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list