Functions¶
Details¶
- GstRtsp.rtsp_auth_credentials_free(credentials)[source]¶
 - Parameters:
 credentials (
GstRtsp.RTSPAuthCredential) – aNone-terminated array ofGstRtsp.RTSPAuthCredential
Free a
None-terminated array of credentials returned fromGstRtsp.RTSPMessage.parse_auth_credentials().New in version 1.12.
- GstRtsp.rtsp_connection_accept(socket, cancellable)[source]¶
 - Parameters:
 socket (
Gio.Socket) – a socketcancellable (
Gio.CancellableorNone) – aGio.Cancellableto cancel the operation
- Returns:
 GstRtsp.RTSPResult.OKwhen conn contains a valid connection.- conn:
 storage for a
GstRtsp.RTSPConnection
- Return type:
 (
GstRtsp.RTSPResult, conn:GstRtsp.RTSPConnectionorNone)
Accept a new connection on socket and create a new
GstRtsp.RTSPConnectionfor handling communication on new socket.
- GstRtsp.rtsp_connection_create(url)[source]¶
 - Parameters:
 url (
GstRtsp.RTSPUrl) – aGstRtsp.RTSPUrl- Returns:
 GstRtsp.RTSPResult.OKwhen conn contains a valid connection.- conn:
 storage for a
GstRtsp.RTSPConnection
- Return type:
 (
GstRtsp.RTSPResult, conn:GstRtsp.RTSPConnection)
Create a newly allocated
GstRtsp.RTSPConnectionfrom url and store it in conn. The connection will not yet attempt to connect to url, useGstRtsp.RTSPConnection.connect().A copy of url will be made.
- GstRtsp.rtsp_connection_create_from_socket(socket, ip, port, initial_buffer)[source]¶
 - Parameters:
 socket (
Gio.Socket) – aGio.Socketip (
str) – the IP address of the other endport (
int) – the port used by the other endinitial_buffer (
str) –GstRtsp.dataalready read from fd
- Returns:
 GstRtsp.RTSPResult.OKwhen conn contains a valid connection.- conn:
 storage for a
GstRtsp.RTSPConnection
- Return type:
 (
GstRtsp.RTSPResult, conn:GstRtsp.RTSPConnectionorNone)
Create a new
GstRtsp.RTSPConnectionfor handling communication on the existing socket socket. The initial_buffer contains zero terminatedGstRtsp.dataalready read from socket which should be used before starting to read newGstRtsp.data.
- GstRtsp.rtsp_find_header_field(header)[source]¶
 - Parameters:
 header (
str) – a header string- Returns:
 a
GstRtsp.RTSPHeaderFieldfor header orGstRtsp.RTSPHeaderField.INVALIDif the header field is unknown.- Return type:
 
Convert header to a
GstRtsp.RTSPHeaderField.
- GstRtsp.rtsp_find_method(method)[source]¶
 - Parameters:
 method (
str) – a method- Returns:
 a
GstRtsp.RTSPMethodfor method orGstRtsp.RTSPMethod.INVALIDif the method is unknown.- Return type:
 
Convert method to a
GstRtsp.RTSPMethod.
- GstRtsp.rtsp_generate_digest_auth_response(algorithm, method, realm, username, password, uri, nonce)[source]¶
 - Parameters:
 - Returns:
 Authentication
GstRtsp.responseorNoneif unsupported- Return type:
 
Calculates the digest auth
GstRtsp.responsefrom the values given by the server and the username and password. See RFC2069 for details.Currently only supported algorithm “md5”.
New in version 1.12.
- GstRtsp.rtsp_generate_digest_auth_response_from_md5(algorithm, method, md5, uri, nonce)[source]¶
 - Parameters:
 - Returns:
 Authentication
GstRtsp.responseorNoneif unsupported- Return type:
 
Calculates the digest auth
GstRtsp.responsefrom the values given by the server and the md5sum. See RFC2069 for details.This function is useful when the passwords are not stored in clear text, but instead in the same format as the .htdigest file.
Currently only supported algorithm “md5”.
New in version 1.16.
- GstRtsp.rtsp_header_allow_multiple(field)[source]¶
 - Parameters:
 field (
GstRtsp.RTSPHeaderField) – aGstRtsp.RTSPHeaderField- Returns:
 Trueif multiple headers are allowed.- Return type:
 
