Commit 85b93fa3 authored by Stian Selnes's avatar Stian Selnes Committed by Tim-Philipp Müller
Browse files

netaddressmeta: gst_buffer_get_net_address_meta() as function

Implement gst_buffer_get_net_address_meta() as a function instead
of a macro in order to get gobject-introspection to work.

https://bugzilla.gnome.org/show_bug.cgi?id=702921
parent 5af73b30
......@@ -119,3 +119,19 @@ gst_buffer_add_net_address_meta (GstBuffer * buffer, GSocketAddress * addr)
return meta;
}
/**
* gst_buffer_get_net_address_meta:
* @buffer: a #GstBuffer
*
* Find the #GstNetAddressMeta on @buffer.
*
* Returns: (transfer none): the #GstNetAddressMeta or %NULL when there
* is no such metadata on @buffer.
*/
GstNetAddressMeta *
gst_buffer_get_net_address_meta (GstBuffer * buffer)
{
return (GstNetAddressMeta *)
gst_buffer_get_meta (buffer, GST_NET_ADDRESS_META_API_TYPE);
}
......@@ -43,15 +43,13 @@ struct _GstNetAddressMeta {
GType gst_net_address_meta_api_get_type (void);
#define GST_NET_ADDRESS_META_API_TYPE (gst_net_address_meta_api_get_type())
#define gst_buffer_get_net_address_meta(b) \
((GstNetAddressMeta*)gst_buffer_get_meta((b),GST_NET_ADDRESS_META_API_TYPE))
/* implementation */
const GstMetaInfo *gst_net_address_meta_get_info (void);
#define GST_NET_ADDRESS_META_INFO (gst_net_address_meta_get_info())
GstNetAddressMeta * gst_buffer_add_net_address_meta (GstBuffer *buffer,
GSocketAddress *addr);
GstNetAddressMeta * gst_buffer_get_net_address_meta (GstBuffer *buffer);
G_END_DECLS
......
EXPORTS
gst_buffer_add_net_address_meta
gst_buffer_add_net_control_message_meta
gst_buffer_get_net_address_meta
gst_net_address_meta_api_get_type
gst_net_address_meta_get_info
gst_net_client_clock_get_type
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment