srtsink

srtsink is a network sink that sends SRT packets to the network.

Examples

 gst-launch-1.0 -v audiotestsrc ! srtsink uri=srt://host

This pipeline shows how to serve SRT packets through the default port.

 gst-launch-1.0 -v audiotestsrc ! srtsink uri=srt://:port

This pipeline shows how to wait SRT callers.

Additionally, in listener mode, this element supports sharing the underlying SRT connection in order to receive multiple SRT stream using a single UDP port.

Connection sharing is acheived using the connection-key property, two receivers, in the same application, with the same connection-key value will share their SRT connection. The demultiplexing of the streams will be performed using the streamid property.

Example sender- and receiver for SRT connection sharing

  gst-launch-1.0 -v \
    srtsrc uri="srt://127.0.0.1:5000?mode=caller&streamid=one" ! tsparse ! queue ! filesink location=one.ts \
    srtsrc uri="srt://127.0.0.1:5000?mode=caller&streamid=two" ! tsparse ! queue ! filesink location=two.ts
 |] This pipeline shows two SRT receivers calling to the same port with different `streamid`

 |[
  gst-launch-1.0 -v mpegtsmux name=muxone alignment=7 mpegtsmux name=muxtwo alignment=7 \
    videotestsrc pattern=ball ! queue ! x264enc ! muxone. \
    videotestsrc ! queue ! x264enc ! muxtwo. \
    muxone. ! queue ! srtsink connection-key=multiplex uri="srt://127.0.0.1:5000?mode=listener&streamid=one" \
    muxtwo. ! queue ! srtsink connection-key=multiplex uri="srt://127.0.0.1:5000?mode=listener&streamid=two"
 |] This pipeline shows two SRT listeners sharing one UDP port.

Hierarchy

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──GstBaseSink
                    ╰──srtsink

Implemented interfaces

Factory details

Authors: – Justin Kim

Classification:Sink/Network

Rank – primary

Plugin – srt

Package – GStreamer Bad Plug-ins

Pad Templates

sink

ANY

Presencealways

Directionsink

Object typeGstPad


Signals

caller-added

caller_added_callback (GstElement * gstsrtsink,
                       gint unused,
                       GSocketAddress * addr,
                       gpointer udata)
def caller_added_callback (gstsrtsink, unused, addr, udata):
    #python callback for the 'caller-added' signal
function caller_added_callback(gstsrtsink: GstElement * gstsrtsink, unused: gint unused, addr: GSocketAddress * addr, udata: gpointer udata): {
    // javascript callback for the 'caller-added' signal
}

A new caller has connected to gstsrtsink.

Parameters:

gstsrtsink

the srtsink element that emitted this signal

unused

always zero (for ABI compatibility with previous versions)

addr

the GSocketAddress of the new caller

udata
No description available

Flags: Run Last


caller-connecting

gboolean
caller_connecting_callback (GstElement * gstsrtsink,
                            GSocketAddress * addr,
                            gchararray stream_id,
                            gpointer udata)
def caller_connecting_callback (gstsrtsink, addr, stream_id, udata):
    #python callback for the 'caller-connecting' signal
function caller_connecting_callback(gstsrtsink: GstElement * gstsrtsink, addr: GSocketAddress * addr, stream_id: gchararray stream_id, udata: gpointer udata): {
    // javascript callback for the 'caller-connecting' signal
}

Whether to accept or reject a caller's connection to srtsink in listener mode. The Caller's connection is rejected if the callback returns FALSE, else the connection is accepeted.

Parameters:

gstsrtsink

the srtsink element that emitted this signal

addr

the GSocketAddress that describes the client socket

stream_id

the stream Id to which the caller wants to connect

udata
No description available
Returns (gboolean)
No description available

Flags: Run Last

Since : 1.20


caller-rejected

caller_rejected_callback (GstElement * gstsrtsink,
                          GSocketAddress * addr,
                          gchararray stream_id,
                          gpointer udata)
def caller_rejected_callback (gstsrtsink, addr, stream_id, udata):
    #python callback for the 'caller-rejected' signal
function caller_rejected_callback(gstsrtsink: GstElement * gstsrtsink, addr: GSocketAddress * addr, stream_id: gchararray stream_id, udata: gpointer udata): {
    // javascript callback for the 'caller-rejected' signal
}

A caller's connection to srtsink in listener mode has been rejected.

Parameters:

gstsrtsink

the srtsink element that emitted this signal

addr

the GSocketAddress that describes the client socket

stream_id

the stream Id to which the caller wants to connect

udata
No description available

Flags: Run Last

Since : 1.20


caller-removed

caller_removed_callback (GstElement * gstsrtsink,
                         gint unused,
                         GSocketAddress * addr,
                         gpointer udata)
def caller_removed_callback (gstsrtsink, unused, addr, udata):
    #python callback for the 'caller-removed' signal
function caller_removed_callback(gstsrtsink: GstElement * gstsrtsink, unused: gint unused, addr: GSocketAddress * addr, udata: gpointer udata): {
    // javascript callback for the 'caller-removed' signal
}

The given caller has disconnected.

Parameters:

gstsrtsink

the srtsink element that emitted this signal

unused

always zero (for ABI compatibility with previous versions)

addr

the GSocketAddress of the caller

udata
No description available

Flags: Run Last


Properties

authentication

“authentication” gboolean

Boolean to authenticate a connection. If TRUE, the incoming connection is authenticated. Else, all the connections are accepted.

Flags : Read / Write

Default value : false

Since : 1.20


auto-reconnect

“auto-reconnect” gboolean

Automatically reconnect when connection fails

Flags : Read / Write

Default value : true


connection-key

“connection-key” gchararray

Identifier for sharing SRT connection when listening, elements with the same connection-key will use on the same UDP socket.

Flags : Read / Write

Default value : NULL

Since : 1.30


latency

“latency” gint

Minimum latency (milliseconds)

Flags : Read / Write

Default value : 125


localaddress

“localaddress” gchararray

Local address to bind

Flags : Read / Write

Default value : NULL


localport

“localport” guint

Local port to bind

Flags : Read / Write

Default value : 7001


mode

“mode” GstSRTConnectionMode *

SRT connection mode

Flags : Read / Write

Default value : caller (1)


passphrase

“passphrase” gchararray

Password for the encrypted transmission

Flags : Read / Write


pbkeylen

“pbkeylen” GstSRTKeyLength *

Crypto key length in bytes

Flags : Read / Write

Default value : no-key (0)


poll-timeout

“poll-timeout” gint

Return poll wait after timeout milliseconds (-1 = infinite)

Flags : Read / Write

Default value : 1000


stats

“stats” GstStructure *

SRT Statistics

Flags : Read

Default value :

application/x-srt-statistics, bytes-sent-total=(guint64)0;

streamid

“streamid” gchararray

Stream ID for the SRT access control

Flags : Read / Write

Default value : NULL


uri

“uri” gchararray

URI in the form of srt://address:port

Flags : Read / Write

Default value : srt://127.0.0.1:7001


wait-for-connection

“wait-for-connection” gboolean

Boolean to block streaming until a client connects. If TRUE, `srtsink' will stream only when a client is connected.

Flags : Read / Write

Default value : true


The results of the search are