GstRTSPSessionMedia

GstRTSPSessionMedia — Media managed in a session

Functions

Types and Values

Description

The GstRTSPSessionMedia object manages a GstRTSPMedia with a given path.

With gst_rtsp_session_media_get_transport() and gst_rtsp_session_media_set_transport() the transports of a GstRTSPStream of the managed GstRTSPMedia can be retrieved and configured.

Use gst_rtsp_session_media_set_state() to control the media state and transports.

Last reviewed on 2013-07-16 (1.0.0)

Functions

gst_rtsp_session_media_new ()

GstRTSPSessionMedia *
gst_rtsp_session_media_new (const gchar *path,
                            GstRTSPMedia *media);

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

Ownership is taken of media .

Parameters

path

the path

 

media

the GstRTSPMedia.

[transfer full]

Returns

a new GstRTSPSessionMedia.

[transfer full]


gst_rtsp_session_media_matches ()

gboolean
gst_rtsp_session_media_matches (GstRTSPSessionMedia *media,
                                const gchar *path,
                                gint *matched);

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

Parameters

media

a GstRTSPSessionMedia

 

path

a path

 

matched

the amount of matched characters of path .

[out]

Returns

TRUE when path matches the path of media .


gst_rtsp_session_media_get_media ()

GstRTSPMedia *
gst_rtsp_session_media_get_media (GstRTSPSessionMedia *media);

Get the GstRTSPMedia that was used when constructing media

Parameters

media

a GstRTSPSessionMedia

 

Returns

the GstRTSPMedia of media . Remains valid as long as media is valid.

[transfer none]


gst_rtsp_session_media_get_base_time ()

GstClockTime
gst_rtsp_session_media_get_base_time (GstRTSPSessionMedia *media);

Get the base_time of the GstRTSPMedia in media

Parameters

media

a GstRTSPSessionMedia

 

Returns

the base_time of the media.


gst_rtsp_session_media_get_rtpinfo ()

gchar *
gst_rtsp_session_media_get_rtpinfo (GstRTSPSessionMedia *media);

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

Parameters

media

a GstRTSPSessionMedia

 

Returns

The RTP-Info as a string or NULL when no RTP-Info could be generated, g_free() after usage.

[transfer full][nullable]


gst_rtsp_session_media_set_state ()

gboolean
gst_rtsp_session_media_set_state (GstRTSPSessionMedia *media,
                                  GstState state);

Tell the media object media to change to state .

Parameters

media

a GstRTSPSessionMedia

 

state

the new state

 

Returns

TRUE on success.


gst_rtsp_session_media_get_rtsp_state ()

GstRTSPState
gst_rtsp_session_media_get_rtsp_state (GstRTSPSessionMedia *media);

Get the current RTSP state of media .

Parameters

media

a GstRTSPSessionMedia

 

Returns

the current RTSP state of media .


gst_rtsp_session_media_set_rtsp_state ()

void
gst_rtsp_session_media_set_rtsp_state (GstRTSPSessionMedia *media,
                                       GstRTSPState state);

Set the RTSP state of media to state .

Parameters

media

a GstRTSPSessionMedia

 

state

a GstRTSPState

 

gst_rtsp_session_media_get_transport ()

GstRTSPStreamTransport *
gst_rtsp_session_media_get_transport (GstRTSPSessionMedia *media,
                                      guint idx);

Get a previously created GstRTSPStreamTransport for the stream at idx .

Parameters

media

a GstRTSPSessionMedia

 

idx

the stream index

 

Returns

a GstRTSPStreamTransport that is valid until the session of media is unreffed.

[transfer none]


gst_rtsp_session_media_set_transport ()

GstRTSPStreamTransport *
gst_rtsp_session_media_set_transport (GstRTSPSessionMedia *media,
                                      GstRTSPStream *stream,
                                      GstRTSPTransport *tr);

Configure the transport for stream to tr in media .

Parameters

media

a GstRTSPSessionMedia

 

stream

a GstRTSPStream

 

tr

a GstRTSPTransport.

[transfer full]

Returns

the new or updated GstRTSPStreamTransport for stream .

[transfer none]


gst_rtsp_session_media_alloc_channels ()

gboolean
gst_rtsp_session_media_alloc_channels (GstRTSPSessionMedia *media,
                                       GstRTSPRange *range);

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

Parameters

media

a GstRTSPSessionMedia

 

range

a GstRTSPRange.

[out]

Returns

TRUE on success.

Types and Values

struct GstRTSPSessionMedia

struct GstRTSPSessionMedia {
  GObject  parent;
};

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


struct GstRTSPSessionMediaClass

struct GstRTSPSessionMediaClass {
  GObjectClass  parent_class;
};

See Also

GstRTSPMedia, GstRTSPSession