rtprecv

RTP session management (receiver).

Environment variables

The underlying Runtime can be fine-tuned process-wide using the following env vars:

  • 'GST_RTPBIN2_RT_WORKER_THREADS': number of worker threads the Runtime will use (default: 1) 0 => number of cores available on the system.
  • 'GST_RTPBIN2_RT_MAX_BLOCKING_THREADS': limit for the number of threads in the blocking pool (default: 512). When they push buffers, downstream events or handle downstream queries, rtpbin2 elements spawn a thread from the blocking pool. This is to avoid blocking the worker thread which is shared with other elements running on the same runtime.
  • 'GST_RTPBIN2_RT_THREAD_KEEP_ALIVE': timeout for a thread in the blocking pool in ms (default: 10s).

Example pipeline

 gst-launch-1.0 \
  udpsrc port=5004 caps='application/x-rtp, media=audio, clock-rate=48000, encoding-name=OPUS, encoding-params=(string)1, sprop-stereo=(string)0, payload=96' \
  ! queue max-size-bytes=0 max-size-buffers=0 max-size-time=200000000 ! recv.rtp_sink_0 \
  udpsrc port=5005 caps='application/x-rtcp' \
  ! recv.rtcp_sink_0 \
  rtprecv name=recv rtp-id=example-rtp-id latency=200 \
  ! rtpopusdepay2 ! opusdec ! audioconvert ! audioresample ! queue max-size-bytes=0 max-size-buffers=1 max-size-time=0 ! autoaudiosink \
  rtpsend name=send rtp-id=example-rtp-id \
  send.rtcp_src_0 ! udpsink port=5007 host=127.0.0.1 async=false

This will process incoming RTP & RTCP packets from UDP ports 5004 & 5005, provided the RTP packets contain an Opus encoded audio stream, and will send RTCP back to the sender on UDP port 5007. See rtpsend for an example of how to produce such packets.

Hierarchy

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──rtprecv

Factory details

Authors: – Matthew Waters

Classification:Network/RTP/Filter

Rank – none

Plugin – rsrtp

Package – gst-plugin-rtp

Pad Templates

rtcp_sink_%u

application/x-rtcp:

Presencerequest

Directionsink

Object typeGstPad


rtp_sink_%u

application/x-rtp:

Presencerequest

Directionsink

Object typeGstPad


rtp_src_%u_%u_%u

application/x-rtp:

Presencesometimes

Directionsrc

Object typeGstPad


Action Signals

get-session

g_signal_emit_by_name (param_0, "get-session", arg0, &ret);
ret = param_0.emit ("get-session", arg0)
let ret = param_0.emit ("get-session", arg0);

Parameters:

param_0 (GstElement *)
No description available
arg0 (guint)
No description available
Returns (GstRtp2Session *)
No description available

Flags: Run Last / Action


Properties

latency

“latency” guint

Amount of ms to buffer

Flags : Read / Write

Default value : 200


rtp-id

“rtp-id” gchararray

A connection ID shared with a rtpsend element for implementing both sending and receiving using the same RTP context

Flags : Read / Write

Default value : rtp-id


stats

“stats” guint

Statistics about the session

Flags : Read


timestamping-mode

“timestamping-mode” Rtp-bin2timestamping-mode *

Govern how to pick presentation timestamps for packets

Flags : Read / Write

Default value : skew (2)


Named constants

Rtp-bin2timestamping-mode

Members

arrival (0) – Use arrival time as timestamp
rtp (1) – Use RTP timestamps as is
skew (2) – Correct skew to synchronize sender and receiver clocks

The results of the search are