gstcolorbalance: GStreamer Base Plugins 1.0 Library Reference Manual

## gstcolorbalance gstcolorbalance — Interface for adjusting color balance settings |

## Functions

const GList * | gst_color_balance_list_channels ()
gint | gst_color_balance_get_value ()
void | gst_color_balance_set_value ()
void | gst_color_balance_value_changed ()
GstColorBalanceType | gst_color_balance_get_balance_type ()

## Signals

void | value-changed | Run Last

## Types and Values

| GstColorBalance
struct | GstColorBalanceInterface
enum | GstColorBalanceType

## Object Hierarchy

        GInterface
        ╰── GstColorBalance

## Includes

    #include <gst/video/colorbalance.h>

## Description

This interface is implemented by elements which can perform some color balance operation on video frames they process. For example, modifying the brightness, contrast, hue or saturation.

Example elements are 'xvimagesink' and 'colorbalance'

## Functions

### gst_color_balance_list_channels ()

    const GList *
    gst_color_balance_list_channels (GstColorBalance *balance);

Retrieve a list of the available channels.

#### Parameters

balance | A GstColorBalance instance |

#### Returns

A GList containing pointers to GstColorBalanceChannel objects. The list is owned by the GstColorBalance instance and must not be freed.

[element-type GstColorBalanceChannel][transfer none]

### gst_color_balance_get_value ()

    gint
    gst_color_balance_get_value (GstColorBalance *balance,
                                 GstColorBalanceChannel *channel);

Retrieve the current value of the indicated channel, between min_value and max_value.

See Also: The GstColorBalanceChannel.min_value and GstColorBalanceChannel.max_value members of the GstColorBalanceChannel object.

#### Parameters

balance | A GstColorBalance instance |
channel | A GstColorBalanceChannel instance |

#### Returns

The current value of the channel.

### gst_color_balance_set_value ()

    void
    gst_color_balance_set_value (GstColorBalance *balance,
                                 GstColorBalanceChannel *channel,
                                 gint value);

Sets the current value of the channel to the passed value, which must be between min_value and max_value.

See Also: The GstColorBalanceChannel.min_value and GstColorBalanceChannel.max_value members of the GstColorBalanceChannel object.

#### Parameters

balance | A GstColorBalance instance |
channel | A GstColorBalanceChannel instance |
value | The new value for the channel. |

### gst_color_balance_value_changed ()

    void
    gst_color_balance_value_changed (GstColorBalance *balance,
                                     GstColorBalanceChannel *channel,
                                     gint value);

A helper function called by implementations of the GstColorBalance interface. It fires the “value-changed” signal on the instance, and the “value-changed” signal on the channel object.

#### Parameters

balance | A GstColorBalance instance |
channel | A GstColorBalanceChannel whose value has changed |
value | The new value of the channel |

### gst_color_balance_get_balance_type ()

    GstColorBalanceType
    gst_color_balance_get_balance_type (GstColorBalance *balance);

Get the GstColorBalanceType of this implementation.

#### Parameters

balance | The GstColorBalance implementation |

#### Returns

A the GstColorBalanceType.

## Types and Values

### GstColorBalance

    typedef struct _GstColorBalance GstColorBalance;

### struct GstColorBalanceInterface

    struct GstColorBalanceInterface {
      GTypeInterface iface;

      /* virtual functions */
      const GList * (* list_channels) (GstColorBalance        *balance);

      void          (* set_value)     (GstColorBalance        *balance,
                                       GstColorBalanceChannel *channel,
                                       gint                    value);
      gint          (* get_value)     (GstColorBalance        *balance,
                                       GstColorBalanceChannel *channel);
      GstColorBalanceType (*get_balance_type)  (GstColorBalance *balance);

      /* signals */
      void (* value_changed) (GstColorBalance        *balance,
                              GstColorBalanceChannel *channel,
                              gint                    value);
    };

Color-balance interface.

#### Members

GTypeInterface `iface`; | the parent interface |
`list_channels` () | list handled channels |
`set_value` () | set a channel value |
`get_value` () | get a channel value |
`get_balance_type` () | implementation type |
`value_changed` () | default handler for value changed notification |

### enum GstColorBalanceType

An enumeration indicating whether an element implements color balancing operations in software or in dedicated hardware. In general, dedicated hardware implementations (such as those provided by xvimagesink) are preferred.

#### Members

GST_COLOR_BALANCE_HARDWARE | Color balance is implemented with dedicated hardware. |
GST_COLOR_BALANCE_SOFTWARE | Color balance is implemented via software processing. |

## Signal Details

### The `“value-changed”` signal

    void
    user_function (GstColorBalance        *colorbalance,
                   GstColorBalanceChannel *channel,
                   gint                    value,
                   gpointer                user_data)

Fired when the value of the indicated channel has changed.

#### Parameters

colorbalance | The GstColorBalance instance |
channel | The GstColorBalanceChannel |
value | The new value |
user_data | user data set when the signal handler was connected. |

Flags: Run Last