caps: Add a macro based variant of gst_caps_copy

This way we do not hit the performance overhead of having the method
not inlined but still can use it from bindings.
This commit is contained in:
Thibault Saunier 2018-04-17 14:00:20 -03:00
parent 11e0f451eb
commit b27ee943c2
2 changed files with 3 additions and 2 deletions

View file

@ -2556,8 +2556,7 @@ gst_caps_filter_and_map_in_place (GstCaps * caps, GstCapsFilterMapFunc func,
*
* Returns: the new #GstCaps
*/
GstCaps *
gst_caps_copy (const GstCaps * caps)
GstCaps *(gst_caps_copy) (const GstCaps * caps)
{
return GST_CAPS (gst_mini_object_copy (GST_MINI_OBJECT_CAST (caps)));
}

View file

@ -227,6 +227,8 @@ gst_caps_unref (GstCaps * caps)
GST_API
GstCaps * gst_caps_copy (const GstCaps * caps);
#define gst_caps_copy(caps) GST_CAPS (gst_mini_object_copy (GST_MINI_OBJECT_CAST (caps)))
/**
* gst_caps_is_writable:
* @caps: a #GstCaps