2 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
3 * Copyright (C) <2007> Wim Taymans <wim.taymans@collabora.co.uk>
4 * Copyright (C) <2007> Edward Hervey <edward.hervey@collabora.co.uk>
5 * Copyright (C) <2007> Jan Schmidt <thaytan@noraisin.net>
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
23 #ifndef __GST_ALPHA_H__
24 #define __GST_ALPHA_H__
27 #include <gst/video/video.h>
28 #include <gst/video/gstvideofilter.h>
32 #define GST_TYPE_ALPHA \
33 (gst_alpha_get_type())
34 #define GST_ALPHA(obj) \
35 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ALPHA,GstAlpha))
36 #define GST_ALPHA_CLASS(klass) \
37 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ALPHA,GstAlphaClass))
38 #define GST_IS_ALPHA(obj) \
39 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ALPHA))
40 #define GST_IS_ALPHA_CLASS(klass) \
41 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ALPHA))
43 typedef struct _GstAlpha GstAlpha;
44 typedef struct _GstAlphaClass GstAlphaClass;
48 * @ALPHA_METHOD_SET: Set/adjust alpha channel
49 * @ALPHA_METHOD_GREEN: Chroma Key green
50 * @ALPHA_METHOD_BLUE: Chroma Key blue
51 * @ALPHA_METHOD_CUSTOM: Chroma Key on target_r/g/b
62 GST_DEBUG_CATEGORY_STATIC (gst_alpha_debug);
63 #define GST_CAT_DEFAULT gst_alpha_debug
67 GstVideoFilter parent;
74 gboolean in_sdtv, out_sdtv;
83 GstAlphaMethod method;
87 guint black_sensitivity;
88 guint white_sensitivity;
90 gboolean prefer_passthrough;
92 /* processing function */
93 void (*process) (const GstVideoFrame *in_frame, GstVideoFrame *out_frame, GstAlpha *alpha);
95 /* precalculated values for chroma keying */
98 guint8 accept_angle_tg;
99 guint8 accept_angle_ctg;
105 struct _GstAlphaClass
107 GstVideoFilterClass parent_class;
110 GType gst_alpha_get_type (void);
114 #endif /* __GST_ALPHA_H__ */