From b7cb6ecedbbd16e96fbf54ff4c1f8220b23c47fd Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Fri, 18 Nov 2011 19:28:26 +0100 Subject: [PATCH] opencv: use caps constants more --- ext/opencv/gstfacedetect.c | 5 +++-- ext/opencv/gstmotioncells.c | 16 +++++++++++----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ext/opencv/gstfacedetect.c b/ext/opencv/gstfacedetect.c index 9ed01fb659..7f2121626d 100644 --- a/ext/opencv/gstfacedetect.c +++ b/ext/opencv/gstfacedetect.c @@ -76,6 +76,7 @@ #include +#include "gstopencvutils.h" #include "gstfacedetect.h" GST_DEBUG_CATEGORY_STATIC (gst_face_detect_debug); @@ -152,13 +153,13 @@ gst_opencv_face_detect_flags_get_type (void) static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS ("video/x-raw-rgb") + GST_STATIC_CAPS (GST_VIDEO_CAPS_RGB) ); static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_STATIC_CAPS ("video/x-raw-rgb") + GST_STATIC_CAPS (GST_VIDEO_CAPS_RGB) ); GST_BOILERPLATE (GstFaceDetect, gst_face_detect, GstOpencvVideoFilter, diff --git a/ext/opencv/gstmotioncells.c b/ext/opencv/gstmotioncells.c index 9551f0938b..bf2eb7f604 100644 --- a/ext/opencv/gstmotioncells.c +++ b/ext/opencv/gstmotioncells.c @@ -61,13 +61,15 @@ #include #include -#include -#include "gstmotioncells.h" -#include "motioncells_wrapper.h" #include #include #include +#include +#include "gstmotioncells.h" +#include "motioncells_wrapper.h" +#include + GST_DEBUG_CATEGORY_STATIC (gst_motion_cells_debug); #define GST_CAT_DEFAULT gst_motion_cells_debug @@ -139,10 +141,14 @@ enum /* the capabilities of the inputs and outputs. */ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", - GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS ("video/x-raw-rgb")); + GST_PAD_SINK, + GST_PAD_ALWAYS, + GST_STATIC_CAPS (GST_VIDEO_CAPS_RGB)); static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", - GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS ("video/x-raw-rgb")); + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS (GST_VIDEO_CAPS_RGB)); GST_BOILERPLATE (GstMotioncells, gst_motion_cells, GstElement, GST_TYPE_ELEMENT);