GstRTSPSessionMedia

GstRTSPSessionMedia — Media managed in a session

Synopsis

struct              GstRTSPSessionMedia;
struct              GstRTSPSessionMediaClass;
GstRTSPSessionMedia * gst_rtsp_session_media_new        (const gchar *path,
                                                         GstRTSPMedia *media);
gboolean            gst_rtsp_session_media_matches      (GstRTSPSessionMedia *media,
                                                         const gchar *path,
                                                         gint *matched);
GstRTSPMedia *      gst_rtsp_session_media_get_media    (GstRTSPSessionMedia *media);
GstClockTime        gst_rtsp_session_media_get_base_time
                                                        (GstRTSPSessionMedia *media);
gchar *             gst_rtsp_session_media_get_rtpinfo  (GstRTSPSessionMedia *media);
gboolean            gst_rtsp_session_media_set_state    (GstRTSPSessionMedia *media,
                                                         GstState state);
GstRTSPState        gst_rtsp_session_media_get_rtsp_state
                                                        (GstRTSPSessionMedia *media);
void                gst_rtsp_session_media_set_rtsp_state
                                                        (GstRTSPSessionMedia *media,
                                                         GstRTSPState state);
GstRTSPStreamTransport * gst_rtsp_session_media_get_transport
                                                        (GstRTSPSessionMedia *media,
                                                         guint idx);
GstRTSPStreamTransport * gst_rtsp_session_media_set_transport
                                                        (GstRTSPSessionMedia *media,
                                                         GstRTSPStream *stream,
                                                         GstRTSPTransport *tr);
gboolean            gst_rtsp_session_media_alloc_channels
                                                        (GstRTSPSessionMedia *media,
                                                         GstRTSPRange *range);

Object Hierarchy

  GObject
   +----GstRTSPSessionMedia

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)

Details

struct GstRTSPSessionMedia

struct GstRTSPSessionMedia;

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


struct GstRTSPSessionMediaClass

struct GstRTSPSessionMediaClass {
  GObjectClass  parent_class;
};

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.

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.

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

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

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.

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.

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.

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.

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.

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.

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.

media :

a GstRTSPSessionMedia

range :

a GstRTSPRange. [out]

Returns :

TRUE on success.

See Also

GstRTSPMedia, GstRTSPSession