Check whether field may appear multiple times in a message.
- GstRtsp.rtsp_header_as_text(field)[source]¶
 - Parameters:
 field (
GstRtsp.RTSPHeaderField) – aGstRtsp.RTSPHeaderField- Returns:
 a string representation of field.
- Return type:
 
Convert field to a string.
- GstRtsp.rtsp_message_new()[source]¶
 - Returns:
 - 
- msg:
 a location for the new
GstRtsp.RTSPMessage
 - Return type:
 
Create a new initialized
GstRtsp.RTSPMessage. Free withGstRtsp.RTSPMessage.free().
- GstRtsp.rtsp_message_new_data(channel)[source]¶
 - Parameters:
 channel (
int) – the channel- Returns:
 - 
- msg:
 a location for the new
GstRtsp.RTSPMessage
 - Return type:
 
Create a new
GstRtsp.dataGstRtsp.RTSPMessagewith channel and store the result message in msg. Free withGstRtsp.RTSPMessage.free().
- GstRtsp.rtsp_message_new_request(method, uri)[source]¶
 - Parameters:
 method (
GstRtsp.RTSPMethod) – theGstRtsp.requestmethod to useuri (
str) – the uri of theGstRtsp.request
- Returns:
 - 
- msg:
 a location for the new
GstRtsp.RTSPMessage
 - Return type:
 
Create a new
GstRtsp.RTSPMessagewith method and uri and store the resultGstRtsp.requestmessage in msg. Free withGstRtsp.RTSPMessage.free().
- GstRtsp.rtsp_message_new_response(code, reason, request)[source]¶
 - Parameters:
 code (
GstRtsp.RTSPStatusCode) – the status coderequest (
GstRtsp.RTSPMessageorNone) – theGstRtsp.requestthat triggered theGstRtsp.responseorNone
- Returns:
 - 
- msg:
 a location for the new
GstRtsp.RTSPMessage
 - Return type:
 
Create a new
GstRtsp.responseGstRtsp.RTSPMessagewith code and reason and store the result message in msg. Free withGstRtsp.RTSPMessage.free().When reason is
None, the default reason for code will be used.When request is not
None, the relevant headers will be copied to the newGstRtsp.responsemessage.
- GstRtsp.rtsp_method_as_text(method)[source]¶
 - Parameters:
 method (
GstRtsp.RTSPMethod) – aGstRtsp.RTSPMethod- Returns:
 a string representation of method.
- Return type:
 
Convert method to a string.
- GstRtsp.rtsp_options_as_text(options)[source]¶
 - Parameters:
 options (
GstRtsp.RTSPMethod) – one or moreGstRtsp.RTSPMethod- Returns:
 a new string of options.
GLib.free() after usage.- Return type:
 
Convert options to a string.
- GstRtsp.rtsp_options_from_text(options)[source]¶
 - Parameters:
 options (
str) – a comma separated list of options- Returns:
 - Return type:
 
Convert the comma separated list options to a
GstRtsp.RTSPMethodbitwise or of methods. This functions is the reverse ofGstRtsp.rtsp_options_as_text().New in version 1.2.
- GstRtsp.rtsp_range_convert_units(range, unit)[source]¶
 - Parameters:
 range (
GstRtsp.RTSPTimeRange) – aGstRtsp.RTSPTimeRangeunit (
GstRtsp.RTSPRangeUnit) – the unit to convert the range into
- Returns:
 Trueif the range could be converted- Return type:
 
Converts the range in-place between different types of units. Ranges containing the special value
GstRtsp.RTSPTimeType.NOWcan not be converted as these are only valid forGstRtsp.RTSPRangeUnit.NPT.
- GstRtsp.rtsp_range_free(range)[source]¶
 - Parameters:
 range (
GstRtsp.RTSPTimeRange) – aGstRtsp.RTSPTimeRange
Free the memory allocated by range.
- GstRtsp.rtsp_range_get_times(range)[source]¶
 - Parameters:
 range (
GstRtsp.RTSPTimeRange) – aGstRtsp.RTSPTimeRange- Returns:
 Trueon success.- min:
 result minimum #GstClockTime
- max:
 result maximum #GstClockTime
- Return type:
 
