summaryrefslogtreecommitdiffstats
path: root/gst/videoflip
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2004-03-15 19:32:27 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2004-03-15 19:32:27 +0000
commit6cc1c73d2baa95c46edc04f57cbe9ed690dc2f21 (patch)
tree82b5546809a42a56a7bc18bacf8ed6e209ad006e /gst/videoflip
parentd07ec45fa47fbd0e36224e11bcd8ba2faee1a78c (diff)
don't mix tabs and spaces
Original commit message from CVS: don't mix tabs and spaces
Diffstat (limited to 'gst/videoflip')
-rw-r--r--gst/videoflip/gstvideoflip.c18
-rw-r--r--gst/videoflip/videoflip.c60
2 files changed, 40 insertions, 38 deletions
diff --git a/gst/videoflip/gstvideoflip.c b/gst/videoflip/gstvideoflip.c
index 9c7816de..f0160675 100644
--- a/gst/videoflip/gstvideoflip.c
+++ b/gst/videoflip/gstvideoflip.c
@@ -77,14 +77,15 @@ gst_videoflip_method_get_type (void)
{GST_VIDEOFLIP_METHOD_HORIZ, "4", "Flip horizontally"},
{GST_VIDEOFLIP_METHOD_VERT, "5", "Flip vertically"},
{GST_VIDEOFLIP_METHOD_TRANS, "6",
- "Flip across upper left/lower right diagonal"},
+ "Flip across upper left/lower right diagonal"},
{GST_VIDEOFLIP_METHOD_OTHER, "7",
- "Flip across upper right/lower left diagonal"},
+ "Flip across upper right/lower left diagonal"},
{0, NULL, NULL},
};
+
if (!videoflip_method_type) {
videoflip_method_type = g_enum_register_static ("GstVideoflipMethod",
- videoflip_methods);
+ videoflip_methods);
}
return videoflip_method_type;
}
@@ -131,9 +132,10 @@ gst_videoflip_get_type (void)
0,
(GInstanceInitFunc) gst_videoflip_init,
};
+
videoflip_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstVideoflip",
- &videoflip_info, 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstVideoflip",
+ &videoflip_info, 0);
}
return videoflip_type;
}
@@ -161,8 +163,8 @@ gst_videoflip_class_init (GstVideoflipClass * klass)
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_METHOD,
g_param_spec_enum ("method", "method", "method",
- GST_TYPE_VIDEOFLIP_METHOD, GST_VIDEOFLIP_METHOD_90R,
- G_PARAM_READWRITE));
+ GST_TYPE_VIDEOFLIP_METHOD, GST_VIDEOFLIP_METHOD_90R,
+ G_PARAM_READWRITE));
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
@@ -213,7 +215,7 @@ gst_videoflip_sink_getcaps (GstPad * pad)
* the peer's formats. Create a list of them. */
for (i = 0; i < videoflip_n_formats; i++) {
GstCaps *fromcaps =
- gst_caps_new_full (videoflip_get_cap (videoflip_formats + i), NULL);
+ gst_caps_new_full (videoflip_get_cap (videoflip_formats + i), NULL);
if (gst_caps_is_always_compatible (fromcaps, peercaps)) {
gst_caps_append (capslist, fromcaps);
}
diff --git a/gst/videoflip/videoflip.c b/gst/videoflip/videoflip.c
index 16db2102..d7307057 100644
--- a/gst/videoflip/videoflip.c
+++ b/gst/videoflip/videoflip.c
@@ -60,15 +60,15 @@ videoflip_get_cap (struct videoflip_format_struct *format)
if (format->bpp) {
structure = gst_structure_new ("video/x-raw-rgb",
- "depth", G_TYPE_INT, format->bpp,
- "bpp", G_TYPE_INT, format->depth,
- "endianness", G_TYPE_INT, format->endianness,
- "red_mask", G_TYPE_INT, format->red_mask,
- "green_mask", G_TYPE_INT, format->green_mask,
- "blue_mask", G_TYPE_INT, format->blue_mask, NULL);
+ "depth", G_TYPE_INT, format->bpp,
+ "bpp", G_TYPE_INT, format->depth,
+ "endianness", G_TYPE_INT, format->endianness,
+ "red_mask", G_TYPE_INT, format->red_mask,
+ "green_mask", G_TYPE_INT, format->green_mask,
+ "blue_mask", G_TYPE_INT, format->blue_mask, NULL);
} else {
structure = gst_structure_new ("video/x-raw-yuv",
- "format", GST_TYPE_FOURCC, fourcc, NULL);
+ "format", GST_TYPE_FOURCC, fourcc, NULL);
}
return structure;
@@ -89,8 +89,8 @@ videoflip_find_by_caps (const GstCaps * caps)
c = gst_caps_new_full (videoflip_get_cap (videoflip_formats + i), NULL);
if (c) {
if (gst_caps_is_always_compatible (caps, c)) {
- gst_caps_free (c);
- return videoflip_formats + i;
+ gst_caps_free (c);
+ return videoflip_formats + i;
}
gst_caps_free (c);
}
@@ -184,51 +184,51 @@ gst_videoflip_flip (GstVideoflip * videoflip, unsigned char *dest,
switch (videoflip->method) {
case GST_VIDEOFLIP_METHOD_90R:
for (y = 0; y < dh; y++) {
- for (x = 0; x < dw; x++) {
- dest[y * dw + x] = src[(sh - 1 - x) * sw + y];
- }
+ for (x = 0; x < dw; x++) {
+ dest[y * dw + x] = src[(sh - 1 - x) * sw + y];
+ }
}
break;
case GST_VIDEOFLIP_METHOD_90L:
for (y = 0; y < dh; y++) {
- for (x = 0; x < dw; x++) {
- dest[y * dw + x] = src[x * sw + (sw - 1 - y)];
- }
+ for (x = 0; x < dw; x++) {
+ dest[y * dw + x] = src[x * sw + (sw - 1 - y)];
+ }
}
break;
case GST_VIDEOFLIP_METHOD_180:
for (y = 0; y < dh; y++) {
- for (x = 0; x < dw; x++) {
- dest[y * dw + x] = src[(sh - 1 - y) * sw + (sw - 1 - x)];
- }
+ for (x = 0; x < dw; x++) {
+ dest[y * dw + x] = src[(sh - 1 - y) * sw + (sw - 1 - x)];
+ }
}
break;
case GST_VIDEOFLIP_METHOD_HORIZ:
for (y = 0; y < dh; y++) {
- for (x = 0; x < dw; x++) {
- dest[y * dw + x] = src[y * sw + (sw - 1 - x)];
- }
+ for (x = 0; x < dw; x++) {
+ dest[y * dw + x] = src[y * sw + (sw - 1 - x)];
+ }
}
break;
case GST_VIDEOFLIP_METHOD_VERT:
for (y = 0; y < dh; y++) {
- for (x = 0; x < dw; x++) {
- dest[y * dw + x] = src[(sh - 1 - y) * sw + x];
- }
+ for (x = 0; x < dw; x++) {
+ dest[y * dw + x] = src[(sh - 1 - y) * sw + x];
+ }
}
break;
case GST_VIDEOFLIP_METHOD_TRANS:
for (y = 0; y < dh; y++) {
- for (x = 0; x < dw; x++) {
- dest[y * dw + x] = src[x * sw + y];
- }
+ for (x = 0; x < dw; x++) {
+ dest[y * dw + x] = src[x * sw + y];
+ }
}
break;
case GST_VIDEOFLIP_METHOD_OTHER:
for (y = 0; y < dh; y++) {
- for (x = 0; x < dw; x++) {
- dest[y * dw + x] = src[(sh - 1 - x) * sw + (sw - 1 - y)];
- }
+ for (x = 0; x < dw; x++) {
+ dest[y * dw + x] = src[(sh - 1 - x) * sw + (sw - 1 - y)];
+ }
}
break;
default: