blob: a998fa7212369d63a81bec66ad5bc1771a52b103 [file] [log] [blame]
David Schleef1bdd2c92003-07-02 06:16:39 +00001/* 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
Thomas Vander Stichele0b05eee2005-11-29 01:30:40 +000020#ifndef __GST_VIDEO_FLIP_H__
21#define __GST_VIDEO_FLIP_H__
David Schleef1bdd2c92003-07-02 06:16:39 +000022
Sebastian Dröge8c4aeb22010-04-18 13:03:48 +020023#include <gst/gst.h>
Sebastian Drögee8ca3902010-04-18 14:29:30 +020024#include <gst/video/video.h>
Thomas Vander Stichele01f2c2f2005-11-29 10:46:00 +000025#include <gst/video/gstvideofilter.h>
David Schleef1bdd2c92003-07-02 06:16:39 +000026
Johan Dahlin5acffea2004-03-15 16:32:54 +000027G_BEGIN_DECLS
28
Wim Taymanse85d1632006-03-03 14:39:55 +000029/**
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 */
Johan Dahlin5acffea2004-03-15 16:32:54 +000042typedef enum {
Thomas Vander Stichele0b05eee2005-11-29 01:30:40 +000043 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;
David Schleefe22a7822003-07-02 06:50:32 +000052
Thomas Vander Stichele0b05eee2005-11-29 01:30:40 +000053#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))
Stefan Kost1def6692006-06-01 21:07:26 +000061#define GST_IS_VIDEO_FLIP_CLASS(klass) \
Thomas Vander Stichele0b05eee2005-11-29 01:30:40 +000062 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VIDEO_FLIP))
David Schleef1bdd2c92003-07-02 06:16:39 +000063
Thomas Vander Stichele0b05eee2005-11-29 01:30:40 +000064typedef struct _GstVideoFlip GstVideoFlip;
65typedef struct _GstVideoFlipClass GstVideoFlipClass;
David Schleef1bdd2c92003-07-02 06:16:39 +000066
Wim Taymanse85d1632006-03-03 14:39:55 +000067/**
68 * GstVideoFlip:
69 *
70 * Opaque datastructure.
71 */
Thomas Vander Stichele0b05eee2005-11-29 01:30:40 +000072struct _GstVideoFlip {
Thomas Vander Stichele4ad25ff2005-11-30 08:26:47 +000073 GstVideoFilter videofilter;
Julien Moutte2ea4f5b2005-11-23 15:50:51 +000074
Sebastian Dröge8c4aeb22010-04-18 13:03:48 +020075 /* < private > */
Sebastian Drögee8ca3902010-04-18 14:29:30 +020076 GstVideoFormat format;
Julien Moutte2ea4f5b2005-11-23 15:50:51 +000077 gint from_width, from_height;
78 gint to_width, to_height;
79
Thomas Vander Stichele0b05eee2005-11-29 01:30:40 +000080 GstVideoFlipMethod method;
Sebastian Drögee8ca3902010-04-18 14:29:30 +020081 void (*process) (GstVideoFlip *videoflip, guint8 *dest, const guint8 *src);
David Schleef1bdd2c92003-07-02 06:16:39 +000082};
83
Thomas Vander Stichele0b05eee2005-11-29 01:30:40 +000084struct _GstVideoFlipClass {
Thomas Vander Stichele4ad25ff2005-11-30 08:26:47 +000085 GstVideoFilterClass parent_class;
David Schleef1bdd2c92003-07-02 06:16:39 +000086};
87
Thomas Vander Stichele4ad25ff2005-11-30 08:26:47 +000088GType gst_video_flip_get_type (void);
David Schleef1bdd2c92003-07-02 06:16:39 +000089
90G_END_DECLS
Johan Dahlin5acffea2004-03-15 16:32:54 +000091
Thomas Vander Stichele0b05eee2005-11-29 01:30:40 +000092#endif /* __GST_VIDEO_FLIP_H__ */