# GstColorBalance

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'

## GstColorBalance

## GstVideo.ColorBalance

### Methods

#### 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.

#### GstVideo.ColorBalance.prototype.get_balance_type

    function GstVideo.ColorBalance.prototype.get_balance_type(): {
        // javascript wrapper for 'gst_color_balance_get_balance_type'
    }

Get the GstVideo.ColorBalanceType of this implementation.

Parameters:

`balance` (GstVideo.ColorBalance) –

The GstVideo.ColorBalance implementation

Returns (GstVideo.ColorBalanceType) –

A the GstVideo.ColorBalanceType.

#### GstVideo.ColorBalance.get_balance_type

    def GstVideo.ColorBalance.get_balance_type (self):
        #python wrapper for 'gst_color_balance_get_balance_type'

Get the GstVideo.ColorBalanceType of this implementation.

Parameters:

`balance` (GstVideo.ColorBalance) –

The GstVideo.ColorBalance implementation

Returns (GstVideo.ColorBalanceType) –

A the GstVideo.ColorBalanceType.

#### 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 min_value and max_value members of the GstColorBalanceChannel object.

Parameters:

`balance` –

A GstColorBalance instance

`channel` –

A GstColorBalanceChannel instance

Returns –

The current value of the channel.

#### GstVideo.ColorBalance.prototype.get_value

    function GstVideo.ColorBalance.prototype.get_value(channel: GstVideo.ColorBalanceChannel): {
        // javascript wrapper for 'gst_color_balance_get_value'
    }

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

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

Parameters:

`balance` (GstVideo.ColorBalance) –

A GstVideo.ColorBalance instance

`channel` (GstVideo.ColorBalanceChannel) –

A GstVideo.ColorBalanceChannel instance

Returns (Number) –

The current value of the channel.

#### GstVideo.ColorBalance.get_value

    def GstVideo.ColorBalance.get_value (self, channel):
        #python wrapper for 'gst_color_balance_get_value'

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

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

Parameters:

`balance` (GstVideo.ColorBalance) –

A GstVideo.ColorBalance instance

`channel` (GstVideo.ColorBalanceChannel) –

A GstVideo.ColorBalanceChannel instance

Returns (int) –

The current value of the channel.

#### 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 ( [element-type GstColorBalanceChannel][transfer: none]) –

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

#### GstVideo.ColorBalance.prototype.list_channels

    function GstVideo.ColorBalance.prototype.list_channels(): {
        // javascript wrapper for 'gst_color_balance_list_channels'
    }

Retrieve a list of the available channels.

Parameters:

`balance` (GstVideo.ColorBalance) –

A GstVideo.ColorBalance instance

Returns ([ GstVideo.ColorBalanceChannel ]) –

A GList containing pointers to GstVideo.ColorBalanceChannel objects. The list is owned by the GstVideo.ColorBalance instance and must not be freed.

#### GstVideo.ColorBalance.list_channels

    def GstVideo.ColorBalance.list_channels (self):
        #python wrapper for 'gst_color_balance_list_channels'

Retrieve a list of the available channels.

Parameters:

`balance` (GstVideo.ColorBalance) –

A GstVideo.ColorBalance instance

Returns ([ GstVideo.ColorBalanceChannel ]) –

A GList containing pointers to GstVideo.ColorBalanceChannel objects. The list is owned by the GstVideo.ColorBalance instance and must not be freed.

#### gst_color_balance_set_value

    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 min_value and max_value members of the GstColorBalanceChannel object.

Parameters:

`balance` –

A GstColorBalance instance

`channel` –

A GstColorBalanceChannel instance

`value` –

The new value for the channel.

#### GstVideo.ColorBalance.prototype.set_value

    function GstVideo.ColorBalance.prototype.set_value(channel: GstVideo.ColorBalanceChannel, value: Number): {
        // javascript wrapper for 'gst_color_balance_set_value'
    }

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

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

Parameters:

`balance` (GstVideo.ColorBalance) –

A GstVideo.ColorBalance instance

`channel` (GstVideo.ColorBalanceChannel) –

A GstVideo.ColorBalanceChannel instance

`value` (Number) –

The new value for the channel.

