From f21c4667b934a11e04c8bcd4693c8c5d6fe1f08a Mon Sep 17 00:00:00 2001 From: Evan Nemerson Date: Fri, 6 Jul 2012 23:42:13 -0700 Subject: [PATCH] rtp: add many missing annotations on RTP/RTCP buffer functions --- gst-libs/gst/rtp/gstrtcpbuffer.c | 16 +++++------ gst-libs/gst/rtp/gstrtpbaseaudiopayload.h | 1 + gst-libs/gst/rtp/gstrtpbuffer.c | 34 +++++++++++++---------- 3 files changed, 29 insertions(+), 22 deletions(-) diff --git a/gst-libs/gst/rtp/gstrtcpbuffer.c b/gst-libs/gst/rtp/gstrtcpbuffer.c index 2399c8ec71..c9299a7939 100644 --- a/gst-libs/gst/rtp/gstrtcpbuffer.c +++ b/gst-libs/gst/rtp/gstrtcpbuffer.c @@ -50,7 +50,7 @@ /** * gst_rtcp_buffer_new_take_data: - * @data: data for the new buffer + * @data: (array length=len) (element-type guint8): data for the new buffer * @len: the length of data * * Create a new buffer and set the data and size of the buffer to @data and @len @@ -74,7 +74,7 @@ gst_rtcp_buffer_new_take_data (gpointer data, guint len) /** * gst_rtcp_buffer_new_copy_data: - * @data: data for the new buffer + * @data: (array length=len) (element-type guint8): data for the new buffer * @len: the length of data * * Create a new buffer and set the data to a copy of @len @@ -91,7 +91,7 @@ gst_rtcp_buffer_new_copy_data (gpointer data, guint len) /** * gst_rtcp_buffer_validate_data: - * @data: the data to validate + * @data: (array length=len): the data to validate * @len: the length of @data to validate * * Check if the @data and @size point to the data of a valid RTCP (compound) @@ -1174,8 +1174,8 @@ gst_rtcp_packet_sdes_next_entry (GstRTCPPacket * packet) * gst_rtcp_packet_sdes_get_entry: * @packet: a valid SDES #GstRTCPPacket * @type: result of the entry type - * @len: result length of the entry data - * @data: result entry data + * @len: (out): result length of the entry data + * @data: (out) (array length=len) (transfer none): result entry data * * Get the data of the current SDES item entry. @type (when not NULL) will * contain the type of the entry. @data (when not NULL) will point to @len @@ -1224,8 +1224,8 @@ gst_rtcp_packet_sdes_get_entry (GstRTCPPacket * packet, * gst_rtcp_packet_sdes_copy_entry: * @packet: a valid SDES #GstRTCPPacket * @type: result of the entry type - * @len: result length of the entry data - * @data: result entry data + * @len: (out): result length of the entry data + * @data: (out) (array length=len): result entry data * * This function is like gst_rtcp_packet_sdes_get_entry() but it returns a * null-terminated copy of the data instead. use g_free() after usage. @@ -1331,7 +1331,7 @@ no_next: * @packet: a valid SDES #GstRTCPPacket * @type: the #GstRTCPSDESType of the SDES entry * @len: the data length - * @data: the data + * @data: (array length=len): the data * * Add a new SDES entry to the current item in @packet. * diff --git a/gst-libs/gst/rtp/gstrtpbaseaudiopayload.h b/gst-libs/gst/rtp/gstrtpbaseaudiopayload.h index 6a9ae12353..a6dedd868f 100644 --- a/gst-libs/gst/rtp/gstrtpbaseaudiopayload.h +++ b/gst-libs/gst/rtp/gstrtpbaseaudiopayload.h @@ -58,6 +58,7 @@ struct _GstRTPBaseAudioPayload gint sample_size; + /*< private >*/ gpointer _gst_reserved[GST_PADDING]; }; diff --git a/gst-libs/gst/rtp/gstrtpbuffer.c b/gst-libs/gst/rtp/gstrtpbuffer.c index 9b201af884..4a610e3fa2 100644 --- a/gst-libs/gst/rtp/gstrtpbuffer.c +++ b/gst-libs/gst/rtp/gstrtpbuffer.c @@ -134,7 +134,8 @@ gst_rtp_buffer_allocate_data (GstBuffer * buffer, guint payload_len, /** * gst_rtp_buffer_new_take_data: - * @data: data for the new buffer + * @data: (array length=len) (transfer full) (element-type guint8): + * data for the new buffer * @len: the length of data * * Create a new buffer and set the data and size of the buffer to @data and @len @@ -154,7 +155,8 @@ gst_rtp_buffer_new_take_data (gpointer data, gsize len) /** * gst_rtp_buffer_new_copy_data: - * @data: data for the new buffer + * @data: (array length=len) (element-type guint8): data for the new + * buffer * @len: the length of data * * Create a new buffer and set the data to a copy of @len @@ -377,7 +379,8 @@ dump_packet: /** * gst_rtp_buffer_validate_data: - * @data: the data to validate + * @data: (array length=len) (element-type guint8): the data to + * validate * @len: the length of @data to validate * * Check if the @data and @size point to the data of a valid RTP packet. @@ -626,9 +629,9 @@ gst_rtp_buffer_set_extension (GstRTPBuffer * rtp, gboolean extension) /** * gst_rtp_buffer_get_extension_data: * @rtp: the RTP packet - * @bits: location for result bits - * @data: location for data - * @wordlen: location for length of @data in 32 bits words + * @bits: (out): location for result bits + * @data: (out) (array) (element-type guint8) (transfer none): location for data + * @wordlen: (out): location for length of @data in 32 bits words * * Get the extension data. @bits will contain the extension 16 bits of custom * data. @data will point to the data in the extension and @wordlen will contain @@ -997,7 +1000,8 @@ gst_rtp_buffer_get_payload_len (GstRTPBuffer * rtp) * Get a pointer to the payload data in @buffer. This pointer is valid as long * as a reference to @buffer is held. * - * Returns: A pointer to the payload data in @buffer. + * Returns: (array) (element-type guint8) (transfer none): A pointer + * to the payload data in @buffer. */ gpointer gst_rtp_buffer_get_payload (GstRTPBuffer * rtp) @@ -1099,8 +1103,9 @@ gst_rtp_buffer_ext_timestamp (guint64 * exttimestamp, guint32 timestamp) * @rtp: the RTP packet * @id: The ID of the header extension to be read (between 1 and 14). * @nth: Read the nth extension packet with the requested ID - * @data: location for data - * @size: the size of the data in bytes + * @data: (out) (array length=size) (element-type guint8) (transfer none): + * location for data + * @size: (out): the size of the data in bytes * * Parses RFC 5285 style header extensions with a one byte header. It will * return the nth extension with the requested id. @@ -1174,11 +1179,12 @@ gst_rtp_buffer_get_extension_onebyte_header (GstRTPBuffer * rtp, guint8 id, /** * gst_rtp_buffer_get_extension_twobytes_header: * @rtp: the RTP packet - * @appbits: Application specific bits + * @appbits: (out): Application specific bits * @id: The ID of the header extension to be read (between 1 and 14). * @nth: Read the nth extension packet with the requested ID - * @data: location for data - * @size: the size of the data in bytes + * @data: (out) (array length=size) (element-type guint8) (transfer none): + * location for data + * @size: (out): the size of the data in bytes * * Parses RFC 5285 style header extensions with a two bytes header. It will * return the nth extension with the requested id. @@ -1287,7 +1293,7 @@ get_onebyte_header_end_offset (guint8 * pdata, guint wordlen) * gst_rtp_buffer_add_extension_onebyte_header: * @rtp: the RTP packet * @id: The ID of the header extension (between 1 and 14). - * @data: location for data + * @data: (array length=size) (element-type guint8): location for data * @size: the size of the data in bytes * * Adds a RFC 5285 header extension with a one byte header to the end of the @@ -1406,7 +1412,7 @@ get_twobytes_header_end_offset (guint8 * pdata, guint wordlen) * @rtp: the RTP packet * @appbits: Application specific bits * @id: The ID of the header extension - * @data: location for data + * @data: (array length=size) (element-type guint8): location for data * @size: the size of the data in bytes * * Adds a RFC 5285 header extension with a two bytes header to the end of the