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

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Mar 22 04:45:12 UTC 2016


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

Mathieu Duponchelle <mduponchelle1 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #324517|none                        |needs-work
             status|                            |

--- Comment #1 from Mathieu Duponchelle <mduponchelle1 at gmail.com> ---
Review of attachment 324517:
 --> (https://bugzilla.gnome.org/review?bug=764011&attachment=324517)

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.

@@ +87,3 @@
     GST_PAD_SRC,
     GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{BGRA}")));

Same comment applies here

-- 
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