#### GstVideo.ColorBalance.set_value

    def GstVideo.ColorBalance.set_value (self, channel, value):
        #python wrapper for 'gst_color_balance_set_value'

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

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

Parameters:

`balance` (GstVideo.ColorBalance) –

A GstVideo.ColorBalance instance

`channel` (GstVideo.ColorBalanceChannel) –

A GstVideo.ColorBalanceChannel instance

`value` (int) –

The new value for the channel.

#### gst_color_balance_value_changed

    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

#### GstVideo.ColorBalance.prototype.value_changed

    function GstVideo.ColorBalance.prototype.value_changed(channel: GstVideo.ColorBalanceChannel, value: Number): {
        // javascript wrapper for 'gst_color_balance_value_changed'
    }

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` (GstVideo.ColorBalance) –

A GstVideo.ColorBalance instance

`channel` (GstVideo.ColorBalanceChannel) –

A GstVideo.ColorBalanceChannel whose value has changed

`value` (Number) –

The new value of the channel

#### GstVideo.ColorBalance.value_changed

    def GstVideo.ColorBalance.value_changed (self, channel, value):
        #python wrapper for 'gst_color_balance_value_changed'

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` (GstVideo.ColorBalance) –

A GstVideo.ColorBalance instance

`channel` (GstVideo.ColorBalanceChannel) –

A GstVideo.ColorBalanceChannel whose value has changed

`value` (int) –

The new value of the channel

### Signals

#### value-changed

    value_changed_callback (GstColorBalance * self,
                            GstColorBalanceChannel * channel,
                            gint value,
                            gpointer user_data)

Fired when the value of the indicated channel has changed.

Parameters:

`self` –
No description available
`channel` –

The GstColorBalanceChannel

`value` –

The new value

`user_data` –
No description available

Flags: Run Last

#### value-changed

    function value_changed_callback(self: GstVideo.ColorBalance, channel: GstVideo.ColorBalanceChannel, value: Number, user_data: Object): {
        // javascript callback for the 'value-changed' signal
    }

Fired when the value of the indicated channel has changed.

Parameters:

`self` (GstVideo.ColorBalance) –
No description available
`channel` (GstVideo.ColorBalanceChannel) –

The GstVideo.ColorBalanceChannel

`value` (Number) –

The new value

`user_data` (Object) –
No description available

Flags: Run Last

#### value-changed

    def value_changed_callback (self, channel, value, *user_data):
        #python callback for the 'value-changed' signal

Fired when the value of the indicated channel has changed.

Parameters:

`self` (GstVideo.ColorBalance) –
No description available
`channel` (GstVideo.ColorBalanceChannel) –

The GstVideo.ColorBalanceChannel

`value` (int) –

The new value

`user_data` (variadic) –
No description available

Flags: Run Last

### Virtual Methods

#### get_balance_type

    GstColorBalanceType
    get_balance_type (GstColorBalance * balance)

implementation type

Parameters:

`balance` –
No description available
Returns –
No description available

#### vfunc_get_balance_type

    function vfunc_get_balance_type(balance: GstVideo.ColorBalance): {
        // javascript implementation of the 'get_balance_type' virtual method
    }

implementation type

Parameters:

`balance` (GstVideo.ColorBalance) –
No description available
Returns (GstVideo.ColorBalanceType) –
No description available

#### do_get_balance_type

    def do_get_balance_type (balance):
        #python implementation of the 'get_balance_type' virtual method

implementation type

Parameters:

`balance` (GstVideo.ColorBalance) –
No description available
Returns (GstVideo.ColorBalanceType) –
No description available

#### get_value

    gint
    get_value (GstColorBalance * balance,
               GstColorBalanceChannel * channel)

get a channel value

Parameters:

`balance` –
No description available
`channel` –
No description available
Returns –
No description available

#### vfunc_get_value

    function vfunc_get_value(balance: GstVideo.ColorBalance, channel: GstVideo.ColorBalanceChannel): {
        // javascript implementation of the 'get_value' virtual method
    }

get a channel value

Parameters:

`balance` (GstVideo.ColorBalance) –
No description available
`channel` (GstVideo.ColorBalanceChannel) –
No description available
Returns (Number) –
No description available

#### do_get_value

    def do_get_value (balance, channel):
        #python implementation of the 'get_value' virtual method

get a channel value

Parameters:

`balance` (GstVideo.ColorBalance) –
No description available
`channel` (GstVideo.ColorBalanceChannel) –
No description available
Returns (int) –
No description available

#### list_channels

    const GList *
    list_channels (GstColorBalance * balance)

list handled channels

Parameters:

`balance` –
No description available
Returns –
No description available

#### vfunc_list_channels

    function vfunc_list_channels(balance: GstVideo.ColorBalance): {
        // javascript implementation of the 'list_channels' virtual method
    }

list handled channels

Parameters:

`balance` (GstVideo.ColorBalance) –
No description available
Returns ([ GstVideo.ColorBalanceChannel ]) –
No description available

#### do_list_channels

    def do_list_channels (balance):
        #python implementation of the 'list_channels' virtual method

list handled channels

Parameters:

`balance` (GstVideo.ColorBalance) –
No description available
Returns ([ GstVideo.ColorBalanceChannel ]) –
No description available

#### set_value

    set_value (GstColorBalance * balance,
               GstColorBalanceChannel * channel,
               gint value)

set a channel value

Parameters:

`balance` –
No description available
`channel` –
No description available
`value` –
No description available

#### vfunc_set_value

    function vfunc_set_value(balance: GstVideo.ColorBalance, channel: GstVideo.ColorBalanceChannel, value: Number): {
        // javascript implementation of the 'set_value' virtual method
    }

set a channel value

Parameters:

`balance` (GstVideo.ColorBalance) –
No description available
`channel` (GstVideo.ColorBalanceChannel) –
No description available
`value` (Number) –
No description available

#### do_set_value

    def do_set_value (balance, channel, value):
        #python implementation of the 'set_value' virtual method

set a channel value

Parameters:

`balance` (GstVideo.ColorBalance) –
No description available
`channel` (GstVideo.ColorBalanceChannel) –
No description available
`value` (int) –
No description available

#### value_changed

    value_changed (GstColorBalance * balance,
                   GstColorBalanceChannel * channel,
                   gint value)

default handler for value changed notification

Parameters:

`balance` –
No description available
`channel` –
No description available
`value` –
No description available

#### vfunc_value_changed

    function vfunc_value_changed(balance: GstVideo.ColorBalance, channel: GstVideo.ColorBalanceChannel, value: Number): {
        // javascript implementation of the 'value_changed' virtual method
    }

default handler for value changed notification

Parameters:

`balance` (GstVideo.ColorBalance) –
No description available
`channel` (GstVideo.ColorBalanceChannel) –
No description available
`value` (Number) –
No description available

#### do_value_changed

    def do_value_changed (balance, channel, value):
        #python implementation of the 'value_changed' virtual method

default handler for value changed notification

Parameters:

`balance` (GstVideo.ColorBalance) –
No description available
`channel` (GstVideo.ColorBalanceChannel) –
No description available
`value` (int) –
No description available

## Function Macros

### GST_COLOR_BALANCE_GET_INTERFACE

    #define GST_COLOR_BALANCE_GET_INTERFACE(inst) \
      (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_COLOR_BALANCE, GstColorBalanceInterface))

## Enumerations

### 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` (0) –

Color balance is implemented with dedicated hardware.

`GST_COLOR_BALANCE_SOFTWARE` (1) –

Color balance is implemented via software processing.

### GstVideo.ColorBalanceType

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

`GstVideo.ColorBalanceType.HARDWARE` (0) –

Color balance is implemented with dedicated hardware.

`GstVideo.ColorBalanceType.SOFTWARE` (1) –

Color balance is implemented via software processing.

### GstVideo.ColorBalanceType

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

`GstVideo.ColorBalanceType.HARDWARE` (0) –

Color balance is implemented with dedicated hardware.

`GstVideo.ColorBalanceType.SOFTWARE` (1) –

Color balance is implemented via software processing.

## Constants

### GST_TYPE_COLOR_BALANCE

    #define GST_TYPE_COLOR_BALANCE \
      (gst_color_balance_get_type ())

The results of the search are