GstProps

Name

GstProps -- Properties

Synopsis


#include <gst/gst.h>


struct      GstProps;
typedef     GstPropsFactoryEntry;
typedef     GstPropsFactory[];
#define     GST_PROPS_LIST                  (a...)
#define     GST_PROPS_INT                   (a)
#define     GST_PROPS_INT_RANGE             (a,b)
#define     GST_PROPS_FOURCC                (a,b,c,d)
#define     GST_PROPS_FOURCC_INT            (a)
#define     GST_PROPS_BOOLEAN               (a)
GstProps*   gst_props_register              (GstPropsFactory factory);
GstProps*   gst_props_register_count        (GstPropsFactory factory,
                                             guint *counter);
GstProps*   gst_props_new                   (GstPropsFactoryEntry entry,
                                             ...);
GstProps*   gst_props_merge                 (GstProps *props,
                                             GstProps *tomerge);
gboolean    gst_props_check_compatibility   (GstProps *fromprops,
                                             GstProps *toprops);
xmlNodePtr  gst_props_save_thyself          (GstProps *props,
                                             xmlNodePtr parent);
GstProps*   gst_props_load_thyself          (xmlNodePtr parent);

Description

GstProps is used to attach certain properties to a pad. Properties are usually used in conjunction with GstCaps.

Details

struct GstProps

struct GstProps {
  GList *properties;		/* real properties for this property */
};

GList *propertiesthe properties


GstPropsFactoryEntry

typedef gpointer GstPropsFactoryEntry;


GstPropsFactory[]

typedef GstPropsFactoryEntry GstPropsFactory[];


GST_PROPS_LIST()

#define GST_PROPS_LIST(a...) GST_PROPS_LIST_ID,##a,NULL

Create a list of properties.

a... :the list of GstProps


GST_PROPS_INT()

#define GST_PROPS_INT(a) GST_PROPS_INT_ID,(GINT_TO_POINTER(a))

Create an integer property.

a :the integer property


GST_PROPS_INT_RANGE()

#define GST_PROPS_INT_RANGE(a,b) GST_PROPS_INT_RANGE_ID,(GINT_TO_POINTER(a)),(GINT_TO_POINTER(b))

Create an integer range property.

a :the min value for the range
b :the max value for the range


GST_PROPS_FOURCC()

#define GST_PROPS_FOURCC(a,b,c,d) GST_PROPS_FOURCC_ID,(GINT_TO_POINTER((a)|(b)<<8|(c)<<16|(d)<<24))

Construct a fourcc property out of four bytes.

a :first byte
b :second byte
c :third byte
d :fourth byte


GST_PROPS_FOURCC_INT()

#define GST_PROPS_FOURCC_INT(a) GST_PROPS_FOURCC_ID,(GINT_TO_POINTER(a))

Create a fourcc property out of an integer value.

a :the integer value


GST_PROPS_BOOLEAN()

#define GST_PROPS_BOOLEAN(a) GST_PROPS_BOOL_ID,(GINT_TO_POINTER(a))

Create a boolean property.

a :the boolean property


gst_props_register ()

GstProps*   gst_props_register              (GstPropsFactory factory);

Register the factory.

factory : the factory to register
Returns : the new property created from the factory


gst_props_register_count ()

GstProps*   gst_props_register_count        (GstPropsFactory factory,
                                             guint *counter);

Register the factory.

factory : the factory to register
counter : count how many fields were consumed
Returns : the new property created from the factory


gst_props_new ()

GstProps*   gst_props_new                   (GstPropsFactoryEntry entry,
                                             ...);

Create a new property from the list of entries.

entry : the property entries for the property
... : the property entries for the property
Returns : the new property created from the list of entries


gst_props_merge ()

GstProps*   gst_props_merge                 (GstProps *props,
                                             GstProps *tomerge);

Merge the properties of tomerge into props.

props : the property to merge into
tomerge : the property to merge
Returns : the new merged property


gst_props_check_compatibility ()

gboolean    gst_props_check_compatibility   (GstProps *fromprops,
                                             GstProps *toprops);

Checks whether two capabilities are compatible.

fromprops : a property
toprops : a property
Returns : TRUE if compatible, FALSE otherwise


gst_props_save_thyself ()

xmlNodePtr  gst_props_save_thyself          (GstProps *props,
                                             xmlNodePtr parent);

Saves the property into an XML representation.

props : a property to save
parent : the parent XML tree
Returns : the new XML tree


gst_props_load_thyself ()

GstProps*   gst_props_load_thyself          (xmlNodePtr parent);

Creates a new property out of an XML tree.

parent : the XML tree to load from
Returns : the new property

See Also

GstCaps