GstRtspServer.RTSPSessionMedia

g GObject.Object GObject.Object GstRtspServer.RTSPSessionMedia GstRtspServer.RTSPSessionMedia GObject.Object->GstRtspServer.RTSPSessionMedia

Subclasses:None

Methods

Inherited:GObject.Object (37)
Structs:GObject.ObjectClass (5)
class new (path, media)
  alloc_channels ()
  get_base_time ()
  get_media ()
  get_rtpinfo ()
  get_rtsp_state ()
  get_transport (idx)
  get_transports ()
  matches (path)
  set_rtsp_state (state)
  set_state (state)
  set_transport (stream, tr)

Virtual Methods

Inherited:GObject.Object (7)

Properties

None

Signals

Inherited:GObject.Object (1)

Fields

Inherited:GObject.Object (1)
Name Type Access Description
parent GObject.Object r  

Class Details

class GstRtspServer.RTSPSessionMedia(**kwargs)
Bases:GObject.Object
Abstract:No
Structure:GstRtspServer.RTSPSessionMediaClass

State of a client session regarding a specific media identified by path.

classmethod new(path, media)[source]
Parameters:
Returns:

a new GstRtspServer.RTSPSessionMedia.

Return type:

GstRtspServer.RTSPSessionMedia

Create a new GstRtspServer.RTSPSessionMedia that manages the streams in media for path. media should be prepared.

Ownership is taken of media.

alloc_channels()[source]
Returns:True on success.
range:a GstRtsp.RTSPRange
Return type:(bool, range: GstRtsp.RTSPRange)

Fill range with the next available min and max channels for interleaved transport.

get_base_time()[source]
Returns:the base_time of the media.
Return type:int

Get the base_time of the GstRtspServer.RTSPMedia in self

get_media()[source]
Returns:the GstRtspServer.RTSPMedia of self. Remains valid as long as self is valid.
Return type:GstRtspServer.RTSPMedia or None

Get the GstRtspServer.RTSPMedia that was used when constructing self

get_rtpinfo()[source]
Returns:The RTP-Info as a string or None when no RTP-Info could be generated, GLib.free() after usage.
Return type:str or None

Retrieve the RTP-Info header string for all streams in self with configured transports.

get_rtsp_state()[source]
Returns:the current RTSP state of self.
Return type:GstRtsp.RTSPState

Get the current RTSP state of self.

get_transport(idx)[source]
Parameters:idx (int) – the stream index
Returns:a GstRtspServer.RTSPStreamTransport that is valid until the session of self is unreffed.
Return type:GstRtspServer.RTSPStreamTransport or None

Get a previously created GstRtspServer.RTSPStreamTransport for the stream at idx.

get_transports()[source]
Returns:a list of GstRtspServer.RTSPStreamTransport, g_ptr_array_unref () after usage.
Return type:[GstRtspServer.RTSPStreamTransport]

Get a list of all available GstRtspServer.RTSPStreamTransport in this session.

New in version 1.14.

matches(path)[source]
Parameters:path (str) – a path
Returns:True when path matches the path of self.
matched:the amount of matched characters of path
Return type:(bool, matched: int)

Check if the path of self matches path. It path matches, the amount of matched characters is returned in matched.

set_rtsp_state(state)[source]
Parameters:state (GstRtsp.RTSPState) – a GstRtsp.RTSPState

Set the RTSP state of self to state.

set_state(state)[source]
Parameters:state (Gst.State) – the new state
Returns:True on success.
Return type:bool

Tell the media object self to change to state.

set_transport(stream, tr)[source]
Parameters:
Returns:

the new or updated GstRtspServer.RTSPStreamTransport for stream.

Return type:

GstRtspServer.RTSPStreamTransport

Configure the transport for stream to tr in self.