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., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
21 #ifndef __GST_VIDEO_FILTER_H__
22 #define __GST_VIDEO_FILTER_H__
24 #include <gst/base/gstbasetransform.h>
25 #include <gst/video/video.h>
29 typedef struct _GstVideoFilter GstVideoFilter;
30 typedef struct _GstVideoFilterClass GstVideoFilterClass;
32 #define GST_TYPE_VIDEO_FILTER \
33 (gst_video_filter_get_type())
34 #define GST_VIDEO_FILTER(obj) \
35 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VIDEO_FILTER,GstVideoFilter))
36 #define GST_VIDEO_FILTER_CLASS(klass) \
37 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VIDEO_FILTER,GstVideoFilterClass))
38 #define GST_VIDEO_FILTER_GET_CLASS(obj) \
39 (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_VIDEO_FILTER, GstVideoFilterClass))
40 #define GST_IS_VIDEO_FILTER(obj) \
41 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VIDEO_FILTER))
42 #define GST_IS_VIDEO_FILTER_CLASS(klass) \
43 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VIDEO_FILTER))
44 #define GST_VIDEO_FILTER_CAST(obj) ((GstVideoFilter *)(obj))
46 struct _GstVideoFilter {
47 GstBaseTransform element;
51 GstVideoInfo out_info;
54 gpointer _gst_reserved[GST_PADDING];
58 * GstVideoFilterClass:
59 * @parent_class: the parent class structure
60 * @set_info: function to be called with the negotiated caps and video infos
61 * @transform_frame: transform a video frame
62 * @transform_frame_ip: transform a video frame in place
64 * The video filter class structure.
66 struct _GstVideoFilterClass {
67 GstBaseTransformClass parent_class;
69 gboolean (*set_info) (GstVideoFilter *filter,
70 GstCaps *incaps, GstVideoInfo *in_info,
71 GstCaps *outcaps, GstVideoInfo *out_info);
74 GstFlowReturn (*transform_frame) (GstVideoFilter *filter,
75 GstVideoFrame *inframe, GstVideoFrame *outframe);
76 GstFlowReturn (*transform_frame_ip) (GstVideoFilter *trans, GstVideoFrame *frame);
79 gpointer _gst_reserved[GST_PADDING];
83 GType gst_video_filter_get_type (void);
85 #ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
86 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVideoFilter, gst_object_unref)
91 #endif /* __GST_VIDEO_FILTER_H__ */