Tizen 2.0 Release
[framework/multimedia/gst-plugins-good0.10.git] / ext / gdk_pixbuf / pixbufscale.h
1 /* GStreamer
2  * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
3  * Copyright (C) <2004> Jan Schmidt <thaytan@mad.scientist.com>
4  * Copyright (C) <2004> Tim-Philipp Mueller <t.i.m@orange.net>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21
22
23 #ifndef __GST_PIXBUFSCALE_H__
24 #define __GST_PIXBUFSCALE_H__
25
26 #include <gst/gst.h>
27 #include <gst/base/gstbasetransform.h>
28 #include <gdk-pixbuf/gdk-pixbuf.h>
29
30 G_BEGIN_DECLS
31
32 #define GST_TYPE_PIXBUFSCALE                    \
33   (gst_pixbufscale_get_type())
34 #define GST_PIXBUFSCALE(obj)                                            \
35   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PIXBUFSCALE,GstPixbufScale))
36 #define GST_PIXBUFSCALE_CLASS(klass)                                    \
37   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PIXBUFSCALE,GstPixbufScaleClass))
38 #define GST_IS_PIXBUFSCALE(obj)                                 \
39   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PIXBUFSCALE))
40 #define GST_IS_PIXBUFSCALE_CLASS(klass)                         \
41   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PIXBUFSCALE))
42
43 typedef enum {
44   GST_PIXBUFSCALE_NEAREST,
45   GST_PIXBUFSCALE_TILES,
46   GST_PIXBUFSCALE_BILINEAR,
47   GST_PIXBUFSCALE_HYPER
48 } GstPixbufScaleMethod;
49
50
51 typedef struct _GstPixbufScale GstPixbufScale;
52 typedef struct _GstPixbufScaleClass GstPixbufScaleClass;
53
54 struct _GstPixbufScale {
55   GstBaseTransform element;
56
57   /* video state */
58   gint to_width;
59   gint to_height;
60   gint from_width;
61   gint from_height;
62   gboolean passthru;
63
64   GstPixbufScaleMethod method;
65   GdkInterpType gdk_method;
66   
67   /* private */
68   gint from_buf_size;
69   gint from_stride;
70   gint to_buf_size;
71   gint to_stride;  
72 };
73
74 struct _GstPixbufScaleClass {
75   GstBaseTransformClass parent_class;
76 };
77
78 GType gst_pixbufscale_get_type(void);
79
80 gboolean pixbufscale_init (GstPlugin * plugin);
81
82 G_END_DECLS
83
84 #endif /* __GST_PIXBUFSCALE_H__ */