opencv: Remove dead assignments

... and fix indentation
This commit is contained in:
Edward Hervey 2010-11-25 18:42:33 +01:00
parent 3d3b46db39
commit 4067ef886d
12 changed files with 15 additions and 43 deletions

View file

@ -153,12 +153,8 @@ static void
gst_cv_dilate_erode_class_init (GstCvDilateErodeClass * klass)
{
GObjectClass *gobject_class;
GstOpencvVideoFilterClass *gstopencvbasefilter_class;
GstElementClass *gstelement_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gstopencvbasefilter_class = (GstOpencvVideoFilterClass *) klass;
parent_class = g_type_class_peek_parent (klass);

View file

@ -60,9 +60,9 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
);
#if G_BYTE_ORDER == G_BIG_ENDIAN
#define BYTE_ORDER_STRING "BIG_ENDIAN"
#define BYTE_ORDER_STRING "BIG_ENDIAN"
#else
#define BYTE_ORDER_STRING "LITTLE_ENDIAN"
#define BYTE_ORDER_STRING "LITTLE_ENDIAN"
#endif
static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
@ -141,10 +141,8 @@ gst_cv_laplace_class_init (GstCvLaplaceClass * klass)
GObjectClass *gobject_class;
GstBaseTransformClass *gstbasetransform_class;
GstOpencvVideoFilterClass *gstopencvbasefilter_class;
GstElementClass *gstelement_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gstbasetransform_class = (GstBaseTransformClass *) klass;
gstopencvbasefilter_class = (GstOpencvVideoFilterClass *) klass;
@ -220,17 +218,14 @@ gst_cv_laplace_transform_caps (GstBaseTransform * trans, GstPadDirection dir,
gst_structure_set (structure,
"depth", G_TYPE_INT, 16,
"bpp", G_TYPE_INT, 16,
"endianness", G_TYPE_INT, G_BYTE_ORDER,
NULL);
"endianness", G_TYPE_INT, G_BYTE_ORDER, NULL);
}
break;
case GST_PAD_SRC:
for (i = 0; i < gst_caps_get_size (output); i++) {
structure = gst_caps_get_structure (output, i);
gst_structure_set (structure,
"depth", G_TYPE_INT, 8,
"bpp", G_TYPE_INT, 8,
NULL);
"depth", G_TYPE_INT, 8, "bpp", G_TYPE_INT, 8, NULL);
gst_structure_remove_field (structure, "endianness");
}
break;

View file

@ -160,10 +160,8 @@ gst_cv_smooth_class_init (GstCvSmoothClass * klass)
{
GObjectClass *gobject_class;
GstOpencvVideoFilterClass *gstopencvbasefilter_class;
GstElementClass *gstelement_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gstopencvbasefilter_class = (GstOpencvVideoFilterClass *) klass;
parent_class = g_type_class_peek_parent (klass);

View file

@ -60,9 +60,9 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
);
#if G_BYTE_ORDER == G_BIG_ENDIAN
#define BYTE_ORDER_STRING "BIG_ENDIAN"
#define BYTE_ORDER_STRING "BIG_ENDIAN"
#else
#define BYTE_ORDER_STRING "LITTLE_ENDIAN"
#define BYTE_ORDER_STRING "LITTLE_ENDIAN"
#endif
static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
@ -136,10 +136,8 @@ gst_cv_sobel_class_init (GstCvSobelClass * klass)
GObjectClass *gobject_class;
GstBaseTransformClass *gstbasetransform_class;
GstOpencvVideoFilterClass *gstopencvbasefilter_class;
GstElementClass *gstelement_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gstbasetransform_class = (GstBaseTransformClass *) klass;
gstopencvbasefilter_class = (GstOpencvVideoFilterClass *) klass;
@ -195,17 +193,14 @@ gst_cv_sobel_transform_caps (GstBaseTransform * trans, GstPadDirection dir,
gst_structure_set (structure,
"depth", G_TYPE_INT, 16,
"bpp", G_TYPE_INT, 16,
"endianness", G_TYPE_INT, G_BYTE_ORDER,
NULL);
"endianness", G_TYPE_INT, G_BYTE_ORDER, NULL);
}
break;
case GST_PAD_SRC:
for (i = 0; i < gst_caps_get_size (output); i++) {
structure = gst_caps_get_structure (output, i);
gst_structure_set (structure,
"depth", G_TYPE_INT, 8,
"bpp", G_TYPE_INT, 8,
NULL);
"depth", G_TYPE_INT, 8, "bpp", G_TYPE_INT, 8, NULL);
gst_structure_remove_field (structure, "endianness");
}
break;

