2 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
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.
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.
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.
21 #ifndef __GST_VIDEOFILTER_H__
22 #define __GST_VIDEOFILTER_H__
30 typedef struct _GstVideofilter GstVideofilter;
31 typedef struct _GstVideofilterClass GstVideofilterClass;
33 typedef void (*GstVideofilterFilterFunc)(GstVideofilter *filter,
34 void *out_data, void *in_data);
36 typedef void (*GstVideofilterSetupFunc)(GstVideofilter *filter);
38 typedef struct _GstVideofilterFormat GstVideofilterFormat;
39 struct _GstVideofilterFormat {
42 GstVideofilterFilterFunc filter_func;
44 unsigned int endianness;
45 unsigned int red_mask;
46 unsigned int green_mask;
47 unsigned int blue_mask;
50 #define GST_TYPE_VIDEOFILTER \
51 (gst_videofilter_get_type())
52 #define GST_VIDEOFILTER(obj) \
53 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VIDEOFILTER,GstVideofilter))
54 #define GST_VIDEOFILTER_CLASS(klass) \
55 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VIDEOFILTER,GstVideofilterClass))
56 #define GST_IS_VIDEOFILTER(obj) \
57 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VIDEOFILTER))
58 #define GST_IS_VIDEOFILTER_CLASS(obj) \
59 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VIDEOFILTER))
61 struct _GstVideofilter {
64 GstPad *sinkpad,*srcpad;
68 GstVideofilterFormat *format;
84 struct _GstVideofilterClass {
85 GstElementClass parent_class;
88 GstVideofilterSetupFunc setup;
91 GType gst_videofilter_get_type(void);
93 int gst_videofilter_get_input_width(GstVideofilter *videofilter);
94 int gst_videofilter_get_input_height(GstVideofilter *videofilter);
95 void gst_videofilter_set_output_size(GstVideofilter *videofilter,
96 int width, int height);
97 GstVideofilterFormat *gst_videofilter_find_format_by_structure (GstVideofilter *filter,
98 const GstStructure *structure);
99 GstCaps *gst_videofilter_class_get_capslist(GstVideofilterClass *videofilterclass);
101 void gst_videofilter_class_add_format(GstVideofilterClass *videofilterclass,
102 GstVideofilterFormat *format);
103 void gst_videofilter_class_add_pad_templates (GstVideofilterClass *videofilterclass);
107 #endif /* __GST_VIDEOFILTER_H__ */