mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:36:20 +00:00
faceoverlay: Port to GStreamer 1.x
https://bugzilla.gnome.org/show_bug.cgi?id=764011
This commit is contained in:
parent
d4797e4455
commit
456153cec9
3 changed files with 18 additions and 29 deletions
|
@ -459,11 +459,6 @@ dnl used in examples
|
||||||
AG_GST_DEFAULT_ELEMENTS
|
AG_GST_DEFAULT_ELEMENTS
|
||||||
|
|
||||||
dnl *** plug-ins to include ***
|
dnl *** plug-ins to include ***
|
||||||
dnl Non ported plugins (non-dependant, then dependant)
|
|
||||||
dnl Make sure you have a space before and after all plugins
|
|
||||||
GST_PLUGINS_NONPORTED="faceoverlay"
|
|
||||||
|
|
||||||
AC_SUBST(GST_PLUGINS_NONPORTED)
|
|
||||||
|
|
||||||
dnl these are all the gst plug-ins, compilable without additional libs
|
dnl these are all the gst plug-ins, compilable without additional libs
|
||||||
AG_GST_CHECK_PLUGIN(accurip)
|
AG_GST_CHECK_PLUGIN(accurip)
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
* <refsect2>
|
* <refsect2>
|
||||||
* <title>Example launch line</title>
|
* <title>Example launch line</title>
|
||||||
* |[
|
* |[
|
||||||
* gst-launch autovideosrc ! videoconvert ! faceoverlay location=/path/to/gnome-video-effects/pixmaps/bow.svg x=-5 y=-15 w=0.3 h=0.1 ! videoconvert ! autovideosink
|
* gst-launch-1.0 autovideosrc ! videoconvert ! faceoverlay location=/path/to/gnome-video-effects/pixmaps/bow.svg x=0.5 y=0.5 w=0.7 h=0.7 ! videoconvert ! autovideosink
|
||||||
* ]|
|
* ]|
|
||||||
* </refsect2>
|
* </refsect2>
|
||||||
*/
|
*/
|
||||||
|
@ -81,16 +81,15 @@ enum
|
||||||
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
|
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
GST_PAD_SINK,
|
GST_PAD_SINK,
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
GST_STATIC_CAPS ("video/x-raw-rgb; video/x-raw-yuv")
|
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{RGB}")));
|
||||||
);
|
|
||||||
|
|
||||||
static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
|
static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
GST_PAD_SRC,
|
GST_PAD_SRC,
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
GST_STATIC_CAPS ("video/x-raw-rgb; video/x-raw-yuv")
|
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{BGRA}")));
|
||||||
);
|
|
||||||
|
|
||||||
GST_BOILERPLATE (GstFaceOverlay, gst_face_overlay, GstBin, GST_TYPE_BIN);
|
#define gst_face_overlay_parent_class parent_class
|
||||||
|
G_DEFINE_TYPE (GstFaceOverlay, gst_face_overlay, GST_TYPE_BIN);
|
||||||
|
|
||||||
static void gst_face_overlay_set_property (GObject * object, guint prop_id,
|
static void gst_face_overlay_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec);
|
const GValue * value, GParamSpec * pspec);
|
||||||
|
@ -275,21 +274,6 @@ gst_face_overlay_message_handler (GstBin * bin, GstMessage * message)
|
||||||
GST_BIN_CLASS (parent_class)->handle_message (bin, message);
|
GST_BIN_CLASS (parent_class)->handle_message (bin, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
gst_face_overlay_base_init (gpointer gclass)
|
|
||||||
{
|
|
||||||
GstElementClass *element_class = GST_ELEMENT_CLASS (gclass);
|
|
||||||
|
|
||||||
gst_element_class_set_static_metadata (element_class,
|
|
||||||
"faceoverlay",
|
|
||||||
"Filter/Editor/Video",
|
|
||||||
"Overlays SVG graphics over a detected face in a video stream",
|
|
||||||
"Laura Lucas Alday <lauralucas@gmail.com>");
|
|
||||||
|
|
||||||
gst_element_class_add_static_pad_template (element_class, &src_factory);
|
|
||||||
gst_element_class_add_static_pad_template (element_class, &sink_factory);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_face_overlay_class_init (GstFaceOverlayClass * klass)
|
gst_face_overlay_class_init (GstFaceOverlayClass * klass)
|
||||||
{
|
{
|
||||||
|
@ -325,6 +309,17 @@ gst_face_overlay_class_init (GstFaceOverlayClass * klass)
|
||||||
"Specify image height relative to face height.", 0, G_MAXFLOAT, 1,
|
"Specify image height relative to face height.", 0, G_MAXFLOAT, 1,
|
||||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
|
gst_element_class_set_static_metadata (gstelement_class,
|
||||||
|
"faceoverlay",
|
||||||
|
"Filter/Editor/Video",
|
||||||
|
"Overlays SVG graphics over a detected face in a video stream",
|
||||||
|
"Laura Lucas Alday <lauralucas@gmail.com>");
|
||||||
|
|
||||||
|
gst_element_class_add_pad_template (gstelement_class,
|
||||||
|
gst_static_pad_template_get (&src_factory));
|
||||||
|
gst_element_class_add_pad_template (gstelement_class,
|
||||||
|
gst_static_pad_template_get (&sink_factory));
|
||||||
|
|
||||||
gstbin_class->handle_message =
|
gstbin_class->handle_message =
|
||||||
GST_DEBUG_FUNCPTR (gst_face_overlay_message_handler);
|
GST_DEBUG_FUNCPTR (gst_face_overlay_message_handler);
|
||||||
gstelement_class->change_state =
|
gstelement_class->change_state =
|
||||||
|
@ -332,7 +327,7 @@ gst_face_overlay_class_init (GstFaceOverlayClass * klass)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_face_overlay_init (GstFaceOverlay * filter, GstFaceOverlayClass * gclass)
|
gst_face_overlay_init (GstFaceOverlay * filter)
|
||||||
{
|
{
|
||||||
GstPadTemplate *tmpl;
|
GstPadTemplate *tmpl;
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,7 @@ subdir('compositor')
|
||||||
subdir('debugutils')
|
subdir('debugutils')
|
||||||
subdir('dvbsuboverlay')
|
subdir('dvbsuboverlay')
|
||||||
subdir('dvdspu')
|
subdir('dvdspu')
|
||||||
# did not work
|
subdir('faceoverlay')
|
||||||
#subdir('faceoverlay')
|
|
||||||
subdir('festival')
|
subdir('festival')
|
||||||
subdir('fieldanalysis')
|
subdir('fieldanalysis')
|
||||||
subdir('freeverb')
|
subdir('freeverb')
|
||||||
|
|
Loading…
Reference in a new issue