![]() |
![]() |
![]() |
GStreamer RTSP Server Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
struct GstRTSPStreamTransport; struct GstRTSPStreamTransportClass; GstRTSPStreamTransport * gst_rtsp_stream_transport_new (GstRTSPStream *stream
,GstRTSPTransport *tr
); GstRTSPStream * gst_rtsp_stream_transport_get_stream (GstRTSPStreamTransport *trans
); const GstRTSPTransport * gst_rtsp_stream_transport_get_transport (GstRTSPStreamTransport *trans
); void gst_rtsp_stream_transport_set_transport (GstRTSPStreamTransport *trans
,GstRTSPTransport *tr
); gboolean (*GstRTSPSendFunc) (GstBuffer *buffer
,guint8 channel
,gpointer user_data
); void gst_rtsp_stream_transport_set_callbacks (GstRTSPStreamTransport *trans
,GstRTSPSendFunc send_rtp
,GstRTSPSendFunc send_rtcp
,gpointer user_data
,GDestroyNotify notify
); void (*GstRTSPKeepAliveFunc) (gpointer user_data
); void gst_rtsp_stream_transport_set_keepalive (GstRTSPStreamTransport *trans
,GstRTSPKeepAliveFunc keep_alive
,gpointer user_data
,GDestroyNotify notify
); void gst_rtsp_stream_transport_keep_alive (GstRTSPStreamTransport *trans
); gboolean gst_rtsp_stream_transport_set_active (GstRTSPStreamTransport *trans
,gboolean active
); void gst_rtsp_stream_transport_set_timed_out (GstRTSPStreamTransport *trans
,gboolean timedout
); gboolean gst_rtsp_stream_transport_is_timed_out (GstRTSPStreamTransport *trans
); gboolean gst_rtsp_stream_transport_send_rtcp (GstRTSPStreamTransport *trans
,GstBuffer *buffer
); gboolean gst_rtsp_stream_transport_send_rtp (GstRTSPStreamTransport *trans
,GstBuffer *buffer
);
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.
Last reviewed on 2013-07-16 (1.0.0)
struct GstRTSPStreamTransport { GObject parent; };
A Transport description for a stream
GObject |
parent instance |
struct GstRTSPStreamTransportClass { GObjectClass parent_class; };
GstRTSPStreamTransport * gst_rtsp_stream_transport_new (GstRTSPStream *stream
,GstRTSPTransport *tr
);
Create a new GstRTSPStreamTransport that can be used to manage
stream
with transport tr
.
|
a GstRTSPStream |
|
a GstRTSPTransport. [transfer full] |
Returns : |
a new GstRTSPStreamTransport |
GstRTSPStream * gst_rtsp_stream_transport_get_stream
(GstRTSPStreamTransport *trans
);
Get the GstRTSPStream used when constructing trans
.
|
a GstRTSPStreamTransport |
Returns : |
the stream used when constructing trans . [transfer none]
|
const GstRTSPTransport * gst_rtsp_stream_transport_get_transport
(GstRTSPStreamTransport *trans
);
Get the transport configured in trans
.
|
a GstRTSPStreamTransport |
Returns : |
the transport configured in trans . It remains
valid for as long as trans is valid. [transfer none]
|
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
.
|
a GstRTSPStreamTransport |
|
a client GstRTSPTransport. [transfer full] |
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
.
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.
|
a GstRTSPStreamTransport |
|
a callback called when RTP should be sent. [scope notified] |
|
a callback called when RTCP should be sent. [scope notified] |
|
user data passed to callbacks |
|
called with the user_data when no longer needed. |
void (*GstRTSPKeepAliveFunc) (gpointer user_data
);
Function registered with gst_rtsp_stream_transport_set_keepalive()
and called
when the stream is active.
|
user data |
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
.
|
a GstRTSPStreamTransport |
|
a callback called when the receiver is active |
|
user data passed to callback |
|
called with the user_data when no longer needed. |
void gst_rtsp_stream_transport_keep_alive
(GstRTSPStreamTransport *trans
);
Signal the installed keep_alive callback for trans
.
|
a GstRTSPStreamTransport |
gboolean gst_rtsp_stream_transport_set_active (GstRTSPStreamTransport *trans
,gboolean active
);
Activate or deactivate datatransfer configured in trans
.
|
a GstRTSPStreamTransport |
|
new state of trans
|
Returns : |
TRUE when the state was changed. |
void gst_rtsp_stream_transport_set_timed_out (GstRTSPStreamTransport *trans
,gboolean timedout
);
Set the timed out state of trans
to timedout
|
a GstRTSPStreamTransport |
|
timed out value |
gboolean gst_rtsp_stream_transport_is_timed_out
(GstRTSPStreamTransport *trans
);
Check if trans
is timed out.
|
a GstRTSPStreamTransport |
Returns : |
TRUE if trans timed out. |
gboolean gst_rtsp_stream_transport_send_rtcp (GstRTSPStreamTransport *trans
,GstBuffer *buffer
);
Send buffer
to the installed RTCP callback for trans
.
|
a GstRTSPStreamTransport |
|
a GstBuffer |
Returns : |
TRUE on success |
gboolean gst_rtsp_stream_transport_send_rtp (GstRTSPStreamTransport *trans
,GstBuffer *buffer
);
Send buffer
to the installed RTP callback for trans
.
|
a GstRTSPStreamTransport |
|
a GstBuffer |
Returns : |
TRUE on success |