mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
Add GST_CAPS_NONE and GST_CAPS_ANY
Original commit message from CVS: Add GST_CAPS_NONE and GST_CAPS_ANY
This commit is contained in:
parent
9d570688de
commit
a937894b48
2 changed files with 29 additions and 0 deletions
|
@ -269,6 +269,31 @@ gst_caps_new_id (const gchar *name, const guint16 id, GstProps *props)
|
|||
return caps;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_caps_get_any:
|
||||
*
|
||||
* Return a copy of the caps that represents any capability.
|
||||
*
|
||||
* Returns: the ANY capability
|
||||
*/
|
||||
GstCaps*
|
||||
gst_caps_get_any (void)
|
||||
{
|
||||
#if 0
|
||||
static GstCaps *caps;
|
||||
|
||||
if (!caps){
|
||||
caps = GST_CAPS_NEW ("gst_caps_any", "*", NULL);
|
||||
gst_caps_ref(caps);
|
||||
gst_caps_sink(caps);
|
||||
}
|
||||
|
||||
return gst_caps_ref(caps);
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_caps_replace:
|
||||
* @oldcaps: the caps to take replace
|
||||
|
|
|
@ -57,6 +57,9 @@ typedef enum {
|
|||
#define GST_CAPS_IS_FLOATING(caps) (GST_CAPS_FLAG_IS_SET ((caps), GST_CAPS_FLOATING))
|
||||
#define GST_CAPS_IS_CHAINED(caps) (GST_CAPS_NEXT (caps) != NULL)
|
||||
|
||||
#define GST_CAPS_NONE NULL
|
||||
#define GST_CAPS_ANY (gst_caps_get_any())
|
||||
|
||||
struct _GstCaps {
|
||||
/* --- public --- */
|
||||
gchar *name; /* the name of this caps */
|
||||
|
@ -124,6 +127,7 @@ void _gst_caps_initialize (void);
|
|||
GType gst_caps_get_type (void);
|
||||
GstCaps* gst_caps_new (const gchar *name, const gchar *mime, GstProps *props);
|
||||
GstCaps* gst_caps_new_id (const gchar *name, const guint16 id, GstProps *props);
|
||||
GstCaps* gst_caps_get_any (void);
|
||||
/* replace pointer to caps, doing proper refcounting */
|
||||
void gst_caps_replace (GstCaps **oldcaps, GstCaps *newcaps);
|
||||
void gst_caps_replace_sink (GstCaps **oldcaps, GstCaps *newcaps);
|
||||
|
|
Loading…
Reference in a new issue