GstCaps

Name

GstCaps -- Capabilities of pads

Synopsis


#include <gst/gst.h>


struct      GstCaps;
typedef     GstCapsFactoryEntry;
typedef     GstCapsFactory[];
GstCaps*    gst_caps_new                    (const gchar *name,
                                             const gchar *mime);
GstCaps*    gst_caps_new_with_props         (const gchar *name,
                                             const gchar *mime,
                                             GstProps *props);
GstCaps*    gst_caps_register               (GstCapsFactory *factory);
GstCaps*    gst_caps_register_count         (GstCapsFactory *factory,
                                             guint *counter);
const gchar* gst_caps_get_name              (GstCaps *caps);
void        gst_caps_set_mime               (GstCaps *caps,
                                             const gchar *mime);
void        gst_caps_set_type_id            (GstCaps *caps,
                                             guint16 typeid);
guint16     gst_caps_get_type_id            (GstCaps *caps);
const gchar* gst_caps_get_mime              (GstCaps *caps);
void        gst_caps_set_name               (GstCaps *caps,
                                             const gchar *name);
GstCaps*    gst_caps_set_props              (GstCaps *caps,
                                             GstProps *props);
GstProps*   gst_caps_get_props              (GstCaps *caps);
gboolean    gst_caps_check_compatibility    (GstCaps *fromcaps,
                                             GstCaps *tocaps);
gboolean    gst_caps_list_check_compatibility
                                            (GList *fromcaps,
                                             GList *tocaps);
xmlNodePtr  gst_caps_save_thyself           (GstCaps *caps,
                                             xmlNodePtr parent);
GstCaps*    gst_caps_load_thyself           (xmlNodePtr parent);

Description

GstCaps is used to attach capabilities to a pad. Capabilities are made of a mime-type and a set of properties.

Details

struct GstCaps

struct GstCaps {
  gchar *name;			/* the name of this caps */

  guint16 id;			/* type id (major type) */

  GstProps *properties;		/* properties for this capability */
};

gchar *namethe name of the capability, for the application
guint16 idthe typeid of the capability
GstProps *propertiesthe properties of the capability


GstCapsFactoryEntry

typedef gpointer GstCapsFactoryEntry;


GstCapsFactory[]

typedef GstCapsFactoryEntry GstCapsFactory[];


gst_caps_new ()

GstCaps*    gst_caps_new                    (const gchar *name,
                                             const gchar *mime);

Create a new capability with the given mime type.

name : the name of this capability
mime : the mime type to attach to the capability
Returns : a new capability


gst_caps_new_with_props ()

GstCaps*    gst_caps_new_with_props         (const gchar *name,
                                             const gchar *mime,
                                             GstProps *props);

Create a new capability with the given mime type and the given properties.

name : the name of this capability
mime : the mime type to attach to the capability
props : the properties for this capability
Returns : a new capability


gst_caps_register ()

GstCaps*    gst_caps_register               (GstCapsFactory *factory);

Register the factory.

factory : the factory to register
Returns : the registered capability


gst_caps_register_count ()

GstCaps*    gst_caps_register_count         (GstCapsFactory *factory,
                                             guint *counter);

Register the factory.

factory : the factory to register
counter : count how many entries were consumed
Returns : the registered capability


gst_caps_get_name ()

const gchar* gst_caps_get_name              (GstCaps *caps);

Get the name of a GstCaps structure.

caps : the caps to get the name from
Returns : the name of the caps


gst_caps_set_mime ()

void        gst_caps_set_mime               (GstCaps *caps,
                                             const gchar *mime);

Set the mime type of the caps as a string.

caps : the caps to set the mime type to
mime : the mime type to attach to the caps


gst_caps_set_type_id ()

void        gst_caps_set_type_id            (GstCaps *caps,
                                             guint16 typeid);

Set the type id of the caps.

caps : the caps to set the type id to
typeid : the type id to set


gst_caps_get_type_id ()

guint16     gst_caps_get_type_id            (GstCaps *caps);

Get the type id of the caps.

caps : the caps to get the type id from
Returns : the type id of the caps


gst_caps_get_mime ()

const gchar* gst_caps_get_mime              (GstCaps *caps);

Get the mime type of the caps as a string.

caps : the caps to get the mime type from
Returns : the mime type of the caps


gst_caps_set_name ()

void        gst_caps_set_name               (GstCaps *caps,
                                             const gchar *name);

Set the name of a caps.

caps : the caps to set the name to
name : the name to set


gst_caps_set_props ()

GstCaps*    gst_caps_set_props              (GstCaps *caps,
                                             GstProps *props);

Set the properties to the given caps.

caps : the caps to attach the properties to
props : the properties to attach
Returns : the new caps structure


gst_caps_get_props ()

GstProps*   gst_caps_get_props              (GstCaps *caps);

Get the properties of the given caps.

caps : the caps to get the properties from
Returns : the properties of the caps


gst_caps_check_compatibility ()

gboolean    gst_caps_check_compatibility    (GstCaps *fromcaps,
                                             GstCaps *tocaps);

Checks whether two capabilities are compatible.

fromcaps : a capabilty
tocaps : a capabilty
Returns : TRUE if compatible, FALSE otherwise


gst_caps_list_check_compatibility ()

gboolean    gst_caps_list_check_compatibility
                                            (GList *fromcaps,
                                             GList *tocaps);

Checks whether two capability lists are compatible.

fromcaps : a capabilty
tocaps : a capabilty
Returns : TRUE if compatible, FALSE otherwise


gst_caps_save_thyself ()

xmlNodePtr  gst_caps_save_thyself           (GstCaps *caps,
                                             xmlNodePtr parent);

Save the capability into an XML representation.

caps : a capabilty to save
parent : the parent XML node pointer
Returns : a new XML node pointer


gst_caps_load_thyself ()

GstCaps*    gst_caps_load_thyself           (xmlNodePtr parent);

Load a new caps from the XML representation.

parent : the parent XML node pointer
Returns : a new capability