gst-plugins-good  1.20.3
About: GStreamer (Good Plugins) is a library for constructing of graphs of media-handling components. A set of good-quality plug-ins (under LGPL license).
  Fossies Dox: gst-plugins-good-1.20.3.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

audioiirfilter.c File Reference
#include <string.h>
#include <math.h>
#include <gst/gst.h>
#include <gst/audio/gstaudiofilter.h>
#include "audioiirfilter.h"
#include "gst/glib-compat-private.h"
Include dependency graph for audioiirfilter.c:

Go to the source code of this file.

Macros

#define GLIB_DISABLE_DEPRECATION_WARNINGS
 
#define GST_CAT_DEFAULT   gst_audio_iir_filter_debug
 
#define gst_audio_iir_filter_parent_class   parent_class
 

Enumerations

enum  { SIGNAL_RATE_CHANGED , LAST_SIGNAL }
 
enum  { PROP_0 , PROP_A , PROP_B }
 

Functions

 GST_DEBUG_CATEGORY_STATIC (gst_audio_iir_filter_debug)
 
 G_DEFINE_TYPE (GstAudioIIRFilter, gst_audio_iir_filter,(gst_audio_fx_base_iir_filter_get_type()))
 
 GST_ELEMENT_REGISTER_DEFINE (audioiirfilter, "audioiirfilter", GST_RANK_NONE,(gst_audio_iir_filter_get_type()))
 
static void gst_audio_iir_filter_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
 
static void gst_audio_iir_filter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
 
static void gst_audio_iir_filter_finalize (GObject *object)
 
static gboolean gst_audio_iir_filter_setup (GstAudioFilter *base, const GstAudioInfo *info)
 
static void gst_audio_iir_filter_class_init (GstAudioIIRFilterClass *klass)
 
static void gst_audio_iir_filter_update_coefficients (GstAudioIIRFilter *self, GValueArray *va, GValueArray *vb)
 
static void gst_audio_iir_filter_init (GstAudioIIRFilter *self)
 

Variables

static guint gst_audio_iir_filter_signals [LAST_SIGNAL] = { 0, }
 

Macro Definition Documentation

◆ GLIB_DISABLE_DEPRECATION_WARNINGS

#define GLIB_DISABLE_DEPRECATION_WARNINGS

SECTION:element-audioiirfilter @title: audioiirfilter

audioiirfilter implements a generic audio IIR filter. Before usage the "a" and "b" properties have to be set to the filter coefficients that should be used.

The filter coefficients describe the numerator and denominator of the transfer function.

To change the filter coefficients whenever the sampling rate changes the "rate-changed" signal can be used. This should be done for most IIR filters as they're depending on the sampling rate.

Example application

<programlisting language="C"> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" parse="text" href="../../../../tests/examples/audiofx/iirfilter-example.c" /> ]|

Definition at line 47 of file audioiirfilter.c.

◆ gst_audio_iir_filter_parent_class

#define gst_audio_iir_filter_parent_class   parent_class

Definition at line 80 of file audioiirfilter.c.

◆ GST_CAT_DEFAULT

#define GST_CAT_DEFAULT   gst_audio_iir_filter_debug

Definition at line 62 of file audioiirfilter.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
SIGNAL_RATE_CHANGED 
LAST_SIGNAL 

Definition at line 65 of file audioiirfilter.c.

◆ anonymous enum

anonymous enum
Enumerator
PROP_0 
PROP_A 
PROP_B 

Definition at line 71 of file audioiirfilter.c.

Function Documentation

◆ G_DEFINE_TYPE()

G_DEFINE_TYPE ( GstAudioIIRFilter  ,
gst_audio_iir_filter  ,
(gst_audio_fx_base_iir_filter_get_type())   
)

◆ gst_audio_iir_filter_class_init()

static void gst_audio_iir_filter_class_init ( GstAudioIIRFilterClass klass)
static

GstAudioIIRFilter::rate-changed: @filter: the filter on which the signal is emitted @rate: the new sampling rate

Will be emitted when the sampling rate changes. The callbacks will be called from the streaming thread and processing will stop until the event is handled.

Definition at line 96 of file audioiirfilter.c.

References gst_audio_iir_filter_finalize(), gst_audio_iir_filter_get_property(), gst_audio_iir_filter_set_property(), gst_audio_iir_filter_setup(), gst_audio_iir_filter_signals, PROP_A, PROP_B, and SIGNAL_RATE_CHANGED.

◆ gst_audio_iir_filter_finalize()

static void gst_audio_iir_filter_finalize ( GObject *  object)
static

◆ gst_audio_iir_filter_get_property()

static void gst_audio_iir_filter_get_property ( GObject *  object,
guint  prop_id,
GValue *  value,
GParamSpec *  pspec 
)
static

◆ gst_audio_iir_filter_init()

static void gst_audio_iir_filter_init ( GstAudioIIRFilter self)
static

◆ gst_audio_iir_filter_set_property()

static void gst_audio_iir_filter_set_property ( GObject *  object,
guint  prop_id,
const GValue *  value,
GParamSpec *  pspec 
)
static

◆ gst_audio_iir_filter_setup()

static gboolean gst_audio_iir_filter_setup ( GstAudioFilter *  base,
const GstAudioInfo *  info 
)
static

◆ gst_audio_iir_filter_update_coefficients()

static void gst_audio_iir_filter_update_coefficients ( GstAudioIIRFilter self,
GValueArray *  va,
GValueArray *  vb 
)
static

◆ GST_DEBUG_CATEGORY_STATIC()

GST_DEBUG_CATEGORY_STATIC ( gst_audio_iir_filter_debug  )

◆ GST_ELEMENT_REGISTER_DEFINE()

GST_ELEMENT_REGISTER_DEFINE ( audioiirfilter  ,
"audioiirfilter"  ,
GST_RANK_NONE  ,
(gst_audio_iir_filter_get_type())   
)

Variable Documentation

◆ gst_audio_iir_filter_signals

guint gst_audio_iir_filter_signals[LAST_SIGNAL] = { 0, }
static

Definition at line 78 of file audioiirfilter.c.

Referenced by gst_audio_iir_filter_class_init(), and gst_audio_iir_filter_setup().