level

## level level |

## Properties

guint64 | interval | Read / Write
gboolean | message | Read / Write
gdouble | peak-falloff | Read / Write
guint64 | peak-ttl | Read / Write
gboolean | post-messages | Read / Write

## Types and Values

struct | GstLevel

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstElement
                    ╰── GstBaseTransform
                        ╰── GstLevel

## Description

Level analyses incoming audio buffers and, if the “message” property is TRUE, generates an element message named

`"level"`:

after each interval of time given by the “interval” property. The message's structure contains these fields:

- GstClockTime `"timestamp"`: the timestamp of the buffer that triggered the message.

- GstClockTime `"stream-time"`: the stream time of the buffer.

- GstClockTime `"running-time"`: the running_time of the buffer.

- GstClockTime `"duration"`: the duration of the buffer.

- GstClockTime `"endtime"`: the end time of the buffer that triggered the message as stream time (this is deprecated, as it can be calculated from stream-time + duration)

- GValueArray of gdouble `"peak"`: the peak power level in dB for each channel

- GValueArray of gdouble `"decay"`: the decaying peak power level in dB for each channel The decaying peak level follows the peak level, but starts dropping if no new peak is reached after the time given by the “peak-ttl”. When the decaying peak level drops, it does so at the decay rate as specified by the “peak-falloff”.

- GValueArray of gdouble `"rms"`: the Root Mean Square (or average power) level in dB for each channel

### Example application

    1
    <span style="color: red"><xi:include></xi:include></span>

## Synopsis

### Element Information

plugin | level
author | Thomas Vander Stichele <thomas at apestaart dot org>
class | Filter/Analyzer/Audio

### Element Pads

name | sink
direction | sink
presence | always
details | audio/x-raw, format=(string){ S8, S16LE, S32LE, F32LE, F64LE }, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ]

name | src
direction | source
presence | always
details | audio/x-raw, format=(string){ S8, S16LE, S32LE, F32LE, F64LE }, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ]

## Functions

## Types and Values

### struct GstLevel

    struct GstLevel;

Opaque data structure.

## Property Details

### The `“interval”` property

      “interval”                 guint64

Interval of time between message posts (in nanoseconds).

Flags: Read / Write

Allowed values: >= 1

Default value: 100000000

### The `“message”` property

      “message”                  gboolean

Post a 'level' message for each passed interval (deprecated, use the post-messages property instead).

Flags: Read / Write

Default value: TRUE

### The `“peak-falloff”` property

      “peak-falloff”             gdouble

Decay rate of decay peak after TTL (in dB/sec).

Flags: Read / Write

Allowed values: >= 0

Default value: 10

### The `“peak-ttl”` property

      “peak-ttl”                 guint64

Time To Live of decay peak before it falls back (in nanoseconds).

Flags: Read / Write

Default value: 300000000

### The `“post-messages”` property

      “post-messages”            gboolean

Post messages on the bus with level information.

`GstLevel:post-messages` is deprecated and should not be used in newly-written code.

use the “post-messages” property

Flags: Read / Write

Default value: TRUE

Since: 1.1.0