# srtsrc

srtsrc is a network source that reads SRT packets from the network.

## Examples

     gst-launch-1.0 -v srtsrc uri="srt://127.0.0.1:7001" ! fakesink

This pipeline shows how to connect SRT server by setting uri property.

     gst-launch-1.0 -v srtsrc uri="srt://:7001?mode=listener" ! fakesink

This pipeline shows how to wait SRT connection by setting uri property.

     gst-launch-1.0 -v srtclientsrc uri="srt://192.168.1.10:7001?mode=rendez-vous" ! fakesink

This pipeline shows how to connect SRT server by setting uri property and using the rendez-vous mode.

## Hierarchy

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstElement
                    ╰──GstBaseSrc
                        ╰──GstPushSrc
                            ╰──srtsrc

## Implemented interfaces

    GstURIHandler

## Factory details

Authors: – Justin Kim

Classification: – `Source/Network`

Rank – primary

Plugin – srt

Package – GStreamer Bad Plug-ins

## Pad Templates

### `src`

    ANY

Presence – always

Direction – src

Object type – GstPad

## Signals

### caller-added

    caller_added_callback (GstElement * gstsrtsrc,
                           gint unused,
                           GSocketAddress * addr,
                           gpointer udata)

    def caller_added_callback (gstsrtsrc, unused, addr, udata):
        #python callback for the 'caller-added' signal

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

A new caller has connected to srtsrc.

Parameters:

`gstsrtsrc` –

the srtsrc 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 * gstsrtsrc,
                                GSocketAddress * addr,
                                gchararray stream_id,
                                gpointer udata)

    def caller_connecting_callback (gstsrtsrc, addr, stream_id, udata):
        #python callback for the 'caller-connecting' signal

    function caller_connecting_callback(gstsrtsrc: GstElement * gstsrtsrc, 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 srtsrc in listener mode. The Caller's connection is rejected if the callback returns FALSE, else the connection is accepeted.

Parameters:

`gstsrtsrc` –

the srtsrc 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 * gstsrtsrc,
                              GSocketAddress * addr,
                              gchararray stream_id,
                              gpointer udata)

    def caller_rejected_callback (gstsrtsrc, addr, stream_id, udata):
        #python callback for the 'caller-rejected' signal

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

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

Parameters:

`gstsrtsrc` –

the srtsrc 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 * gstsrtsrc,
                             gint unused,
                             GSocketAddress * addr,
                             gpointer udata)

    def caller_removed_callback (gstsrtsrc, unused, addr, udata):
        #python callback for the 'caller-removed' signal

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

The given caller has disconnected.

Parameters:

`gstsrtsrc` –

the srtsrc 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

Authenticate a connection

Flags : Read / Write

Default value : false

#### auto-reconnect

    “auto-reconnect” gboolean

Boolean to choose whether to automatically reconnect. If TRUE, an element in caller mode will try to reconnect instead of reporting an error.

This will be ignored for authentication failures.

Flags : Read / Write

Default value : true

Since : 1.22

#### keep-listening

    “keep-listening” gboolean

If FALSE, the element will return GST_FLOW_EOS when the remote client disconnects. If TRUE, the element will keep waiting for the client to reconnect. An element message named 'connection-removed' will be sent on disconnection.

Flags : Read / Write

Default value : false

Since : 1.22

#### latency

    “latency” gint

The maximum accepted transmission latency.

Flags : Read / Write

Default value : 125

#### localaddress

    “localaddress” gchararray

The address to bind when mode is listener or rendezvous. This property can be set by URI parameters.

Flags : Read / Write

Default value : NULL

#### localport

    “localport” guint

The local port to bind when mode is listener or rendezvous. This property can be set by URI parameters.

Flags : Read / Write

Default value : 7001

#### mode

    “mode” GstSRTConnectionMode *

The SRT connection mode. This property can be set by URI parameters.

Flags : Read / Write

Default value : caller (1)

#### passphrase

    “passphrase” gchararray

The password for the encrypted transmission. This property can be set by URI parameters.

Flags : Read / Write

#### pbkeylen

    “pbkeylen” GstSRTKeyLength *

The crypto key length. This property can be set by URI parameters.

Flags : Read / Write

Default value : no-key (0)

#### poll-timeout

    “poll-timeout” gint

The polling timeout used when srt poll is started. Even if the default value indicates infinite waiting, it can be cancellable according to GstState This property can be set by URI parameters.

Flags : Read / Write

Default value : 1000

#### stats

    “stats” GstStructure *

The statistics from SRT.

Flags : Read

Default value :

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

#### streamid

    “streamid” gchararray

The stream id for the SRT access control.

Flags : Read / Write

Default value : NULL

#### uri

    “uri” gchararray

The URI used by SRT connection. User can specify SRT specific options by URI parameters. Refer to Mediun: SRT

Flags : Read / Write

Default value : srt://127.0.0.1:7001

#### wait-for-connection

    “wait-for-connection” gboolean

Block the stream until a client connects

Flags : Read / Write

Default value : true

## Named constants

### GstSRTConnectionMode

SRT connection types.

#### Members

`none` (0) – GST_SRT_CONNECTION_MODE_NONE
`caller` (1) – GST_SRT_CONNECTION_MODE_CALLER
`listener` (2) – GST_SRT_CONNECTION_MODE_LISTENER
`rendezvous` (3) – GST_SRT_CONNECTION_MODE_RENDEZVOUS

### GstSRTKeyLength

#### Members

`no-key` (0) – GST_SRT_KEY_LENGTH_NO_KEY
`0` (0) – GST_SRT_KEY_LENGTH_0
`16` (16) – GST_SRT_KEY_LENGTH_16
`24` (24) – GST_SRT_KEY_LENGTH_24
`32` (32) – GST_SRT_KEY_LENGTH_32

The results of the search are