Callbacks¶
RTSPClientSendFunc (client, message, close, *user_data) |
|
RTSPClientSendMessagesFunc (client, messages, n_messages, close, *user_data) |
|
RTSPClientSessionFilterFunc (client, sess, *user_data) |
|
RTSPKeepAliveFunc (*user_data) |
|
RTSPMessageSentFunc (*user_data) |
|
RTSPMessageSentFuncFull (trans, *user_data) |
|
RTSPSendFunc (buffer, channel, *user_data) |
|
RTSPSendListFunc (buffer_list, channel, *user_data) |
|
RTSPServerClientFilterFunc (server, client, *user_data) |
|
RTSPSessionFilterFunc (sess, media, *user_data) |
|
RTSPSessionPoolFilterFunc (pool, session, *user_data) |
|
RTSPSessionPoolFunc (pool, *user_data) |
|
RTSPStreamTransportFilterFunc (stream, trans, *user_data) |
Details¶
-
GstRtspServer.
RTSPClientSendFunc
(client, message, close, *user_data)¶ Parameters: - client (
GstRtspServer.RTSPClient
) – aGstRtspServer.RTSPClient
- message (
GstRtsp.RTSPMessage
) – aGstRtsp.RTSPMessage
- close (
bool
) – close the connection - user_data (
object
orNone
) – userGstRtsp.data
when registering the callback
Returns: True
on success.Return type: This callback is called when client wants to send message. When close is
True
, the connection should be closed when the message has been sent.- client (
-
GstRtspServer.
RTSPClientSendMessagesFunc
(client, messages, n_messages, close, *user_data)¶ Parameters: - client (
GstRtspServer.RTSPClient
) – aGstRtspServer.RTSPClient
- messages (
GstRtsp.RTSPMessage
) –GstRtsp.RTSPMessage
- n_messages (
int
) – number of messages - close (
bool
) – close the connection - user_data (
object
orNone
) – userGstRtsp.data
when registering the callback
Returns: True
on success.Return type: This callback is called when client wants to send messages. When close is
True
, the connection should be closed when the message has been sent.New in version 1.16.
- client (
-
GstRtspServer.
RTSPClientSessionFilterFunc
(client, sess, *user_data)¶ Parameters: - client (
GstRtspServer.RTSPClient
) – aGstRtspServer.RTSPClient
object - sess (
GstRtspServer.RTSPSession
) – aGstRtspServer.RTSPSession
in client - user_data (
object
orNone
) – userGstRtsp.data
that has been given toGstRtspServer.RTSPClient.session_filter
()
Returns: Return type: This function will be called by the
GstRtspServer.RTSPClient.session_filter
(). An implementation should return a value ofGstRtspServer.RTSPFilterResult
.When this function returns
GstRtspServer.RTSPFilterResult.REMOVE
, sess will be removed from client.A return value of
GstRtspServer.RTSPFilterResult.KEEP
will leave sess untouched in client.A value of
GstRtspServer.RTSPFilterResult.REF
will add sess to the resultGLib.List
ofGstRtspServer.RTSPClient.session_filter
().- client (
-
GstRtspServer.
RTSPKeepAliveFunc
(*user_data)¶ Parameters: user_data ( object
orNone
) – userGstRtsp.data
Function registered with
GstRtspServer.RTSPStreamTransport.set_keepalive
() and called when the stream is active.
-
GstRtspServer.
RTSPMessageSentFunc
(*user_data)¶ Parameters: user_data ( object
orNone
) – userGstRtsp.data
Function registered with
GstRtspServer.RTSPStreamTransport.set_message_sent
() and called when a message has been sent on the transport.
-
GstRtspServer.
RTSPMessageSentFuncFull
(trans, *user_data)¶ Parameters: - trans (
GstRtspServer.RTSPStreamTransport
) – - user_data (
object
orNone
) – userGstRtsp.data
Function registered with
GstRtspServer.RTSPStreamTransport.set_message_sent_full
() and called when a message has been sent on the transport.New in version 1.18.
- trans (
-
GstRtspServer.
RTSPSendFunc
(buffer, channel, *user_data)¶ Parameters: - buffer (
Gst.Buffer
) – aGst.Buffer
- channel (
int
) – a channel - user_data (
object
orNone
) – userGstRtsp.data
Returns: True
on successReturn type: Function registered with
GstRtspServer.RTSPStreamTransport.set_callbacks
() and called when buffer must be sent on channel.- buffer (
-
GstRtspServer.
RTSPSendListFunc
(buffer_list, channel, *user_data)¶ Parameters: - buffer_list (
Gst.BufferList
) – aGst.BufferList
- channel (
int
) – a channel - user_data (
object
orNone
) – userGstRtsp.data
Returns: True
on successReturn type: Function registered with
GstRtspServer.RTSPStreamTransport.set_callbacks
() and called when buffer_list must be sent on channel.New in version 1.16.
- buffer_list (
-
GstRtspServer.
RTSPServerClientFilterFunc
(server, client, *user_data)¶ Parameters: - server (
GstRtspServer.RTSPServer
) – aGstRtspServer.RTSPServer
object - client (
GstRtspServer.RTSPClient
) – aGstRtspServer.RTSPClient
in server - user_data (
object
orNone
) – userGstRtsp.data
that has been given toGstRtspServer.RTSPServer.client_filter
()
Returns: Return type: This function will be called by the
GstRtspServer.RTSPServer.client_filter
(). An implementation should return a value ofGstRtspServer.RTSPFilterResult
.When this function returns
GstRtspServer.RTSPFilterResult.REMOVE
, client will be removed from server.A return value of
GstRtspServer.RTSPFilterResult.KEEP
will leave client untouched in server.A value of
GstRtspServer.RTSPFilterResult.REF
will add client to the resultGLib.List
ofGstRtspServer.RTSPServer.client_filter
().- server (
-
GstRtspServer.
RTSPSessionFilterFunc
(sess, media, *user_data)¶ Parameters: - sess (
GstRtspServer.RTSPSession
) – aGstRtspServer.RTSPSession
object - media (
GstRtspServer.RTSPSessionMedia
) – aGstRtspServer.RTSPSessionMedia
in sess - user_data (
object
orNone
) – userGstRtsp.data
that has been given toGstRtspServer.RTSPSession.filter
()
Returns: Return type: This function will be called by the
GstRtspServer.RTSPSession.filter
(). An implementation should return a value ofGstRtspServer.RTSPFilterResult
.When this function returns
GstRtspServer.RTSPFilterResult.REMOVE
, media will be removed from sess.A return value of
GstRtspServer.RTSPFilterResult.KEEP
will leave media untouched in sess.A value of
GstRtspServer.RTSPFilterResult.REF
will add media to the resultGLib.List
ofGstRtspServer.RTSPSession.filter
().- sess (
-
GstRtspServer.
RTSPSessionPoolFilterFunc
(pool, session, *user_data)¶ Parameters: - pool (
GstRtspServer.RTSPSessionPool
) – aGstRtspServer.RTSPSessionPool
object - session (
GstRtspServer.RTSPSession
) – aGstRtspServer.RTSPSession
in pool - user_data (
object
orNone
) – userGstRtsp.data
that has been given toGstRtspServer.RTSPSessionPool.filter
()
Returns: Return type: This function will be called by the
GstRtspServer.RTSPSessionPool.filter
(). An implementation should return a value ofGstRtspServer.RTSPFilterResult
.When this function returns
GstRtspServer.RTSPFilterResult.REMOVE
, session will be removed from pool.A return value of
GstRtspServer.RTSPFilterResult.KEEP
will leave session untouched in pool.A value of
GstRtspServer.RTSPFilterResult.REF
will add session to the resultGLib.List
ofGstRtspServer.RTSPSessionPool.filter
().- pool (
-
GstRtspServer.
RTSPSessionPoolFunc
(pool, *user_data)¶ Parameters: - pool (
GstRtspServer.RTSPSessionPool
) – aGstRtspServer.RTSPSessionPool
object - user_data (
object
orNone
) – userGstRtsp.data
that has been given when registering the handler
Returns: False
if the source should be removed.Return type: The function that will be called from the
GLib.Source
watch on the session pool.The function will be called when the pool must be cleaned up because one or more sessions timed out.
- pool (
-
GstRtspServer.
RTSPStreamTransportFilterFunc
(stream, trans, *user_data)¶ Parameters: - stream (
GstRtspServer.RTSPStream
) – aGstRtspServer.RTSPStream
object - trans (
GstRtspServer.RTSPStreamTransport
) – aGstRtspServer.RTSPStreamTransport
in stream - user_data (
object
orNone
) – userGstRtsp.data
that has been given toGstRtspServer.RTSPStream.transport_filter
()
Returns: Return type: This function will be called by the
GstRtspServer.RTSPStream.transport_filter
(). An implementation should return a value ofGstRtspServer.RTSPFilterResult
.When this function returns
GstRtspServer.RTSPFilterResult.REMOVE
, trans will be removed from stream.A return value of
GstRtspServer.RTSPFilterResult.KEEP
will leave trans untouched in stream.A value of
GstRtspServer.RTSPFilterResult.REF
will add trans to the resultGLib.List
ofGstRtspServer.RTSPStream.transport_filter
().- stream (