gstrtpjitterbuffer

gstrtpjitterbuffer — A buffer that deals with network jitter and other transmission faults

Properties

gboolean do-lost Read / Write
gboolean drop-on-latency Read / Write
guint latency Read / Write
gint64 ts-offset Read / Write
RTPJitterBufferMode mode Read / Write
gint percent Read

Signals

void clear-pt-map Action
void handle-sync Run Last
void on-npt-stop Run Last
GstCaps* request-pt-map Run Last
guint64 set-active Action

Types and Values

Object Hierarchy

    GObject
    ╰── GstObject
        ╰── GstElement
            ╰── GstRtpJitterBuffer

Description

This element reorders and removes duplicate RTP packets as they are received from a network source. It will also wait for missing packets up to a configurable time limit using the “latency” property. Packets arriving too late are considered to be lost packets.

This element acts as a live element and so adds “latency” to the pipeline.

The element needs the clock-rate of the RTP payload in order to estimate the delay. This information is obtained either from the caps on the sink pad or, when no caps are present, from the “request-pt-map” signal. To clear the previous pt-map use the “clear-pt-map” signal.

This element will automatically be used inside gstrtpbin.

Example pipelines

gst-launch rtspsrc location=rtsp://192.168.1.133:8554/mpeg1or2AudioVideoTest ! gstrtpjitterbuffer ! rtpmpvdepay ! mpeg2dec ! xvimagesink
Connect to a streaming server and decode the MPEG video. The jitterbuffer is inserted into the pipeline to smooth out network jitter and to reorder the out-of-order RTP packets.

Last reviewed on 2007-05-28 (0.10.5)

Synopsis

Element Information

plugin

gstrtpmanager

author

Philippe Kalaf <philippe.kalaf@collabora.co.uk>, Wim Taymans <wim.taymans@gmail.com>

class

Filter/Network/RTP

Element Pads

name

sink

direction

sink

presence

always

details

application/x-rtp, clock-rate=(int)[ 1, 2147483647 ]

name

sink_rtcp

direction

sink

presence

request

details

application/x-rtcp

name

src

direction

source

presence

always

details

application/x-rtp

Functions

Types and Values

struct GstRtpJitterBuffer

struct GstRtpJitterBuffer;

Opaque jitterbuffer structure.

Property Details

The “do-lost” property

  “do-lost”                  gboolean

Send an event downstream when a packet is lost.

Flags: Read / Write

Default value: FALSE


The “drop-on-latency” property

  “drop-on-latency”          gboolean

Tells the jitterbuffer to never exceed the given latency in size.

Flags: Read / Write

Default value: FALSE


The “latency” property

  “latency”                  guint

Amount of ms to buffer.

Flags: Read / Write

Default value: 200


The “ts-offset” property

  “ts-offset”                gint64

Adjust buffer timestamps with offset in nanoseconds.

Flags: Read / Write

Default value: 0


The “mode” property

  “mode”                     RTPJitterBufferMode

Control the buffering algorithm in use.

Flags: Read / Write

Default value: Slave receiver to sender clock


The “percent” property

  “percent”                  gint

The buffer filled percent.

Flags: Read

Allowed values: [0,100]

Default value: 0

Signal Details

The “clear-pt-map” signal

void
user_function (GstRtpJitterBuffer *buffer,
               gpointer            user_data)

Invalidate the clock-rate as obtained with the “request-pt-map” signal.

Parameters

buffer

the object which received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Action


The “handle-sync” signal

void
user_function (GstRtpJitterBuffer *buffer,
               GstStructure       *struct,
               gpointer            user_data)

Be notified of new sync values.

Parameters

buffer

the object which received the signal

 

struct

a GstStructure containing sync values.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “on-npt-stop” signal

void
user_function (GstRtpJitterBuffer *buffer,
               gpointer            user_data)

Signal that the jitterbufer has pushed the RTP packet that corresponds to the npt-stop position.

Parameters

buffer

the object which received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “request-pt-map” signal

GstCaps*
user_function (GstRtpJitterBuffer *buffer,
               guint               pt,
               gpointer            user_data)

Request the payload type as GstCaps for pt .

Parameters

buffer

the object which received the signal

 

pt

the pt

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “set-active” signal

guint64
user_function (GstRtpJitterBuffer *buffer,
               gboolean            Returns,
               guint64             arg2,
               gpointer            user_data)

Start pushing out packets with the given base time. This signal is only useful in buffering mode.

Parameters

buffer

the object which received the signal

 

user_data

user data set when the signal handler was connected.

 

Returns

the time of the last pushed packet.

Flags: Action

Since 0.10.19