GstAudioVisualizer: GStreamer Base Plugins 1.0 Library Reference Manual

## GstAudioVisualizer GstAudioVisualizer — Base class for visualizers. |

## Functions

void | (*GstAudioVisualizerShaderFunc) ()

## Properties

guint | shade-amount | Read / Write
GstAudioVisualizerShader | shader | Read / Write

## Types and Values

struct | GstAudioVisualizer
struct | GstAudioVisualizerClass
enum | GstAudioVisualizerShader

## Object Hierarchy

        GEnum
        ╰── GstAudioVisualizerShader
        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstElement
                    ╰── GstAudioVisualizer

## Includes

    #include <gst/pbutils/pbutils.h>

## Description

A baseclass for scopes (visualizers). It takes care of re-fitting the audio-rate to video-rate and handles renegotiation (downstream video size changes).

It also provides several background shading effects. These effects are applied to a previous picture before the `render()` implementation can draw a new frame.

## Functions

### GstAudioVisualizerShaderFunc ()

    void
    (*GstAudioVisualizerShaderFunc) (GstAudioVisualizer *scope,
                                     const GstVideoFrame *s,
                                     GstVideoFrame *d);

## Types and Values

### struct GstAudioVisualizer

    struct GstAudioVisualizer;

### struct GstAudioVisualizerClass

    struct GstAudioVisualizerClass {
      /* virtual function, called whenever the format changes */
      gboolean (*setup) (GstAudioVisualizer * scope);

      /* virtual function for rendering a frame */
      gboolean (*render) (GstAudioVisualizer * scope, GstBuffer * audio, GstVideoFrame * video);

      gboolean (*decide_allocation)   (GstAudioVisualizer * scope, GstQuery *query);
    };

### enum GstAudioVisualizerShader

Different types of supported background shading functions.

#### Members

GST_AUDIO_VISUALIZER_SHADER_NONE | no shading |
GST_AUDIO_VISUALIZER_SHADER_FADE | plain fading |
GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_UP | fade and move up |
GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_DOWN | fade and move down |
GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_LEFT | fade and move left |
GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_RIGHT | fade and move right |
GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_OUT | fade and move horizontally out |
GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_IN | fade and move horizontally in |
GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_OUT | fade and move vertically out |
GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_IN | fade and move vertically in |

## Property Details

### The `“shade-amount”` property

      “shade-amount”             guint

Shading color to use (big-endian ARGB).

Owner: GstAudioVisualizer

Flags: Read / Write

Default value: 657930

### The `“shader”` property

      “shader”                   GstAudioVisualizerShader

Shader function to apply on each frame.

Owner: GstAudioVisualizer

Flags: Read / Write

Default value: GST_AUDIO_VISUALIZER_SHADER_FADE