GstRtsp.RTSPUrl

Fields

Name Type Access Description
abspath str r/w the absolute path
family GstRtsp.RTSPFamily r/w the family
host str r/w the host
passwd str r/w the password
port int r/w the port
query str r/w additional query parameters
transports GstRtsp.RTSPLowerTrans r/w the transports allowed
user str r/w the user

Methods

class parse (urlstr)
  copy ()
  decode_path_components ()
  free ()
  get_port ()
  get_request_uri ()
  get_request_uri_with_control (control_path)
  set_port (port)

Details

class GstRtsp.RTSPUrl

Provides helper functions to handle RTSP urls.

classmethod 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().

copy()[source]
Returns:a copy of self. Free with GstRtsp.RTSPUrl.free () after usage.
Return type:GstRtsp.RTSPUrl

Make a copy of self.

decode_path_components()[source]
Returns:None-terminated array of URL components. Free with GLib.strfreev() when no longer needed.
Return type:[str]

Splits the path of self on ‘/’ boundaries, decoding the resulting components,

The decoding performed by this routine is “URI decoding”, as defined in RFC 3986, commonly known as percent-decoding. For example, a string “foo\%2fbar” will decode to “foo/bar” – the \%2f being replaced by the corresponding byte with hex value 0x2f. Note that there is no guarantee that the resulting byte sequence is valid in any given encoding. As a special case, \%00 is not unescaped to NUL, as that would prematurely terminate the string.

Also note that since paths usually start with a slash, the first component will usually be the empty string.

free()[source]

Free the memory used by self.

get_port()[source]
Returns:GstRtsp.RTSPResult.OK.
port:location to hold the port
Return type:(GstRtsp.RTSPResult, port: int)

Get the port number of self.

get_request_uri()[source]
Returns:a string with the GstRtsp.request URI. GLib.free() after usage.
Return type:str

Get a newly allocated string describing the GstRtsp.request URI for self.

get_request_uri_with_control(control_path)[source]
Parameters:control_path (str) – an RTSP aggregate control path
Returns:a string with the GstRtsp.request URI combined with the control path. GLib.free() after usage.
Return type:str

Get a newly allocated string describing the GstRtsp.request URI for self combined with the control path for control_path

New in version 1.18.

set_port(port)[source]
Parameters:port (int) – the port
Returns:GstRtsp.RTSPResult.OK.
Return type:GstRtsp.RTSPResult

Set the port number in self to port.