Initialize Tizen 2.3
[framework/multimedia/gst-plugins-base0.10.git] / mobile / gst / videoscale / gstvideoscale.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_SCALE_H__
21 #define __GST_VIDEO_SCALE_H__
22
23 #include <gst/gst.h>
24 #include <gst/video/video.h>
25 #include <gst/video/gstvideofilter.h>
26
27 #include "vs_image.h"
28
29 G_BEGIN_DECLS
30
31 GST_DEBUG_CATEGORY_EXTERN (video_scale_debug);
32 #define GST_CAT_DEFAULT video_scale_debug
33
34 #define GST_TYPE_VIDEO_SCALE \
35   (gst_video_scale_get_type())
36 #define GST_VIDEO_SCALE(obj) \
37   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VIDEO_SCALE,GstVideoScale))
38 #define GST_VIDEO_SCALE_CLASS(klass) \
39   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VIDEO_SCALE,GstVideoScaleClass))
40 #define GST_IS_VIDEO_SCALE(obj) \
41   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VIDEO_SCALE))
42 #define GST_IS_VIDEO_SCALE_CLASS(klass) \
43   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VIDEO_SCALE))
44
45 /**
46  * GstVideoScaleMethod:
47  * @GST_VIDEO_SCALE_NEAREST: use nearest neighbour scaling (fast and ugly)
48  * @GST_VIDEO_SCALE_BILINEAR: use bilinear scaling (slower but prettier).
49  * @GST_VIDEO_SCALE_4TAP: use a 4-tap filter for scaling (slow).
50  * @GST_VIDEO_SCALE_LANCZOS: use a multitap Lanczos filter for scaling (slow).
51  *
52  * The videoscale method to use.
53  */
54 typedef enum {
55   GST_VIDEO_SCALE_NEAREST,
56   GST_VIDEO_SCALE_BILINEAR,
57   GST_VIDEO_SCALE_4TAP,
58   GST_VIDEO_SCALE_LANCZOS
59 } GstVideoScaleMethod;
60
61 typedef struct _GstVideoScale GstVideoScale;
62 typedef struct _GstVideoScaleClass GstVideoScaleClass;
63
64 /**
65  * GstVideoScale:
66  *
67  * Opaque data structure
68  */
69 struct _GstVideoScale {
70   GstVideoFilter element;
71
72   /* properties */
73   GstVideoScaleMethod method;
74   gboolean add_borders;
75   double sharpness;
76   double sharpen;
77   gboolean dither;
78   int submethod;
79   double envelope;
80
81   /* negotiated stuff */
82   GstVideoFormat format;
83   gint to_width;
84   gint to_height;
85   gint from_width;
86   gint from_height;
87   guint src_size;
88   guint dest_size;
89
90   gint borders_h;
91   gint borders_w;
92
93   /*< private >*/
94   guint8 *tmp_buf;
95 };
96
97 struct _GstVideoScaleClass {
98   GstVideoFilterClass parent_class;
99 };
100
101 GType gst_video_scale_get_type(void);
102
103 G_END_DECLS
104
105 #endif /* __GST_VIDEO_SCALE_H__ */