mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
caps: add empty_simple variants
This commit is contained in:
parent
4a189f80a5
commit
d9c8ab67a0
2 changed files with 25 additions and 0 deletions
|
@ -232,6 +232,30 @@ gst_caps_new_any (void)
|
|||
return caps;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_caps_new_empty_simple:
|
||||
* @media_type: the media type of the structure
|
||||
*
|
||||
* Creates a new #GstCaps that contains one #GstStructure with name
|
||||
* @media_type.
|
||||
* Caller is responsible for unreffing the returned caps.
|
||||
*
|
||||
* Returns: (transfer full): the new #GstCaps
|
||||
*/
|
||||
GstCaps *
|
||||
gst_caps_new_empty_simple (const char *media_type)
|
||||
{
|
||||
GstCaps *caps;
|
||||
GstStructure *structure;
|
||||
|
||||
caps = gst_caps_new_empty ();
|
||||
structure = gst_structure_empty_new (media_type);
|
||||
if (structure)
|
||||
gst_caps_append_structure_unchecked (caps, structure);
|
||||
|
||||
return caps;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_caps_new_simple:
|
||||
* @media_type: the media type of the structure
|
||||
|
|
|
@ -340,6 +340,7 @@ GType gst_caps_get_type (void);
|
|||
|
||||
GstCaps * gst_caps_new_empty (void);
|
||||
GstCaps * gst_caps_new_any (void);
|
||||
GstCaps * gst_caps_new_empty_simple (const char *media_type);
|
||||
GstCaps * gst_caps_new_simple (const char *media_type,
|
||||
const char *fieldname,
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
|
|
Loading…
Reference in a new issue