View file

@ -149,10 +149,8 @@ static void
gst_edgedetect_class_init (GstedgedetectClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
parent_class = g_type_class_peek_parent (klass);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_edgedetect_finalize);

View file

@ -149,10 +149,8 @@ static void
gst_faceblur_class_init (GstfaceblurClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
parent_class = g_type_class_peek_parent (klass);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_faceblur_finalize);

View file

@ -201,11 +201,9 @@ static void
gst_facedetect_class_init (GstfacedetectClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
GstOpencvVideoFilterClass *gstopencvbasefilter_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gstopencvbasefilter_class = (GstOpencvVideoFilterClass *) klass;
parent_class = g_type_class_peek_parent (klass);

View file

@ -96,7 +96,7 @@ gst_opencv_parse_iplimage_params_from_caps (GstCaps * caps, gint * width,
GstCaps *
gst_opencv_caps_from_cv_image_type (int cv_type)
{
GstCaps * caps = gst_caps_new_empty ();
GstCaps *caps = gst_caps_new_empty ();
switch (cv_type) {
case CV_8UC1:
gst_caps_append (caps, gst_caps_from_string (GST_VIDEO_CAPS_GRAY8));
@ -116,9 +116,11 @@ gst_opencv_caps_from_cv_image_type (int cv_type)
gst_caps_append (caps, gst_caps_from_string (GST_VIDEO_CAPS_ABGR));
break;
case CV_16UC1:
gst_caps_append (caps, gst_caps_from_string (GST_VIDEO_CAPS_GRAY16("1234")));
gst_caps_append (caps, gst_caps_from_string (GST_VIDEO_CAPS_GRAY16("4321")));
gst_caps_append (caps,
gst_caps_from_string (GST_VIDEO_CAPS_GRAY16 ("1234")));
gst_caps_append (caps,
gst_caps_from_string (GST_VIDEO_CAPS_GRAY16 ("4321")));
break;
}
return caps;
}
}

View file

@ -136,11 +136,9 @@ static void
gst_opencv_video_filter_class_init (GstOpencvVideoFilterClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
GstBaseTransformClass *basetrans_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
basetrans_class = (GstBaseTransformClass *) klass;
parent_class = g_type_class_peek_parent (klass);
@ -238,7 +236,7 @@ gst_opencv_video_filter_set_caps (GstBaseTransform * trans, GstCaps * incaps,
if (klass->cv_set_caps) {
if (!klass->cv_set_caps (transform, in_width, in_height, in_depth,
in_channels, out_width, out_height, out_depth, out_channels))
in_channels, out_width, out_height, out_depth, out_channels))
return FALSE;
}

View file

@ -150,10 +150,8 @@ static void
gst_pyramidsegment_class_init (GstpyramidsegmentClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
parent_class = g_type_class_peek_parent (klass);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_pyramidsegment_finalize);

View file

@ -140,10 +140,8 @@ static void
gst_templatematch_class_init (GstTemplateMatchClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gobject_class->finalize = gst_templatematch_finalize;
gobject_class->set_property = gst_templatematch_set_property;

View file

@ -164,10 +164,8 @@ static void
gst_textwrite_class_init (GsttextwriteClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
parent_class = g_type_class_peek_parent (klass);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_textwrite_finalize);