## GstRTSPStreamTransport

GstRTSPStreamTransport — A media stream transport configuration

## Functions

GstRTSPStreamTransport * | gst_rtsp_stream_transport_new ()
GstRTSPStream * | gst_rtsp_stream_transport_get_stream ()
const GstRTSPTransport * | gst_rtsp_stream_transport_get_transport ()
void | gst_rtsp_stream_transport_set_transport ()
const GstRTSPUrl * | gst_rtsp_stream_transport_get_url ()
void | gst_rtsp_stream_transport_set_url ()
gchar * | gst_rtsp_stream_transport_get_rtpinfo ()
gboolean | ( *GstRTSPSendFunc ) ()
void | gst_rtsp_stream_transport_set_callbacks ()
gboolean | ( *GstRTSPSendListFunc ) ()
void | gst_rtsp_stream_transport_set_list_callbacks ()
void | ( *GstRTSPKeepAliveFunc ) ()
void | gst_rtsp_stream_transport_set_keepalive ()
void | gst_rtsp_stream_transport_keep_alive ()
gboolean | gst_rtsp_stream_transport_set_active ()
void | gst_rtsp_stream_transport_set_timed_out ()
gboolean | gst_rtsp_stream_transport_is_timed_out ()
gboolean | gst_rtsp_stream_transport_send_rtp ()
gboolean | gst_rtsp_stream_transport_send_rtp_list ()
gboolean | gst_rtsp_stream_transport_send_rtcp ()
gboolean | gst_rtsp_stream_transport_send_rtcp_list ()

## Types and Values

struct | GstRTSPStreamTransport
struct | GstRTSPStreamTransportClass

## Object Hierarchy

        GObject
        ╰── GstRTSPStreamTransport

## Description

The GstRTSPStreamTransport configures the transport used by a GstRTSPStream. It is usually manages by a GstRTSPSessionMedia object.

With `gst_rtsp_stream_transport_set_callbacks()`, callbacks can be configured to handle the RTP and RTCP packets from the stream, for example when they need to be sent over TCP.

With `gst_rtsp_stream_transport_set_active()` the transports are added and removed from the stream.

A GstRTSPStream will call `gst_rtsp_stream_transport_keep_alive()` when RTCP is received from the client. It will also call `gst_rtsp_stream_transport_set_timed_out()` when a receiver has timed out.

A GstRTSPClient will call `gst_rtsp_stream_transport_message_sent()` when it has sent a data message for the transport.

Last reviewed on 2013-07-16 (1.0.0)

## Functions

### gst_rtsp_stream_transport_new ()

    GstRTSPStreamTransport *
    gst_rtsp_stream_transport_new (GstRTSPStream *stream,
                                   GstRTSPTransport *tr);

Create a new GstRTSPStreamTransport that can be used to manage `stream` with transport `tr` .

#### Parameters

stream | a GstRTSPStream |
tr | a GstRTSPTransport. | [transfer full]

#### Returns

a new GstRTSPStreamTransport.

[transfer full]

### gst_rtsp_stream_transport_get_stream ()

    GstRTSPStream *
    gst_rtsp_stream_transport_get_stream (GstRTSPStreamTransport *trans);

Get the GstRTSPStream used when constructing `trans` .

#### Parameters

trans | a GstRTSPStreamTransport |

#### Returns

the stream used when constructing `trans` .

[transfer none][nullable]

### gst_rtsp_stream_transport_get_transport ()

    const GstRTSPTransport *
    gst_rtsp_stream_transport_get_transport
                                   (GstRTSPStreamTransport *trans);

Get the transport configured in `trans` .

#### Parameters

trans | a GstRTSPStreamTransport |

#### Returns

the transport configured in `trans` . It remains valid for as long as `trans` is valid.

[transfer none][nullable]

### gst_rtsp_stream_transport_set_transport ()

    void
    gst_rtsp_stream_transport_set_transport
                                   (GstRTSPStreamTransport *trans,
                                    GstRTSPTransport *tr);

Set `tr` as the client transport. This function takes ownership of the passed `tr` .

#### Parameters