Retrieve the minimum and maximum values from range converted to #GstClockTime in min and max.
A value of
Gst.CLOCK_TIME_NONEwill be used to signalGstRtsp.RTSPTimeType.NOWandGstRtsp.RTSPTimeType.ENDfor min and max respectively.UTC times will be converted to nanoseconds since 1900.
New in version 1.2.
- GstRtsp.rtsp_range_parse(rangestr)[source]¶
 - Parameters:
 rangestr (
str) – a range string to parse- Returns:
 GstRtsp.RTSPResult.OKon success.- range:
 location to hold the
GstRtsp.RTSPTimeRangeresult
- Return type:
 (
GstRtsp.RTSPResult, range:GstRtsp.RTSPTimeRange)
Parse rangestr to a
GstRtsp.RTSPTimeRange.
- GstRtsp.rtsp_range_to_string(range)[source]¶
 - Parameters:
 range (
GstRtsp.RTSPTimeRange) – aGstRtsp.RTSPTimeRange- Returns:
 The string representation of range.
GLib.free() after usage.- Return type:
 
Convert range into a string representation.
- GstRtsp.rtsp_status_as_text(code)[source]¶
 - Parameters:
 code (
GstRtsp.RTSPStatusCode) – aGstRtsp.RTSPStatusCode- Returns:
 a string representation of code.
- Return type:
 
Convert code to a string.
- GstRtsp.rtsp_strresult(result)[source]¶
 - Parameters:
 result (
GstRtsp.RTSPResult) – aGstRtsp.RTSPResult- Returns:
 a newly allocated string.
GLib.free() after usage.- Return type:
 
Convert result in a human readable string.
- GstRtsp.rtsp_transport_get_manager(trans, option)[source]¶
 - Parameters:
 trans (
GstRtsp.RTSPTransMode) – aGstRtsp.RTSPTransModeoption (
int) – option index.
- Returns:
 - 
- manager:
 location to hold the result
 - Return type:
 (
GstRtsp.RTSPResult, manager:strorNone)
Get the
Gst.Elementthat 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
Nonewhen no manager is needed/available for trans.
- GstRtsp.rtsp_transport_get_mime(trans)[source]¶
 - Parameters:
 trans (
GstRtsp.RTSPTransMode) – aGstRtsp.RTSPTransMode- Returns:
 - 
- mime:
 location to hold the result
 - Return type:
 (
GstRtsp.RTSPResult, mime:str)
Get the mime type of the transport mode trans. This mime type is typically used to generate
Gst.Capsevents.Deprecated since version ???: This functions only deals with the
GstRtsp.RTSPTransModeand only returns the mime type forGstRtsp.RTSPProfile.AVP. UseGstRtsp.RTSPTransport.get_media_type() instead.
- GstRtsp.rtsp_transport_init()[source]¶
 - Returns:
 - 
- transport:
 
 - Return type:
 (
GstRtsp.RTSPResult, transport:GstRtsp.RTSPTransport)
Initialize transport so that it can be used.
- GstRtsp.rtsp_transport_new()[source]¶
 - Returns:
 - 
- transport:
 location to hold the new
GstRtsp.RTSPTransport
 - Return type:
 (
GstRtsp.RTSPResult, transport:GstRtsp.RTSPTransport)
Allocate a new initialized
GstRtsp.RTSPTransport. UseGstRtsp.RTSPTransport.free() after usage.
- GstRtsp.rtsp_transport_parse(str)[source]¶
 - Parameters:
 str (
str) – a transport string- Returns:
 - 
- transport:
 
 - Return type:
 (
GstRtsp.RTSPResult, transport:GstRtsp.RTSPTransport)
Parse the RTSP transport string str into transport.
- GstRtsp.rtsp_url_parse(urlstr)[source]¶
 - Parameters:
 urlstr (
str) – the url string to parse- Returns:
 - 
- url:
 location to hold the result.
 - Return type:
 (
GstRtsp.RTSPResult, url:GstRtsp.RTSPUrlorNone)
Parse the RTSP urlstr into a newly allocated
GstRtsp.RTSPUrl. Free after usage withGstRtsp.RTSPUrl.free().
- GstRtsp.rtsp_version_as_text(version)[source]¶
 - Parameters:
 version (
GstRtsp.RTSPVersion) – aGstRtsp.RTSPVersion- Returns:
 a string representation of version.
- Return type:
 
Convert version to a string.