Functions¶
Details¶
- 
GstRtsp.rtsp_auth_credentials_free(credentials)[source]¶
- Parameters: - credentials ( - GstRtsp.RTSPAuthCredential) – a- None-terminated array of- GstRtsp.RTSPAuthCredential- Free a - None-terminated array of credentials returned from- GstRtsp.RTSPMessage.parse_auth_credentials().- New in version 1.12. 
- 
GstRtsp.rtsp_connection_accept(socket, cancellable)[source]¶
- Parameters: - socket (Gio.Socket) – a socket
- cancellable (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.RTSPConnection)- Accept a new connection on socket and create a new - GstRtsp.RTSPConnectionfor handling communication on new socket.
- socket (
- 
GstRtsp.rtsp_connection_create(url)[source]¶
- Parameters: - url ( - GstRtsp.RTSPUrl) – a- GstRtsp.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, use- GstRtsp.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.Socket
- ip (str) – the IP address of the other end
- port (int) – the port used by the other end
- initial_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.RTSPConnection)- Create a new - GstRtsp.RTSPConnectionfor handling communication on the existing socket socket. The initial_buffer contains zero terminated- GstRtsp.dataalready read from socket which should be used before starting to read new- GstRtsp.data.
- socket (
- 
GstRtsp.rtsp_find_header_field(header)[source]¶
- Parameters: - header ( - str) – a header string- Returns: - a - GstRtsp.RTSPHeaderFieldfor header or- GstRtsp.RTSPHeaderField.INVALIDif the header field is unknown.- Return type: - GstRtsp.RTSPHeaderField- Convert header to a - GstRtsp.RTSPHeaderField.
- 
GstRtsp.rtsp_find_method(method)[source]¶
- Parameters: - method ( - str) – a method- Returns: - a - GstRtsp.RTSPMethodfor method or- GstRtsp.RTSPMethod.INVALIDif the method is unknown.- Return type: - GstRtsp.RTSPMethod- Convert method to a - GstRtsp.RTSPMethod.
- 
GstRtsp.rtsp_generate_digest_auth_response(algorithm, method, realm, username, password, uri, nonce)[source]¶
- Parameters: - Returns: - Authentication - GstRtsp.responseor- Noneif 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.responseor- Noneif 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) – a- GstRtsp.RTSPHeaderField- Returns: - Trueif multiple headers are allowed.- Return type: - bool- Check whether field may appear multiple times in a message. 
- 
GstRtsp.rtsp_header_as_text(field)[source]¶
- Parameters: - field ( - GstRtsp.RTSPHeaderField) – a- GstRtsp.RTSPHeaderField- Returns: - a string representation of field. - Return type: - str- Convert field to a string. 
- 
GstRtsp.rtsp_message_new()[source]¶
- Returns: - a - GstRtsp.RTSPResult.- msg: - a location for the new - GstRtsp.RTSPMessage- Return type: - ( - GstRtsp.RTSPResult, msg:- GstRtsp.RTSPMessage)- Create a new initialized - GstRtsp.RTSPMessage. Free with- GstRtsp.RTSPMessage.free().
- 
GstRtsp.rtsp_message_new_data(channel)[source]¶
- Parameters: - channel ( - int) – the channel- Returns: - a - GstRtsp.RTSPResult.- msg: - a location for the new - GstRtsp.RTSPMessage- Return type: - ( - GstRtsp.RTSPResult, msg:- GstRtsp.RTSPMessage)- Create a new - GstRtsp.data- GstRtsp.RTSPMessagewith channel and store the result message in msg. Free with- GstRtsp.RTSPMessage.free().
- 
GstRtsp.rtsp_message_new_request(method, uri)[source]¶
- Parameters: - method (GstRtsp.RTSPMethod) – theGstRtsp.requestmethod to use
- uri (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 result- GstRtsp.requestmessage in msg. Free with- GstRtsp.RTSPMessage.free().
- method (
- 
GstRtsp.rtsp_message_new_response(code, reason, request)[source]¶
- Parameters: - code (GstRtsp.RTSPStatusCode) – the status code
- reason (strorNone) – the status reason orNone
- request (GstRtsp.RTSPMessageorNone) – theGstRtsp.requestthat triggered theGstRtsp.responseorNone
 - Returns: - msg: - a location for the new - GstRtsp.RTSPMessage- Return type: - Create a new - GstRtsp.response- GstRtsp.RTSPMessagewith code and reason and store the result message in msg. Free with- GstRtsp.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 new- GstRtsp.responsemessage.
- code (
- 
GstRtsp.rtsp_method_as_text(method)[source]¶
- Parameters: - method ( - GstRtsp.RTSPMethod) – a- GstRtsp.RTSPMethod- Returns: - a string representation of method. - Return type: - str- Convert method to a string. 
- 
GstRtsp.rtsp_options_as_text(options)[source]¶
- Parameters: - options ( - GstRtsp.RTSPMethod) – one or more- GstRtsp.RTSPMethod- Returns: - a new string of options. - GLib.free() after usage.- Return type: - str- Convert options to a string. 
- 
GstRtsp.rtsp_options_from_text(options)[source]¶
- Parameters: - options ( - str) – a comma separated list of options- Returns: - a - GstRtsp.RTSPMethod- Return type: - GstRtsp.RTSPMethod- Convert the comma separated list options to a - GstRtsp.RTSPMethodbitwise or of methods. This functions is the reverse of- GstRtsp.rtsp_options_as_text().- New in version 1.2. 
- 
GstRtsp.rtsp_range_convert_units(range, unit)[source]¶
- Parameters: - range (GstRtsp.RTSPTimeRange) – aGstRtsp.RTSPTimeRange
- unit (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 for- GstRtsp.RTSPRangeUnit.NPT.
- range (
- 
GstRtsp.rtsp_range_free(range)[source]¶
- Parameters: - range ( - GstRtsp.RTSPTimeRange) – a- GstRtsp.RTSPTimeRange- Free the memory allocated by range. 
- 
GstRtsp.rtsp_range_get_times(range)[source]¶
- Parameters: - range ( - GstRtsp.RTSPTimeRange) – a- GstRtsp.RTSPTimeRange- Returns: - Trueon success.- min: - result minimum #GstClockTime - max: - result maximum #GstClockTime - Return type: - ( - bool, min:- int, max:- int)- 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 signal- GstRtsp.RTSPTimeType.NOWand- GstRtsp.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) – a- GstRtsp.RTSPTimeRange- Returns: - The string representation of range. - GLib.free() after usage.- Return type: - str- Convert range into a string representation. 
- 
GstRtsp.rtsp_status_as_text(code)[source]¶
- Parameters: - code ( - GstRtsp.RTSPStatusCode) – a- GstRtsp.RTSPStatusCode- Returns: - a string representation of code. - Return type: - str- Convert code to a string. 
- 
GstRtsp.rtsp_strresult(result)[source]¶
- Parameters: - result ( - GstRtsp.RTSPResult) – a- GstRtsp.RTSPResult- Returns: - a newly allocated string. - GLib.free() after usage.- Return type: - str- Convert result in a human readable string. 
- 
GstRtsp.rtsp_transport_get_manager(trans, option)[source]¶
- Parameters: - trans (GstRtsp.RTSPTransMode) – aGstRtsp.RTSPTransMode
- option (int) – option index.
 - Returns: - manager: - location to hold the result - Return type: - ( - GstRtsp.RTSPResult, manager:- stror- None)- 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.
- trans (
- 
GstRtsp.rtsp_transport_get_mime(trans, mime)[source]¶
- Parameters: - trans (GstRtsp.RTSPTransMode) – aGstRtsp.RTSPTransMode
- mime (str) – location to hold the result
 - Returns: - Return type: - 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 for- GstRtsp.RTSPProfile.AVP. Use- GstRtsp.RTSPTransport.get_media_type() instead.
- trans (
- 
GstRtsp.rtsp_transport_new(transport)[source]¶
- Parameters: - transport ( - GstRtsp.RTSPTransport) – location to hold the new- GstRtsp.RTSPTransport- Returns: - a - GstRtsp.RTSPResult.- Return type: - GstRtsp.RTSPResult- Allocate a new initialized - GstRtsp.RTSPTransport. Use- GstRtsp.RTSPTransport.free() after usage.
- 
GstRtsp.rtsp_transport_parse(str, transport)[source]¶
- Parameters: - str (str) – a transport string
- transport (GstRtsp.RTSPTransport) – aGstRtsp.RTSPTransport
 - Returns: - Return type: - Parse the RTSP transport string str into transport. 
- str (
- 
GstRtsp.rtsp_url_parse(urlstr)[source]¶
- Parameters: - urlstr ( - str) – the url string to parse- Returns: - a - GstRtsp.RTSPResult.- url: - location to hold the result. - Return type: - ( - GstRtsp.RTSPResult, url:- GstRtsp.RTSPUrl)- Parse the RTSP urlstr into a newly allocated - GstRtsp.RTSPUrl. Free after usage with- GstRtsp.RTSPUrl.free().
- 
GstRtsp.rtsp_version_as_text(version)[source]¶
- Parameters: - version ( - GstRtsp.RTSPVersion) – a- GstRtsp.RTSPVersion- Returns: - a string representation of version. - Return type: - str- Convert version to a string.