GstRtsp.RTSPRange

Fields

Name

Type

Access

Description

max

int

r/w

maximum value of the range

min

int

r/w

minimum value of the range

Methods

class

convert_units (range, unit)

class

free (range)

class

get_times (range)

class

parse (rangestr)

class

to_string (range)

Details

class GstRtsp.RTSPRange

Provides helper functions to deal with time ranges.

classmethod convert_units(range, unit)
Parameters:
Returns:

True if the range could be converted

Return type:

bool

Converts the range in-place between different types of units. Ranges containing the special value GstRtsp.RTSPTimeType.NOW can not be converted as these are only valid for GstRtsp.RTSPRangeUnit.NPT.

classmethod free(range)
Parameters:

range (GstRtsp.RTSPTimeRange) – a GstRtsp.RTSPTimeRange

Free the memory allocated by range.

classmethod get_times(range)
Parameters:

range (GstRtsp.RTSPTimeRange) – a GstRtsp.RTSPTimeRange

Returns:

True on 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_NONE will be used to signal GstRtsp.RTSPTimeType.NOW and GstRtsp.RTSPTimeType.END for min and max respectively.

UTC times will be converted to nanoseconds since 1900.

New in version 1.2.

classmethod parse(rangestr)
Parameters:

rangestr (str) – a range string to parse

Returns:

GstRtsp.RTSPResult.OK on success.

range:

location to hold the GstRtsp.RTSPTimeRange result

Return type:

(GstRtsp.RTSPResult, range: GstRtsp.RTSPTimeRange)

Parse rangestr to a GstRtsp.RTSPTimeRange.

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