Callbacks¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- GstRtspServer.RTSPClientSendFunc(client, message, close, *user_data)¶
- Parameters:
client (
GstRtspServer.RTSPClient
) – aGstRtspServer.RTSPClient
message (
GstRtsp.RTSPMessage
) – aGstRtsp.RTSPMessage
close (
bool
) – close the connectionuser_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.
- 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 messagesclose (
bool
) – close the connectionuser_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.
- GstRtspServer.RTSPClientSessionFilterFunc(client, sess, *user_data)¶
- Parameters:
client (
GstRtspServer.RTSPClient
) – aGstRtspServer.RTSPClient
objectsess (
GstRtspServer.RTSPSession
) – aGstRtspServer.RTSPSession
in clientuser_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
().
- GstRtspServer.RTSPKeepAliveFunc(*user_data)¶
-
Function registered with
GstRtspServer.RTSPStreamTransport.set_keepalive
() and called when the stream is active.
- GstRtspServer.RTSPMessageSentFunc(*user_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
) –
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.
- GstRtspServer.RTSPSendFunc(buffer, channel, *user_data)¶
- Parameters:
buffer (
Gst.Buffer
) – aGst.Buffer
channel (
int
) – a channel
- Returns:
True
on success- Return type:
Function registered with
GstRtspServer.RTSPStreamTransport.set_callbacks
() and called when buffer must be sent on channel.
- GstRtspServer.RTSPSendListFunc(buffer_list, channel, *user_data)¶
- Parameters:
buffer_list (
Gst.BufferList
) – aGst.BufferList
channel (
int
) – a channel
- Returns:
True
on success- Return type:
Function registered with
GstRtspServer.RTSPStreamTransport.set_callbacks
() and called when buffer_list must be sent on channel.New in version 1.16.
- GstRtspServer.RTSPServerClientFilterFunc(server, client, *user_data)¶
- Parameters:
server (
GstRtspServer.RTSPServer
) – aGstRtspServer.RTSPServer
objectclient (
GstRtspServer.RTSPClient
) – aGstRtspServer.RTSPClient
in serveruser_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
().
- GstRtspServer.RTSPSessionFilterFunc(sess, media, *user_data)¶
- Parameters:
sess (
GstRtspServer.RTSPSession
) – aGstRtspServer.RTSPSession
objectmedia (
GstRtspServer.RTSPSessionMedia
) – aGstRtspServer.RTSPSessionMedia
in sessuser_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
().
- GstRtspServer.RTSPSessionPoolFilterFunc(pool, session, *user_data)¶
- Parameters:
pool (
GstRtspServer.RTSPSessionPool
) – aGstRtspServer.RTSPSessionPool
objectsession (
GstRtspServer.RTSPSession
) – aGstRtspServer.RTSPSession
in pooluser_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
().
- GstRtspServer.RTSPSessionPoolFunc(pool, *user_data)¶
- Parameters:
pool (
GstRtspServer.RTSPSessionPool
) – aGstRtspServer.RTSPSessionPool
objectuser_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.
- GstRtspServer.RTSPStreamTransportFilterFunc(stream, trans, *user_data)¶
- Parameters:
stream (
GstRtspServer.RTSPStream
) – aGstRtspServer.RTSPStream
objecttrans (
GstRtspServer.RTSPStreamTransport
) – aGstRtspServer.RTSPStreamTransport
in streamuser_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
().