GstRTSPMountPoints

GstRTSPMountPoints — Map a path to media

Synopsis

struct              GstRTSPMountPoints;
struct              GstRTSPMountPointsClass;
GstRTSPMountPoints * gst_rtsp_mount_points_new          (void);
void                gst_rtsp_mount_points_add_factory   (GstRTSPMountPoints *mounts,
                                                         const gchar *path,
                                                         GstRTSPMediaFactory *factory);
void                gst_rtsp_mount_points_remove_factory
                                                        (GstRTSPMountPoints *mounts,
                                                         const gchar *path);
GstRTSPMediaFactory * gst_rtsp_mount_points_match       (GstRTSPMountPoints *mounts,
                                                         const gchar *path,
                                                         gint *matched);
gchar *             gst_rtsp_mount_points_make_path     (GstRTSPMountPoints *mounts,
                                                         const GstRTSPUrl *url);

Object Hierarchy

  GObject
   +----GstRTSPMountPoints

Description

A GstRTSPMountPoints object maintains a relation between paths and GstRTSPMediaFactory objects. This object is usually given to GstRTSPClient and used to find the media attached to a path.

With gst_rtsp_mount_points_add_factory() and gst_rtsp_mount_points_remove_factory(), factories can be added and removed.

With gst_rtsp_mount_points_match() you can find the GstRTSPMediaFactory object that completely matches the given path.

Last reviewed on 2013-07-11 (1.0.0)

Details

struct GstRTSPMountPoints

struct GstRTSPMountPoints;

Creates a GstRTSPMediaFactory object for a given url.


struct GstRTSPMountPointsClass

struct GstRTSPMountPointsClass {
  GObjectClass  parent_class;

  gchar * (*make_path) (GstRTSPMountPoints *mounts,
                        const GstRTSPUrl *url);
};

The class for the media mounts object.

GObjectClass parent_class;

make_path ()

make a path from the given url.

gst_rtsp_mount_points_new ()

GstRTSPMountPoints * gst_rtsp_mount_points_new          (void);

Make a new mount points object.

Returns :

a new GstRTSPMountPoints. [transfer full]

gst_rtsp_mount_points_add_factory ()

void                gst_rtsp_mount_points_add_factory   (GstRTSPMountPoints *mounts,
                                                         const gchar *path,
                                                         GstRTSPMediaFactory *factory);

Attach factory to the mount point path in mounts.

path is of the form (/node)+. Any previous mount point will be freed.

Ownership is taken of the reference on factory so that factory should not be used after calling this function.

mounts :

a GstRTSPMountPoints

path :

a mount point

factory :

a GstRTSPMediaFactory. [transfer full]

gst_rtsp_mount_points_remove_factory ()

void                gst_rtsp_mount_points_remove_factory
                                                        (GstRTSPMountPoints *mounts,
                                                         const gchar *path);

Remove the GstRTSPMediaFactory associated with path in mounts.

mounts :

a GstRTSPMountPoints

path :

a mount point

gst_rtsp_mount_points_match ()

GstRTSPMediaFactory * gst_rtsp_mount_points_match       (GstRTSPMountPoints *mounts,
                                                         const gchar *path,
                                                         gint *matched);

Find the factory in mounts that has the longest match with path.

If matched is NULL, path will match the factory exactly otherwise the amount of characters that matched is returned in matched.

mounts :

a GstRTSPMountPoints

path :

a mount point

matched :

the amount of path matched. [out][allow-none]

Returns :

the GstRTSPMediaFactory for path. g_object_unref() after usage. [transfer full]

gst_rtsp_mount_points_make_path ()

gchar *             gst_rtsp_mount_points_make_path     (GstRTSPMountPoints *mounts,
                                                         const GstRTSPUrl *url);

Make a path string from url.

mounts :

a GstRTSPMountPoints

url :

a GstRTSPUrl

Returns :

a path string for url, g_free() after usage. [transfer full]

See Also

GstRTSPMediaFactory, GstRTSPClient