trans | a GstRTSPStreamTransport |
tr | a client GstRTSPTransport. | [transfer full]

### gst_rtsp_stream_transport_get_url ()

    const GstRTSPUrl *
    gst_rtsp_stream_transport_get_url (GstRTSPStreamTransport *trans);

Get the url configured in `trans` .

#### Parameters

trans | a GstRTSPStreamTransport |

#### Returns

the url configured in `trans` . It remains valid for as long as `trans` is valid.

[transfer none][nullable]

### gst_rtsp_stream_transport_set_url ()

    void
    gst_rtsp_stream_transport_set_url (GstRTSPStreamTransport *trans,
                                       const GstRTSPUrl *url);

Set `url` as the client url.

#### Parameters

trans | a GstRTSPStreamTransport |
url | a client GstRTSPUrl. | [transfer none][nullable]

### gst_rtsp_stream_transport_get_rtpinfo ()

    gchar *
    gst_rtsp_stream_transport_get_rtpinfo (GstRTSPStreamTransport *trans,
                                           GstClockTime start_time);

Get the RTP-Info string for `trans` and `start_time` .

#### Parameters

trans | a GstRTSPStreamTransport |
start_time | a star time |

#### Returns

the RTPInfo string for `trans` and `start_time` or `NULL` when the RTP-Info could not be determined. `g_free()` after usage.

[transfer full][nullable]

### GstRTSPSendFunc ()

    gboolean
    (*GstRTSPSendFunc) (GstBuffer *buffer,
                        guint8 channel,
                        gpointer user_data);

Function registered with `gst_rtsp_stream_transport_set_callbacks()` and called when `buffer` must be sent on `channel` .

#### Parameters

buffer | a GstBuffer |
channel | a channel |
user_data | user data |

#### Returns

`TRUE` on success

### gst_rtsp_stream_transport_set_callbacks ()

    void
    gst_rtsp_stream_transport_set_callbacks
                                   (GstRTSPStreamTransport *trans,
                                    GstRTSPSendFunc send_rtp,
                                    GstRTSPSendFunc send_rtcp,
                                    gpointer user_data,
                                    GDestroyNotify notify);

Install callbacks that will be called when data for a stream should be sent to a client. This is usually used when sending RTP/RTCP over TCP.

#### Parameters

trans | a GstRTSPStreamTransport |
send_rtp | a callback called when RTP should be sent. | [scope notified]
send_rtcp | a callback called when RTCP should be sent. | [scope notified]
user_data | user data passed to callbacks. | [closure]
notify | called with the user_data when no longer needed. | [allow-none]

### GstRTSPSendListFunc ()

    gboolean
    (*GstRTSPSendListFunc) (GstBufferList *buffer_list,
                            guint8 channel,
                            gpointer user_data);

Function registered with `gst_rtsp_stream_transport_set_callbacks()` and called when `buffer_list` must be sent on `channel` .

#### Parameters

buffer_list | a GstBufferList |
channel | a channel |
user_data | user data |

#### Returns

`TRUE` on success

Since: 1.16

### gst_rtsp_stream_transport_set_list_callbacks ()

    void
    gst_rtsp_stream_transport_set_list_callbacks
                                   (GstRTSPStreamTransport *trans,
                                    GstRTSPSendListFunc send_rtp_list,
                                    GstRTSPSendListFunc send_rtcp_list,
                                    gpointer user_data,
                                    GDestroyNotify notify);

Install callbacks that will be called when data for a stream should be sent to a client. This is usually used when sending RTP/RTCP over TCP.

#### Parameters

trans | a GstRTSPStreamTransport |
send_rtp_list | a callback called when RTP should be sent. | [scope notified]
send_rtcp_list | a callback called when RTCP should be sent. | [scope notified]
user_data | user data passed to callbacks. | [closure]
notify | called with the user_data when no longer needed. | [allow-none]

Since: 1.16

### GstRTSPKeepAliveFunc ()

    void
    (*GstRTSPKeepAliveFunc) (gpointer user_data);

Function registered with `gst_rtsp_stream_transport_set_keepalive()` and called when the stream is active.

#### Parameters

