| 1 | /* GStreamer Color Balance | 
| 2 |  * Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net> | 
| 3 |  * | 
| 4 |  * color-balance.h: image color balance interface design | 
| 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., 51 Franklin St, Fifth Floor, | 
| 19 |  * Boston, MA 02110-1301, USA. | 
| 20 |  */ | 
| 21 |  | 
| 22 | #ifndef __GST_COLOR_BALANCE_H__ | 
| 23 | #define __GST_COLOR_BALANCE_H__ | 
| 24 |  | 
| 25 | #include <gst/gst.h> | 
| 26 | #include <gst/video/colorbalancechannel.h> | 
| 27 |  | 
| 28 | G_BEGIN_DECLS | 
| 29 |  | 
| 30 | #define GST_TYPE_COLOR_BALANCE \ | 
| 31 |   (gst_color_balance_get_type ()) | 
| 32 | #define GST_COLOR_BALANCE(obj) \ | 
| 33 |   (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_COLOR_BALANCE, GstColorBalance)) | 
| 34 | #define GST_IS_COLOR_BALANCE(obj) \ | 
| 35 |   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_COLOR_BALANCE)) | 
| 36 | #define GST_COLOR_BALANCE_GET_INTERFACE(inst) \ | 
| 37 |   (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_COLOR_BALANCE, GstColorBalanceInterface)) | 
| 38 |  | 
| 39 | typedef struct _GstColorBalance GstColorBalance; | 
| 40 | typedef struct _GstColorBalanceInterface GstColorBalanceInterface; | 
| 41 |  | 
| 42 | /** | 
| 43 |  * GstColorBalanceType: | 
| 44 |  * @GST_COLOR_BALANCE_HARDWARE: Color balance is implemented with dedicated | 
| 45 |  *         hardware. | 
| 46 |  * @GST_COLOR_BALANCE_SOFTWARE: Color balance is implemented via software | 
| 47 |  *         processing. | 
| 48 |  * | 
| 49 |  * An enumeration indicating whether an element implements color balancing | 
| 50 |  * operations in software or in dedicated hardware. In general, dedicated | 
| 51 |  * hardware implementations (such as those provided by xvimagesink) are | 
| 52 |  * preferred. | 
| 53 |  */ | 
| 54 | typedef enum | 
| 55 | { | 
| 56 |   GST_COLOR_BALANCE_HARDWARE, | 
| 57 |   GST_COLOR_BALANCE_SOFTWARE | 
| 58 | } GstColorBalanceType; | 
| 59 |  | 
| 60 | /** | 
| 61 |  * GstColorBalanceInterface: | 
| 62 |  * @iface: the parent interface | 
| 63 |  * @get_balance_type: implementation type | 
| 64 |  * @list_channels: list handled channels | 
| 65 |  * @set_value: set a channel value | 
| 66 |  * @get_value: get a channel value | 
| 67 |  * @value_changed: default handler for value changed notification | 
| 68 |  * | 
| 69 |  * Color-balance interface. | 
| 70 |  */ | 
| 71 | struct _GstColorBalanceInterface { | 
| 72 |   GTypeInterface iface; | 
| 73 |  | 
| 74 |   /* virtual functions */ | 
| 75 |   const GList * (* list_channels) (GstColorBalance        *balance); | 
| 76 |  | 
| 77 |   void          (* set_value)     (GstColorBalance        *balance, | 
| 78 |                                    GstColorBalanceChannel *channel, | 
| 79 |                                    gint                    value); | 
| 80 |   gint          (* get_value)     (GstColorBalance        *balance, | 
| 81 |                                    GstColorBalanceChannel *channel); | 
| 82 |   GstColorBalanceType (*get_balance_type)  (GstColorBalance *balance); | 
| 83 |  | 
| 84 |   /* signals */ | 
| 85 |   void (* value_changed) (GstColorBalance        *balance, | 
| 86 |                           GstColorBalanceChannel *channel, | 
| 87 |                           gint                    value); | 
| 88 |  | 
| 89 |   /*< private >*/ | 
| 90 |   gpointer _gst_reserved[GST_PADDING]; | 
| 91 | }; | 
| 92 |  | 
| 93 | GST_VIDEO_API | 
| 94 | GType   gst_color_balance_get_type      (void); | 
| 95 |  | 
| 96 | /* virtual class function wrappers */ | 
| 97 |  | 
| 98 | GST_VIDEO_API | 
| 99 | const GList * | 
| 100 |         gst_color_balance_list_channels (GstColorBalance        *balance); | 
| 101 |  | 
| 102 | GST_VIDEO_API | 
| 103 | void    gst_color_balance_set_value     (GstColorBalance        *balance, | 
| 104 |                                          GstColorBalanceChannel *channel, | 
| 105 |                                          gint                    value); | 
| 106 |  | 
| 107 | GST_VIDEO_API | 
| 108 | gint    gst_color_balance_get_value     (GstColorBalance        *balance, | 
| 109 |                                          GstColorBalanceChannel *channel); | 
| 110 |  | 
| 111 | GST_VIDEO_API | 
| 112 | GstColorBalanceType | 
| 113 |         gst_color_balance_get_balance_type (GstColorBalance        *balance); | 
| 114 |  | 
| 115 | /* trigger signal */ | 
| 116 |  | 
| 117 | GST_VIDEO_API | 
| 118 | void    gst_color_balance_value_changed (GstColorBalance        *balance, | 
| 119 |                                          GstColorBalanceChannel *channel, | 
| 120 |                                          gint                    value); | 
| 121 |  | 
| 122 | G_END_DECLS | 
| 123 |  | 
| 124 | #endif /* __GST_COLOR_BALANCE_H__ */ | 
| 125 |  |