Tizen 2.0 Release
[framework/multimedia/gst-plugins-good0.10.git] / gst / videofilter / gstvideoflip.h
1 /* GStreamer
2  * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 #ifndef __GST_VIDEO_FLIP_H__
21 #define __GST_VIDEO_FLIP_H__
22
23 #include <gst/gst.h>
24 #include <gst/video/video.h>
25 #include <gst/video/gstvideofilter.h>
26
27 G_BEGIN_DECLS
28
29 /**
30  * GstVideoFlipMethod:
31  * @GST_VIDEO_FLIP_METHOD_IDENTITY: Identity (no rotation)
32  * @GST_VIDEO_FLIP_METHOD_90R: Rotate clockwise 90 degrees
33  * @GST_VIDEO_FLIP_METHOD_180: Rotate 180 degrees
34  * @GST_VIDEO_FLIP_METHOD_90L: Rotate counter-clockwise 90 degrees
35  * @GST_VIDEO_FLIP_METHOD_HORIZ: Flip horizontally
36  * @GST_VIDEO_FLIP_METHOD_VERT: Flip vertically
37  * @GST_VIDEO_FLIP_METHOD_TRANS: Flip across upper left/lower right diagonal
38  * @GST_VIDEO_FLIP_METHOD_OTHER: Flip across upper right/lower left diagonal
39  *
40  * The different flip methods.
41  */
42 typedef enum {
43   GST_VIDEO_FLIP_METHOD_IDENTITY,
44   GST_VIDEO_FLIP_METHOD_90R,
45   GST_VIDEO_FLIP_METHOD_180,
46   GST_VIDEO_FLIP_METHOD_90L,
47   GST_VIDEO_FLIP_METHOD_HORIZ,
48   GST_VIDEO_FLIP_METHOD_VERT,
49   GST_VIDEO_FLIP_METHOD_TRANS,
50   GST_VIDEO_FLIP_METHOD_OTHER
51 } GstVideoFlipMethod;
52
53 #define GST_TYPE_VIDEO_FLIP \
54   (gst_video_flip_get_type())
55 #define GST_VIDEO_FLIP(obj) \
56   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VIDEO_FLIP,GstVideoFlip))
57 #define GST_VIDEO_FLIP_CLASS(klass) \
58   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VIDEO_FLIP,GstVideoFlipClass))
59 #define GST_IS_VIDEO_FLIP(obj) \
60   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VIDEO_FLIP))
61 #define GST_IS_VIDEO_FLIP_CLASS(klass) \
62   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VIDEO_FLIP))
63
64 typedef struct _GstVideoFlip GstVideoFlip;
65 typedef struct _GstVideoFlipClass GstVideoFlipClass;
66
67 /**
68  * GstVideoFlip:
69  *
70  * Opaque datastructure.
71  */
72 struct _GstVideoFlip {
73   GstVideoFilter videofilter;
74   
75   /* < private > */
76   GstVideoFormat format;
77   gint from_width, from_height;
78   gint to_width, to_height;
79   
80   GstVideoFlipMethod method;
81   void (*process) (GstVideoFlip *videoflip, guint8 *dest, const guint8 *src);
82 };
83
84 struct _GstVideoFlipClass {
85   GstVideoFilterClass parent_class;
86 };
87
88 GType gst_video_flip_get_type (void);
89
90 G_END_DECLS
91
92 #endif /* __GST_VIDEO_FLIP_H__ */