Added gst-plugins-base-subtitles0.10-0.10.34 for Meego Harmattan 1.2
[mafwsubrenderer] / gst-plugins-base-subtitles0.10 / 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  *
51  * The videoscale method to use.
52  */
53 typedef enum {
54   GST_VIDEO_SCALE_NEAREST,
55   GST_VIDEO_SCALE_BILINEAR,
56   GST_VIDEO_SCALE_4TAP
57 } GstVideoScaleMethod;
58
59 typedef struct _GstVideoScale GstVideoScale;
60 typedef struct _GstVideoScaleClass GstVideoScaleClass;
61
62 /**
63  * GstVideoScale:
64  *
65  * Opaque data structure
66  */
67 struct _GstVideoScale {
68   GstVideoFilter element;
69
70   GstVideoScaleMethod method;
71   gboolean add_borders;
72
73   /* negotiated stuff */
74   GstVideoFormat format;
75   gint to_width;
76   gint to_height;
77   gint from_width;
78   gint from_height;
79   guint src_size;
80   guint dest_size;
81
82   gint borders_h;
83   gint borders_w;
84
85   /*< private >*/
86   guint8 *tmp_buf;
87 };
88
89 struct _GstVideoScaleClass {
90   GstVideoFilterClass parent_class;
91 };
92
93 GType gst_video_scale_get_type(void);
94
95 G_END_DECLS
96
97 #endif /* __GST_VIDEO_SCALE_H__ */