[gst-devel] Capabilities API functions

zaheer at grid9.net zaheer at grid9.net
Wed Mar 14 02:19:57 CET 2001


Pads have a list of capabilities.

Each capability has a name, a type (value of capability being string, int
etc), and a list of properties.

Each property has a list of "capable" values.

I'm just gonna start the ball off on discussion of what kinda API is
required to manipulate and query this list of capabilities the pads have.

Here is a start, just for manipulation and retrieval of mimetypes .


/**
 * Adds a mimetype to a set of capabilities
 *
 * @param caps the set of capabilities to add the mimetype to
 * @param mimetype the mime type to add to the set of capabilities
 */
void gst_caps_add_mimetype (GstCaps* caps, const gchar* mimetype);

/**
 * Removes a mimetype from a set of capabilities
 *
 * @param caps the set of capabilities fromw hich to remove the mimetype
 * @param mimetype the mimetype to remove from the set of capabilities
 */
void gst_caps_remove_mimetype (GstCaps* caps, const char* mimetype);

/**
 * Queries whether a set of capabilities has a certain mime type
 *
 * @param caps the set of capabilities to query
 * @param mimetype the mime type to query the set of capabilities for
 *
 * @returns TRUE if the set of capabilities have the mime type, FALSE
otherwise
 */
gboolean gst_caps_query_mimetype(GstCaps* caps, const guchar* mimetype);

/**
 * Gets all the mime types a set of capabilities has
 * NB array returned must be freed...(however NOT its contents)
 *
 * @param caps the set of capabilities to get the mime types from
 * @param size a pointer to an integer which will be set denoting the
number of mime types in the array
 *
 * @returns an array of mime types the set of capabilities has
 */
guchar** gst_caps_get_mimetypes(GstCaps* caps, guint* size);

 
Phew, that was a mouthful...

Zaheer





More information about the gstreamer-devel mailing list