Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3194>
*
* 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 *
/**
* 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
*
* 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)
*
* 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)
*
* 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)
/**
* 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
*
* 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)
"address", address, "port", port, NULL);
/* Clear floating flag */
- g_object_ref_sink (ret);
+ if (ret)
+ g_object_ref_sink (ret);
return ret;
}
/**
* 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
*
* 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)
*
* 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)
/**
* 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