GStreamer Base Plugins 0.10 Library Reference Manual | ||||
---|---|---|---|---|
#include <gst/rtsp/gstrtsptransport.h> enum GstRTSPTransMode; enum GstRTSPProfile; enum GstRTSPLowerTrans; GstRTSPTransport; GstRTSPResult gst_rtsp_transport_new (GstRTSPTransport **transport); GstRTSPResult gst_rtsp_transport_init (GstRTSPTransport *transport); GstRTSPResult gst_rtsp_transport_parse (const gchar *str, GstRTSPTransport *transport); gchar* gst_rtsp_transport_as_text (GstRTSPTransport *transport); GstRTSPResult gst_rtsp_transport_get_mime (GstRTSPTransMode trans, const gchar **mime); GstRTSPResult gst_rtsp_transport_get_manager (GstRTSPTransMode trans, const gchar **manager, guint option); GstRTSPResult gst_rtsp_transport_free (GstRTSPTransport *transport);
typedef enum { GST_RTSP_TRANS_UNKNOWN = 0, GST_RTSP_TRANS_RTP = (1 << 0), GST_RTSP_TRANS_RDT = (1 << 1) } GstRTSPTransMode;
The transfer mode to use.
typedef enum { GST_RTSP_PROFILE_UNKNOWN = 0, GST_RTSP_PROFILE_AVP = (1 << 0), GST_RTSP_PROFILE_SAVP = (1 << 1) } GstRTSPProfile;
The transfer profile to use.
typedef enum { GST_RTSP_LOWER_TRANS_UNKNOWN = 0, GST_RTSP_LOWER_TRANS_UDP = (1 << 0), GST_RTSP_LOWER_TRANS_UDP_MCAST = (1 << 1), GST_RTSP_LOWER_TRANS_TCP = (1 << 2), GST_RTSP_LOWER_TRANS_HTTP = (1 << 4) } GstRTSPLowerTrans;
The different transport methods.
typedef struct { GstRTSPTransMode trans; GstRTSPProfile profile; GstRTSPLowerTrans lower_transport; gchar *destination; gchar *source; guint layers; gboolean mode_play; gboolean mode_record; gboolean append; GstRTSPRange interleaved; /* multicast specific */ guint ttl; /* UDP specific */ GstRTSPRange port; GstRTSPRange client_port; GstRTSPRange server_port; /* RTP specific */ guint ssrc; } GstRTSPTransport;
A structure holding the RTSP transport values.
GstRTSPTransMode trans ; |
the transport mode |
GstRTSPProfile profile ; |
the tansport profile |
GstRTSPLowerTrans lower_transport ; |
the lower transport |
gchar *destination ; |
the destination ip/hostname |
gchar *source ; |
the source ip/hostname |
guint layers ; |
the number of layers |
gboolean mode_play ; |
if play mode was selected |
gboolean mode_record ; |
if record mode was selected |
gboolean append ; |
is append mode was selected |
GstRTSPRange interleaved ; |
the interleave range |
guint ttl ; |
the time to live for multicast UDP |
GstRTSPRange port ; |
the port pair for multicast sessions |
GstRTSPRange client_port ; |
the client port pair for receiving data |
GstRTSPRange server_port ; |
the server port pair for receiving data |
guint ssrc ; |
the ssrc that the sender/receiver will use |
GstRTSPResult gst_rtsp_transport_new (GstRTSPTransport **transport);
Allocate a new initialized GstRTSPTransport. Use gst_rtsp_transport_free()
after usage.
transport : |
location to hold the new GstRTSPTransport |
Returns : | a GstRTSPResult. |
GstRTSPResult gst_rtsp_transport_init (GstRTSPTransport *transport);
Initialize transport
so that it can be used.
transport : |
a GstRTSPTransport |
Returns : | GST_RTSP_OK. |
GstRTSPResult gst_rtsp_transport_parse (const gchar *str, GstRTSPTransport *transport);
Parse the RTSP transport string str
into transport
.
str : |
a transport string |
transport : |
a GstRTSPTransport |
Returns : | a GstRTSPResult. |
gchar* gst_rtsp_transport_as_text (GstRTSPTransport *transport);
Convert transport
into a string that can be used to signal the transport in
an RTSP SETUP response.
transport : |
a GstRTSPTransport |
Returns : | a string describing the RTSP transport or NULL when the transport is invalid. |
GstRTSPResult gst_rtsp_transport_get_mime (GstRTSPTransMode trans, const gchar **mime);
Get the mime type of the transport mode trans
. This mime type is typically
used to generate GstCaps on buffers.
trans : |
a GstRTSPTransMode |
mime : |
location to hold the result |
Returns : | GST_RTSP_OK. |
GstRTSPResult gst_rtsp_transport_get_manager (GstRTSPTransMode trans, const gchar **manager, guint option);
Get the GStreamer element that can handle the buffers transported over
trans
.
It is possible that there are several managers available, use option
to
selected one.
manager
will contain an element name or NULL when no manager is
needed/available for trans
.
trans : |
a GstRTSPTransMode |
manager : |
location to hold the result |
option : |
option index. |
Returns : | GST_RTSP_OK. |
GstRTSPResult gst_rtsp_transport_free (GstRTSPTransport *transport);
Free the memory used by transport
.
transport : |
a GstRTSPTransport |
Returns : | GST_RTSP_OK. |