QtGStreamer  0.10.2
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
colorbalance.cpp
00001 /*
00002     Copyright (C) 2010  George Kiagiadakis <kiagiadakis.george@gmail.com>
00003 
00004     This library is free software; you can redistribute it and/or modify
00005     it under the terms of the GNU Lesser General Public License as published
00006     by the Free Software Foundation; either version 2.1 of the License, or
00007     (at your option) any later version.
00008 
00009     This program is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012     GNU Lesser General Public License for more details.
00013 
00014     You should have received a copy of the GNU Lesser General Public License
00015     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00016 */
00017 #include "colorbalance.h"
00018 #include <gst/interfaces/colorbalance.h>
00019 
00020 namespace QGst {
00021 
00022 QString ColorBalanceChannel::label() const
00023 {
00024     return QString::fromUtf8(object<GstColorBalanceChannel>()->label);
00025 }
00026 
00027 int ColorBalanceChannel::minValue() const
00028 {
00029     return object<GstColorBalanceChannel>()->min_value;
00030 }
00031 
00032 int ColorBalanceChannel::maxValue() const
00033 {
00034     return object<GstColorBalanceChannel>()->max_value;
00035 }
00036 
00037 
00038 ColorBalanceType ColorBalance::type() const
00039 {
00040     return static_cast<ColorBalanceType>(gst_color_balance_get_balance_type(object<GstColorBalance>()));
00041 }
00042 
00043 QList<ColorBalanceChannelPtr> ColorBalance::channels() const
00044 {
00045     QList<ColorBalanceChannelPtr> result;
00046     const GList *list = gst_color_balance_list_channels(object<GstColorBalance>());
00047     while(list) {
00048         result.append(ColorBalanceChannelPtr::wrap(GST_COLOR_BALANCE_CHANNEL(list->data)));
00049         list = list->next;
00050     }
00051     return result;
00052 }
00053 
00054 int ColorBalance::value(const ColorBalanceChannelPtr & channel) const
00055 {
00056     return gst_color_balance_get_value(object<GstColorBalance>(), channel);
00057 }
00058 
00059 void ColorBalance::setValue(const ColorBalanceChannelPtr & channel, int value)
00060 {
00061     gst_color_balance_set_value(object<GstColorBalance>(), channel, value);
00062 }
00063 
00064 } //namespace QGst