level

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

{{ tests/examples/level/level-example.c }}

Hierarchy

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──GstBaseTransform
                    ╰──level

Factory details

Authors: – Thomas Vander Stichele

Classification:Filter/Analyzer/Audio

Rank – none

Plugin – gstlevel

Package – GStreamer Good Plug-ins git

Pad Templates

sink

audio/x-raw:
         format: { S8, S16LE, S32LE, F32LE, F64LE }
         layout: interleaved
           rate: [ 1, 2147483647 ]
       channels: [ 1, 2147483647 ]

Presencealways

Directionsink


src

audio/x-raw:
         format: { S8, S16LE, S32LE, F32LE, F64LE }
         layout: interleaved
           rate: [ 1, 2147483647 ]
       channels: [ 1, 2147483647 ]

Presencealways

Directionsrc


Properties

interval

“interval” guint64

Interval of time between message posts (in nanoseconds)

Flags : Read / Write

Default value : 100000000


message

“message” gboolean

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

Flags : Read / Write

Default value : true


name

“name” gchararray

The name of the object

Flags : Read / Write / Construct

Default value : NULL


parent

“parent” GstObject *

The parent of the object

Flags : Read / Write


peak-falloff

“peak-falloff” gdouble

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

Flags : Read / Write

Default value : 10


peak-ttl

“peak-ttl” guint64

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

Flags : Read / Write

Default value : 300000000


post-messages

“post-messages” gboolean

Post messages on the bus with level information.

Flags : Read / Write

Default value : true


qos

“qos” gboolean

Handle Quality-of-Service events

Flags : Read / Write

Default value : false


The results of the search are