user_data | user data |

### gst_rtsp_stream_transport_set_keepalive ()

    void
    gst_rtsp_stream_transport_set_keepalive
                                   (GstRTSPStreamTransport *trans,
                                    GstRTSPKeepAliveFunc keep_alive,
                                    gpointer user_data,
                                    GDestroyNotify notify);

Install callbacks that will be called when RTCP packets are received from the receiver of `trans` .

#### Parameters

trans | a GstRTSPStreamTransport |
keep_alive | a callback called when the receiver is active. | [scope notified]
user_data | user data passed to callback. | [closure]
notify | called with the user_data when no longer needed. | [allow-none]

### gst_rtsp_stream_transport_keep_alive ()

    void
    gst_rtsp_stream_transport_keep_alive (GstRTSPStreamTransport *trans);

Signal the installed keep_alive callback for `trans` .

#### Parameters

trans | a GstRTSPStreamTransport |

### gst_rtsp_stream_transport_set_active ()

    gboolean
    gst_rtsp_stream_transport_set_active (GstRTSPStreamTransport *trans,
                                          gboolean active);

Activate or deactivate datatransfer configured in `trans` .

#### Parameters

trans | a GstRTSPStreamTransport |
active | new state of `trans` |

#### Returns

`TRUE` when the state was changed.

### gst_rtsp_stream_transport_set_timed_out ()

    void
    gst_rtsp_stream_transport_set_timed_out
                                   (GstRTSPStreamTransport *trans,
                                    gboolean timedout);

Set the timed out state of `trans` to `timedout`

#### Parameters

trans | a GstRTSPStreamTransport |
timedout | timed out value |

### gst_rtsp_stream_transport_is_timed_out ()

    gboolean
    gst_rtsp_stream_transport_is_timed_out
                                   (GstRTSPStreamTransport *trans);

Check if `trans` is timed out.

#### Parameters

trans | a GstRTSPStreamTransport |

#### Returns

`TRUE` if `trans` timed out.

### gst_rtsp_stream_transport_send_rtp ()

    gboolean
    gst_rtsp_stream_transport_send_rtp (GstRTSPStreamTransport *trans,
                                        GstBuffer *buffer);

Send `buffer` to the installed RTP callback for `trans` .

#### Parameters

trans | a GstRTSPStreamTransport |
buffer | a GstBuffer. | [transfer none]

#### Returns

`TRUE` on success

### gst_rtsp_stream_transport_send_rtp_list ()

    gboolean
    gst_rtsp_stream_transport_send_rtp_list
                                   (GstRTSPStreamTransport *trans,
                                    GstBufferList *buffer_list);

Send `buffer_list` to the installed RTP callback for `trans` .

#### Parameters

trans | a GstRTSPStreamTransport |
buffer_list | a GstBufferList. | [transfer none]

#### Returns

`TRUE` on success

Since: 1.16

### gst_rtsp_stream_transport_send_rtcp ()

    gboolean
    gst_rtsp_stream_transport_send_rtcp (GstRTSPStreamTransport *trans,
                                         GstBuffer *buffer);

Send `buffer` to the installed RTCP callback for `trans` .

#### Parameters

trans | a GstRTSPStreamTransport |
buffer | a GstBuffer. | [transfer none]

#### Returns

`TRUE` on success

### gst_rtsp_stream_transport_send_rtcp_list ()

    gboolean
    gst_rtsp_stream_transport_send_rtcp_list
                                   (GstRTSPStreamTransport *trans,
                                    GstBufferList *buffer_list);

Send `buffer_list` to the installed RTCP callback for `trans` .

#### Parameters

trans | a GstRTSPStreamTransport |
buffer_list | a GstBuffer. | [transfer none]

#### Returns

`TRUE` on success

Since: 1.16

## Types and Values

### struct GstRTSPStreamTransport

    struct GstRTSPStreamTransport;

A Transport description for a stream

#### Members

### struct GstRTSPStreamTransportClass

    struct GstRTSPStreamTransportClass {
      GObjectClass parent_class;
    };

## See Also

GstRTSPStream, GstRTSPSessionMedia