![]() |
![]() |
![]() |
GStreamer RTSP Server Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
struct GstRTSPServer; struct GstRTSPServerClass; GstRTSPServer * gst_rtsp_server_new (void
); void gst_rtsp_server_set_address (GstRTSPServer *server
,const gchar *address
); gchar * gst_rtsp_server_get_address (GstRTSPServer *server
); void gst_rtsp_server_set_service (GstRTSPServer *server
,const gchar *service
); gchar * gst_rtsp_server_get_service (GstRTSPServer *server
); void gst_rtsp_server_set_backlog (GstRTSPServer *server
,gint backlog
); gint gst_rtsp_server_get_backlog (GstRTSPServer *server
); void gst_rtsp_server_set_session_pool (GstRTSPServer *server
,GstRTSPSessionPool *pool
); GstRTSPSessionPool * gst_rtsp_server_get_session_pool (GstRTSPServer *server
); void gst_rtsp_server_set_media_mapping (GstRTSPServer *server
,GstRTSPMediaMapping *mapping
); GstRTSPMediaMapping * gst_rtsp_server_get_media_mapping (GstRTSPServer *server
); GstRTSPAuth * gst_rtsp_server_get_auth (GstRTSPServer *server
); void gst_rtsp_server_set_auth (GstRTSPServer *server
,GstRTSPAuth *auth
); gboolean gst_rtsp_server_io_func (GIOChannel *channel
,GIOCondition condition
,GstRTSPServer *server
); GIOChannel * gst_rtsp_server_get_io_channel (GstRTSPServer *server
); GSource * gst_rtsp_server_create_watch (GstRTSPServer *server
); guint gst_rtsp_server_attach (GstRTSPServer *server
,GMainContext *context
);
"address" gchar* : Read / Write "backlog" gint : Read / Write "media-mapping" GstRTSPMediaMapping* : Read / Write "service" gchar* : Read / Write "session-pool" GstRTSPSessionPool* : Read / Write
struct GstRTSPServer;
This object listens on a port, creates and manages the clients connected to it.
struct GstRTSPServerClass { GObjectClass parent_class; GstRTSPClient * (*create_client) (GstRTSPServer *server); gboolean (*accept_client) (GstRTSPServer *server, GstRTSPClient *client, GIOChannel *channel); };
create_client
: Create, configure a new GstRTSPClient
object that handles the new connection on channel
.
accept_client
: accept a new GstRTSPClient
The RTSP server class structure
GstRTSPServer * gst_rtsp_server_new (void
);
Create a new GstRTSPServer instance.
void gst_rtsp_server_set_address (GstRTSPServer *server
,const gchar *address
);
Configure server
to accept connections on the given address.
This function must be called before the server is bound.
|
a GstRTSPServer |
|
the address |
gchar * gst_rtsp_server_get_address (GstRTSPServer *server
);
Get the address on which the server will accept connections.
|
a GstRTSPServer |
Returns : |
the server address. g_free() after usage. |
void gst_rtsp_server_set_service (GstRTSPServer *server
,const gchar *service
);
Configure server
to accept connections on the given service.
service
should be a string containing the service name (see services(5)) or
a string containing a port number between 1 and 65535.
This function must be called before the server is bound.
|
a GstRTSPServer |
|
the service |
gchar * gst_rtsp_server_get_service (GstRTSPServer *server
);
Get the service on which the server will accept connections.
|
a GstRTSPServer |
Returns : |
the service. use g_free() after usage. |
void gst_rtsp_server_set_backlog (GstRTSPServer *server
,gint backlog
);
configure the maximum amount of requests that may be queued for the server.
This function must be called before the server is bound.
|
a GstRTSPServer |
|
the backlog |
gint gst_rtsp_server_get_backlog (GstRTSPServer *server
);
The maximum amount of queued requests for the server.
|
a GstRTSPServer |
Returns : |
the server backlog. |
void gst_rtsp_server_set_session_pool (GstRTSPServer *server
,GstRTSPSessionPool *pool
);
configure pool
to be used as the session pool of server
.
|
a GstRTSPServer |
|
a GstRTSPSessionPool |
GstRTSPSessionPool * gst_rtsp_server_get_session_pool (GstRTSPServer *server
);
Get the GstRTSPSessionPool used as the session pool of server
.
|
a GstRTSPServer |
Returns : |
the GstRTSPSessionPool used for sessions. g_object_unref() after
usage. |
void gst_rtsp_server_set_media_mapping (GstRTSPServer *server
,GstRTSPMediaMapping *mapping
);
configure mapping
to be used as the media mapping of server
.
|
a GstRTSPServer |
|
a GstRTSPMediaMapping |
GstRTSPMediaMapping * gst_rtsp_server_get_media_mapping (GstRTSPServer *server
);
Get the GstRTSPMediaMapping used as the media mapping of server
.
|
a GstRTSPServer |
Returns : |
the GstRTSPMediaMapping of server . g_object_unref() after
usage. |
GstRTSPAuth * gst_rtsp_server_get_auth (GstRTSPServer *server
);
Get the GstRTSPAuth used as the authentication manager of server
.
|
a GstRTSPServer |
Returns : |
the GstRTSPAuth of server . g_object_unref() after
usage. |
void gst_rtsp_server_set_auth (GstRTSPServer *server
,GstRTSPAuth *auth
);
configure auth
to be used as the authentication manager of server
.
|
a GstRTSPServer |
|
a GstRTSPAuth |
gboolean gst_rtsp_server_io_func (GIOChannel *channel
,GIOCondition condition
,GstRTSPServer *server
);
A default GIOFunc that creates a new GstRTSPClient to accept and handle a
new connection on channel
or server
.
|
a GIOChannel |
|
the condition on source
|
Returns : |
TRUE if the source could be connected, FALSE if an error occured. |
GIOChannel * gst_rtsp_server_get_io_channel (GstRTSPServer *server
);
Create a GIOChannel for server
. The io channel will listen on the
configured service.
|
a GstRTSPServer |
Returns : |
the GIOChannel for server or NULL when an error occured. |
GSource * gst_rtsp_server_create_watch (GstRTSPServer *server
);
Create a GSource for server
. The new source will have a default
GIOFunc of gst_rtsp_server_io_func()
.
|
a GstRTSPServer |
Returns : |
the GSource for server or NULL when an error occured. |
guint gst_rtsp_server_attach (GstRTSPServer *server
,GMainContext *context
);
Attaches server
to context
. When the mainloop for context
is run, the
server will be dispatched. When context
is NULL, the default context will be
used).
This function should be called when the server properties and urls are fully configured and the server is ready to start.
|
a GstRTSPServer |
|
a GMainContext |
Returns : |
the ID (greater than 0) for the source within the GMainContext. |
"address"
property"address" gchar* : Read / Write
The address the server uses to listen on.
Default value: "0.0.0.0"
"backlog"
property"backlog" gint : Read / Write
The maximum length to which the queue of pending connections may grow.
Allowed values: >= 0
Default value: 5
"media-mapping"
property"media-mapping" GstRTSPMediaMapping* : Read / Write
The media mapping to use for client session.
"service"
property"service" gchar* : Read / Write
The service or port number the server uses to listen on.
Default value: "8554"
"session-pool"
property"session-pool" GstRTSPSessionPool* : Read / Write
The session pool to use for client session.