GstAudioFilter

## GstAudioFilter GstAudioFilter — Base class for simple audio filters |

## Functions

void | gst_audio_filter_class_add_pad_templates ()

## Types and Values

struct | GstAudioFilter
struct | GstAudioFilterClass

## Object Hierarchy

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

## Includes

    #include <gst/audio/gstaudiofilter.h>

## Description

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.

## Functions

### gst_audio_filter_class_add_pad_templates ()

    void
    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 |

## Types and Values

### struct GstAudioFilter

    struct GstAudioFilter;

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

### struct GstAudioFilterClass

    struct GstAudioFilterClass {
      GstBaseTransformClass basetransformclass;

      /* virtual function, called whenever the format changes */
      gboolean  (*setup) (GstAudioFilter * filter, const GstAudioInfo * info);
    };

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

#### Members

GstBaseTransformClass `basetransformclass`; | parent class |
`setup` () | virtual function called whenever the format changes |