4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Jeongmo Yang <jm80.yang@samsung.com>
8 * This library is free software; you can redistribute it and/or modify it under
9 * the terms of the GNU Lesser General Public License as published by the
10 * Free Software Foundation; either version 2.1 of the License, or (at your option)
13 * This library is distributed in the hope that it will be useful, but WITHOUT ANY
14 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
16 * License for more details.
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this library; if not, write to the Free Software Foundation, Inc., 51
20 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 #ifndef __GST_CAMERASRC_COLOR_BALANCE_H__
25 #define __GST_CAMERASRC_COLOR_BALANCE_H__
28 #include <gst/interfaces/colorbalance.h>
29 #include "gstcamerasrc.h"
33 #define GST_TYPE_CAMERASRC_COLOR_BALANCE_CHANNEL (gst_camerasrc_color_balance_channel_get_type ())
34 #define GST_CAMERASRC_COLOR_BALANCE_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_CAMERASRC_COLOR_BALANCE_CHANNEL, GstCameraSrcColorBalanceChannel))
35 #define GST_CAMERASRC_COLOR_BALANCE_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_CAMERASRC_COLOR_BALANCE_CHANNEL, GstCameraSrcColorBalanceChannelClass))
36 #define GST_IS_CAMERASRC_COLOR_BALANCE_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_CAMERASRC_COLOR_BALANCE_CHANNEL))
37 #define GST_IS_CAMERASRC_COLOR_BALANCE_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_CAMERASRC_COLOR_BALANCE_CHANNEL))
39 typedef struct _GstCameraSrcColorBalanceChannel {
40 GstColorBalanceChannel parent;
43 } GstCameraSrcColorBalanceChannel;
45 typedef struct _GstCameraSrcColorBalanceChannelClass {
46 GstColorBalanceChannelClass parent;
47 } GstCameraSrcColorBalanceChannelClass;
49 GType gst_camerasrc_color_balance_channel_get_type( void );
51 const GList *gst_camerasrc_color_balance_list_channels( GstCameraSrc* camerasrc );
52 void gst_camerasrc_color_balance_set_value( GstCameraSrc* camerasrc, GstColorBalanceChannel* color_channel, gint value );
53 gint gst_camerasrc_color_balance_get_value( GstCameraSrc* camerasrc, GstColorBalanceChannel* color_channel );
55 #define GST_IMPLEMENT_CAMERASRC_COLOR_BALANCE_METHODS( Type, interface_as_function ) \
58 interface_as_function ## _color_balance_list_channels( GstColorBalance* balance ) \
60 Type *this = (Type*) balance; \
61 return gst_camerasrc_color_balance_list_channels( this ); \
65 interface_as_function ## _color_balance_set_value( GstColorBalance* balance, \
66 GstColorBalanceChannel* color_channel, \
69 Type *this = (Type*) balance; \
70 return gst_camerasrc_color_balance_set_value( this, color_channel, value ); \
74 interface_as_function ## _color_balance_get_value( GstColorBalance* balance, \
75 GstColorBalanceChannel* color_channel )\
77 Type *this = (Type*) balance; \
78 return gst_camerasrc_color_balance_get_value( this, color_channel ); \
82 interface_as_function ## _color_balance_interface_init( GstColorBalanceClass* klass ) \
84 GST_COLOR_BALANCE_TYPE( klass ) = GST_COLOR_BALANCE_HARDWARE; \
86 /* default virtual functions */ \
87 klass->list_channels = interface_as_function ## _color_balance_list_channels; \
88 klass->set_value = interface_as_function ## _color_balance_set_value; \
89 klass->get_value = interface_as_function ## _color_balance_get_value; \
92 #endif /* __GST_CAMERASRC_COLOR_BALANCE_H__ */