net: Add/fix various annotations

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3194>
This commit is contained in:
Sebastian Dröge 2022-10-15 12:20:08 +03:00 committed by GStreamer Marge Bot
parent 07f8c012c7
commit 3e7f684609
4 changed files with 13 additions and 12 deletions

View file

@ -130,7 +130,7 @@ gst_buffer_add_net_address_meta (GstBuffer * buffer, GSocketAddress * addr)
*
* Find the #GstNetAddressMeta on @buffer.
*
* Returns: (transfer none): the #GstNetAddressMeta or %NULL when there
* Returns: (transfer none) (nullable): the #GstNetAddressMeta or %NULL when there
* is no such metadata on @buffer.
*/
GstNetAddressMeta *

View file

@ -47,7 +47,7 @@ G_DEFINE_BOXED_TYPE (GstNetTimePacket, gst_net_time_packet,
/**
* gst_net_time_packet_new:
* @buffer: (array): a buffer from which to construct the packet, or NULL
* @buffer: (array zero-terminated="0" fixed-size="16") (nullable): a buffer from which to construct the packet, or NULL
*
* Creates a new #GstNetTimePacket from a buffer received over the network. The
* caller is responsible for ensuring that @buffer is at least
@ -58,7 +58,7 @@ G_DEFINE_BOXED_TYPE (GstNetTimePacket, gst_net_time_packet,
*
* MT safe. Caller owns return value (gst_net_time_packet_free to free).
*
* Returns: The new #GstNetTimePacket.
* Returns: (transfer full): The new #GstNetTimePacket.
*/
GstNetTimePacket *
gst_net_time_packet_new (const guint8 * buffer)
@ -98,7 +98,7 @@ gst_net_time_packet_free (GstNetTimePacket * packet)
*
* Make a copy of @packet.
*
* Returns: a copy of @packet, free with gst_net_time_packet_free().
* Returns: (transfer full): a copy of @packet, free with gst_net_time_packet_free().
*/
GstNetTimePacket *
gst_net_time_packet_copy (const GstNetTimePacket * packet)
@ -123,7 +123,7 @@ gst_net_time_packet_copy (const GstNetTimePacket * packet)
*
* MT safe. Caller owns return value (g_free to free).
*
* Returns: A newly allocated sequence of #GST_NET_TIME_PACKET_SIZE bytes.
* Returns: (transfer full) (array zero-terminated="0" fixed-size="16"): A newly allocated sequence of #GST_NET_TIME_PACKET_SIZE bytes.
*/
guint8 *
gst_net_time_packet_serialize (const GstNetTimePacket * packet)
@ -143,7 +143,7 @@ gst_net_time_packet_serialize (const GstNetTimePacket * packet)
/**
* gst_net_time_packet_receive:
* @socket: socket to receive the time packet on
* @src_address: (out): address of variable to return sender address
* @src_address: (out) (optional) (transfer full): address of variable to return sender address
* @error: return address for a #GError, or NULL
*
* Receives a #GstNetTimePacket over a socket. Handles interrupted system

View file

@ -456,7 +456,7 @@ gst_net_time_provider_initable_iface_init (gpointer g_iface)
*
* Allows network clients to get the current time of @clock.
*
* Returns: (transfer full): the new #GstNetTimeProvider, or NULL on error
* Returns: (transfer full) (nullable): the new #GstNetTimeProvider, or NULL on error
*/
GstNetTimeProvider *
gst_net_time_provider_new (GstClock * clock, const gchar * address, gint port)
@ -471,6 +471,7 @@ gst_net_time_provider_new (GstClock * clock, const gchar * address, gint port)
"address", address, "port", port, NULL);
/* Clear floating flag */
if (ret)
g_object_ref_sink (ret);
return ret;

View file

@ -78,7 +78,7 @@ gst_clock_time_to_ntp_timestamp_fraction (GstClockTime gst)
/**
* gst_ntp_packet_new:
* @buffer: (array): a buffer from which to construct the packet, or NULL
* @buffer: (array zero-terminated="0" fixed-size="48"): a buffer from which to construct the packet, or NULL
* @error: a #GError
*
* Creates a new #GstNtpPacket from a buffer received over the network. The
@ -182,7 +182,7 @@ gst_ntp_packet_free (GstNtpPacket * packet)
*
* Make a copy of @packet.
*
* Returns: a copy of @packet, free with gst_ntp_packet_free().
* Returns: (transfer full): a copy of @packet, free with gst_ntp_packet_free().
*/
GstNtpPacket *
gst_ntp_packet_copy (const GstNtpPacket * packet)
@ -208,7 +208,7 @@ gst_ntp_packet_copy (const GstNtpPacket * packet)
*
* MT safe. Caller owns return value (g_free to free).
*
* Returns: A newly allocated sequence of #GST_NTP_PACKET_SIZE bytes.
* Returns: (transfer full) (array zero-terminated="0" fixed-size="48"): A newly allocated sequence of #GST_NTP_PACKET_SIZE bytes.
*/
guint8 *
gst_ntp_packet_serialize (const GstNtpPacket * packet)
@ -260,7 +260,7 @@ gst_ntp_packet_serialize (const GstNtpPacket * packet)
/**
* gst_ntp_packet_receive:
* @socket: socket to receive the time packet on
* @src_address: (out): address of variable to return sender address
* @src_address: (out) (optional) (transfer full): address of variable to return sender address
* @error: return address for a #GError, or NULL
*
* Receives a #GstNtpPacket over a socket. Handles interrupted system