# GstAudioFilter

GstAudioFilter is a GstBaseTransform-derived base class for simple audio filters, ie. those that output the same format that they get as input.

GstAudioFilter will parse the input format for you (with error checking) before calling your setup function. Also, elements deriving from GstAudioFilter may use gst_audio_filter_class_add_pad_templates from their class_init function to easily configure the set of caps/formats that the element is able to handle.

Derived classes should override the GstAudioFilterClass.setup() and GstBaseTransformClass.transform_ip() and/or GstBaseTransformClass.transform() virtual functions in their class_init function.

## GstAudioFilter

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstElement
                    ╰──GstBaseTransform
                        ╰──GstAudioFilter

Base class for audio filters with the same format for input and output.

### Members

`basetransform` (GstBaseTransform) –
No description available
`info` (GstAudioInfo) –
No description available

### Class structure

#### GstAudioFilterClass

In addition to the setup virtual function, you should also override the GstBaseTransform::transform and/or GstBaseTransform::transform_ip virtual function.

##### Fields

`basetransformclass` (GstBaseTransformClass) –

parent class

### GstAudio.AudioFilterClass

In addition to the setup virtual function, you should also override the GstBaseTransform::transform and/or GstBaseTransform::transform_ip virtual function.

##### Attributes

`basetransformclass` (GstBase.BaseTransformClass) –

parent class

### GstAudio.AudioFilterClass

In addition to the setup virtual function, you should also override the GstBaseTransform::transform and/or GstBaseTransform::transform_ip virtual function.

##### Attributes

`basetransformclass` (GstBase.BaseTransformClass) –

parent class

## GstAudioFilter

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstElement
                    ╰──GstBaseTransform
                        ╰──GstAudioFilter

Base class for audio filters with the same format for input and output.

### Members

`basetransform` (GstBaseTransform) –
No description available
`info` (GstAudioInfo) –
No description available

## GstAudioFilter

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstElement
                    ╰──GstBaseTransform
                        ╰──GstAudioFilter

Base class for audio filters with the same format for input and output.

### Members

`basetransform` (GstBaseTransform) –
No description available
`info` (GstAudioInfo) –
No description available

### Class Methods

#### gst_audio_filter_class_add_pad_templates

    gst_audio_filter_class_add_pad_templates (GstAudioFilterClass * klass,
                                              GstCaps * allowed_caps)

Convenience function to add pad templates to this element class, with allowed_caps as the caps that can be handled.

This function is usually used from within a GObject class_init function.

Parameters:

`klass` –

an GstAudioFilterClass

`allowed_caps` –

what formats the filter can handle, as GstCaps

#### GstAudio.AudioFilterClass.prototype.add_pad_templates

    function GstAudio.AudioFilterClass.prototype.add_pad_templates(klass: GstAudio.AudioFilterClass, allowed_caps: Gst.Caps): {
        // javascript wrapper for 'gst_audio_filter_class_add_pad_templates'
    }

Convenience function to add pad templates to this element class, with allowed_caps as the caps that can be handled.

This function is usually used from within a GObject class_init function.

Parameters:

`klass` ( GstAudio.AudioFilterClass ) –

an GstAudio.AudioFilterClass

`allowed_caps` ( Gst.Caps ) –

what formats the filter can handle, as Gst.Caps

### Virtual Methods

#### setup

    gboolean
    setup (GstAudioFilter * filter,
           const GstAudioInfo * info)

virtual function called whenever the format changes

Parameters:

`filter` –
No description available
`info` –
No description available
Returns –
No description available

#### setup

    function setup(filter: GstAudio.AudioFilter, info: GstAudio.AudioInfo): {
        // javascript implementation of the 'setup' virtual method
    }

virtual function called whenever the format changes

Parameters:

`filter` ( GstAudio.AudioFilter ) –
No description available
`info` ( GstAudio.AudioInfo ) –
No description available
Returns ( Number ) –
No description available

#### setup

    def setup (filter, info):
        #python implementation of the 'setup' virtual method

virtual function called whenever the format changes

Parameters:

`filter` ( GstAudio.AudioFilter ) –
No description available
`info` ( GstAudio.AudioInfo ) –
No description available
Returns ( bool ) –
No description available

## Function Macros

### GST_AUDIO_FILTER_BPF

    #define GST_AUDIO_FILTER_BPF(filter)      (GST_AUDIO_INFO_BPF(GST_AUDIO_FILTER_INFO(filter)))

### GST_AUDIO_FILTER_BPS

    #define GST_AUDIO_FILTER_BPS(filter)      (GST_AUDIO_INFO_BPS(GST_AUDIO_FILTER_INFO(filter)))

### GST_AUDIO_FILTER_CAST

    #define GST_AUDIO_FILTER_CAST(obj) \
      ((GstAudioFilter *) (obj))

### GST_AUDIO_FILTER_CHANNELS

    #define GST_AUDIO_FILTER_CHANNELS(filter) (GST_AUDIO_INFO_CHANNELS(GST_AUDIO_FILTER_INFO(filter)))

### GST_AUDIO_FILTER_CLASS_CAST

    #define GST_AUDIO_FILTER_CLASS_CAST(klass) \
      ((GstAudioFilterClass *) (klass))

### GST_AUDIO_FILTER_FORMAT

    #define GST_AUDIO_FILTER_FORMAT(filter)   (GST_AUDIO_INFO_FORMAT(GST_AUDIO_FILTER_INFO(filter)))

### GST_AUDIO_FILTER_INFO

    #define GST_AUDIO_FILTER_INFO(filter)     (&GST_AUDIO_FILTER_CAST(filter)->info)

### GST_AUDIO_FILTER_RATE

    #define GST_AUDIO_FILTER_RATE(filter)     (GST_AUDIO_INFO_RATE(GST_AUDIO_FILTER_INFO(filter)))

## Constants

### GST_TYPE_AUDIO_FILTER

    #define GST_TYPE_AUDIO_FILTER \
      (gst_audio_filter_get_type())

The results of the search are