Fix various warnings from gobject-introspection
authorSebastian Dröge <sebastian@centricular.com>
Tue, 25 Oct 2022 06:39:07 +0000 (09:39 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 25 Oct 2022 06:45:25 +0000 (09:45 +0300)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3261>

20 files changed:
subprojects/gst-editing-services/ges/ges-asset.c
subprojects/gst-editing-services/ges/ges-clip.c
subprojects/gst-editing-services/ges/ges-formatter.h
subprojects/gst-editing-services/ges/ges-pipeline.c
subprojects/gst-editing-services/ges/ges-project.c
subprojects/gst-editing-services/ges/ges-timeline-element.c
subprojects/gst-editing-services/ges/ges-timeline.c
subprojects/gst-plugins-bad/gst-libs/gst/transcoder/gsttranscoder.c
subprojects/gst-plugins-bad/gst-libs/gst/va/gstvaallocator.c
subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkerror.c
subprojects/gst-plugins-base/gst-libs/gst/gl/gstgldisplay.c
subprojects/gst-plugins-base/gst-libs/gst/gl/gstglshader.c
subprojects/gst-plugins-base/gst-libs/gst/pbutils/gstdiscoverer.c
subprojects/gst-plugins-base/gst-libs/gst/rtsp/gstrtspconnection.c
subprojects/gst-plugins-base/gst-libs/gst/rtsp/gstrtspmessage.c
subprojects/gst-plugins-base/gst-libs/gst/sdp/gstmikey.c
subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-server.c
subprojects/gstreamer/gst/gsturi.c
subprojects/gstreamer/libs/gst/net/gstnettimepacket.c
subprojects/gstreamer/libs/gst/net/gstntppacket.c

index a772640..503c5d2 100644 (file)
@@ -1544,7 +1544,7 @@ ges_asset_get_id (GESAsset * self)
 /**
  * ges_asset_extract:
  * @self: The #GESAsset to extract an object from
- * @error: (optional): An error to be set in case something goes wrong,
+ * @error: An error to be set in case something goes wrong,
  * or %NULL to ignore
  *
  * Extracts a new #GESAsset:extractable-type object from the asset. The
@@ -1578,8 +1578,7 @@ ges_asset_extract (GESAsset * self, GError ** error)
 /**
  * ges_asset_request_finish:
  * @res: The task result to fetch the asset from
- * @error: (out) (allow-none) (transfer full): An error to be set in case
- * something goes wrong, or %NULL to ignore
+ * @error: An error to be set in case something goes wrong, or %NULL to ignore
  *
  * Fetches an asset requested by ges_asset_request_async(), which
  * finalises the request.
index de2132c..777b9f9 100644 (file)
@@ -3342,7 +3342,7 @@ ges_clip_set_top_effect_index (GESClip * clip, GESBaseEffect * effect,
  * @clip: The #GESClip to split
  * @position: The timeline position at which to perform the split, between
  * the start and end of the clip
- * @error: (optional) (nullable): Return location for an error
+ * @error: Return location for an error
  *
  * Splits a clip at the given timeline position into two clips. The clip
  * must already have a #GESClip:layer.
@@ -4402,7 +4402,7 @@ ges_clip_get_timeline_time_from_source_frame (GESClip * clip,
  * @clip: A #GESClip
  * @child: A child of @clip
  * @track: The track to add @child to
- * @error: (optional) (nullable): Return location for an error
+ * @error: Return location for an error
  *
  * Adds the track element child of the clip to a specific track.
  *
index 98e57ab..8d352bb 100644 (file)
@@ -56,7 +56,7 @@ typedef gboolean (*GESFormatterCanLoadURIMethod) (GESFormatter *dummy_instance,
  * @formatter: a #GESFormatter
  * @timeline: a #GESTimeline
  * @uri: the URI to load from
- * @error: (out) (allow-none): An error to be set in case something wrong happens or %NULL
+ * @error: An error to be set in case something wrong happens or %NULL
  *
  * Virtual method for loading a timeline from a given URI.
  *
@@ -76,7 +76,7 @@ typedef gboolean (*GESFormatterLoadFromURIMethod) (GESFormatter *formatter,
  * @timeline: a #GESTimeline
  * @uri: the URI to save to
  * @overwrite: Whether the file should be overwritten in case it exists
- * @error: (out) (allow-none): An error to be set in case something wrong happens or %NULL
+ * @error: An error to be set in case something wrong happens or %NULL
  *
  * Virtual method for saving a timeline to a uri.
  *
index 2ca6e27..c33f408 100644 (file)
@@ -1331,8 +1331,7 @@ ges_pipeline_get_thumbnail (GESPipeline * self, GstCaps * caps)
  * native size
  * @format: The desired mime type (for example, "image/jpeg")
  * @location: The path to save the thumbnail to
- * @error: (out) (optional) (transfer full): An error to be set in case
- * something goes wrong, or %NULL to ignore
+ * @error: An error to be set in case something goes wrong, or %NULL to ignore
  *
  * Saves the currently displayed image of the pipeline in preview to the
  * given location, in the specified dimensions and format.
index fbee9d2..bfab7f9 100644 (file)
@@ -1064,7 +1064,7 @@ ges_project_list_assets (GESProject * project, GType filter)
  * from which the timeline as been loaded or default to the best formatter
  * as defined in #ges_find_formatter_for_uri
  * @overwrite: %TRUE to overwrite file if it exists
- * @error: (out) (allow-none): An error to be set in case something wrong happens or %NULL
+ * @error: An error to be set in case something wrong happens or %NULL
  *
  * Save the timeline of @project to @uri. You should make sure that @timeline
  * is one of the timelines that have been extracted from @project
@@ -1172,7 +1172,7 @@ ges_project_new (const gchar * uri)
  * ges_project_load:
  * @project: A #GESProject that has an @uri set already
  * @timeline: A blank timeline to load @project into
- * @error: (out) (allow-none): An error to be set in case something wrong happens or %NULL
+ * @error: An error to be set in case something wrong happens or %NULL
  *
  * Loads @project into @timeline
  *
index 5b203e9..24000a5 100644 (file)
@@ -2371,7 +2371,7 @@ ges_timeline_element_get_layer_priority (GESTimelineElement * self)
  * @edge: The edge of @self where the edit should occur
  * @position: The edit position: a new location for the edge of @self
  * (in nanoseconds) in the timeline coordinates
- * @error: (optional): Return location for an error
+ * @error: Return location for an error
  *
  * Edits the element within its timeline by adjusting its
  * #GESTimelineElement:start, #GESTimelineElement:duration or
index ea051bb..0452825 100644 (file)
@@ -2178,7 +2178,7 @@ ges_timeline_new (void)
 /**
  * ges_timeline_new_from_uri:
  * @uri: The URI to load from
- * @error: (out) (optional): An error to be set if loading fails, or
+ * @error: An error to be set if loading fails, or
  * %NULL to ignore
  *
  * Creates a timeline from the given URI.
@@ -2202,7 +2202,7 @@ ges_timeline_new_from_uri (const gchar * uri, GError ** error)
  * ges_timeline_load_from_uri:
  * @timeline: An empty #GESTimeline into which to load the formatter
  * @uri: The URI to load from
- * @error: (out) (allow-none): An error to be set if loading fails, or
+ * @error: An error to be set if loading fails, or
  * %NULL to ignore
  *
  * Loads the contents of URI into the timeline.
@@ -2233,7 +2233,7 @@ ges_timeline_load_from_uri (GESTimeline * timeline, const gchar * uri,
  * @uri: The location to save to
  * @formatter_asset: (allow-none): The formatter asset to use, or %NULL
  * @overwrite: %TRUE to overwrite file if it exists
- * @error: (out) (allow-none): An error to be set if saving fails, or
+ * @error: An error to be set if saving fails, or
  * %NULL to ignore
  *
  * Saves the timeline to the given location. If @formatter_asset is %NULL,
index f95cf0d..b311ad4 100644 (file)
@@ -1457,8 +1457,8 @@ gst_transcoder_message_parse_state (GstMessage * msg,
 /**
  * gst_transcoder_message_parse_error:
  * @msg: A #GstMessage
- * @error: (out): the resulting error
- * @details: (out): (transfer none): A GstStructure containing extra details about the error
+ * @error: (out) (optional) (transfer full): the resulting error
+ * @details: (out): (transfer full): A GstStructure containing extra details about the error
  *
  * Parse the given error @msg and extract the corresponding #GError
  *
@@ -1477,8 +1477,8 @@ gst_transcoder_message_parse_error (GstMessage * msg, GError * error,
 /**
  * gst_transcoder_message_parse_warning:
  * @msg: A #GstMessage
- * @error: (out): the resulting warning
- * @details: (out): (transfer none): A GstStructure containing extra details about the warning
+ * @error: (out) (optional) (transfer full): the resulting warning
+ * @details: (out): (transfer full): A GstStructure containing extra details about the warning
  *
  * Parse the given error @msg and extract the corresponding #GError warning
  *
index 27c55ca..a9e8d91 100644 (file)
@@ -1908,7 +1908,7 @@ gst_va_allocator_set_hacks (GstAllocator * allocator, guint32 hacks)
  * gst_va_memory_get_surface:
  * @mem: a #GstMemory
  *
- * Returns: (type guint): the VASurfaceID in @mem.
+ * Returns: (type guint) (transfer none): the VASurfaceID in @mem.
  *
  * Since: 1.22
  */
@@ -1939,7 +1939,7 @@ gst_va_memory_get_surface (GstMemory * mem)
  * gst_va_buffer_get_surface:
  * @buffer: a #GstBuffer
  *
- * Returns: (type guint): the VASurfaceID in @buffer.
+ * Returns: (type guint) (transfer none): the VASurfaceID in @buffer.
  *
  * Since: 1.22
  */
@@ -2052,7 +2052,7 @@ gst_va_buffer_create_aux_surface (GstBuffer * buffer)
  * gst_va_buffer_get_aux_surface:
  * @buffer: a #GstBuffer
  *
- * Returns: (type guint): the VASurfaceID attached to
+ * Returns: (type guint) (transfer none): the VASurfaceID attached to
  *     @buffer.
  *
  * Since: 1.22
index 9e62c66..293dd8a 100644 (file)
@@ -90,7 +90,7 @@ gst_vulkan_result_to_string (VkResult result)
 /**
  * gst_vulkan_error_to_g_error: (skip)
  * @result: a VkResult
- * @error: (inout) (optional): a #GError to fill
+ * @error: (out) (optional) (transfer full): a #GError to fill
  * @format: the printf-like format to write into the #GError
  * @...: arguments for @format
  *
index 4857b9c..2130eb7 100644 (file)
@@ -622,7 +622,7 @@ gst_context_get_gl_display (GstContext * context, GstGLDisplay ** display)
  * @display: a #GstGLDisplay
  * @other_context: (transfer none): other #GstGLContext to share resources with.
  * @p_context: (transfer full) (out): resulting #GstGLContext
- * @error: (optional): resulting #GError
+ * @error: resulting #GError
  *
  * It requires the display's object lock to be held.
  *
index 701912b..09bdda4 100644 (file)
@@ -266,7 +266,7 @@ _new_with_stages_va_list (GstGLContext * context, GError ** error,
 /**
  * gst_gl_shader_new_link_with_stages:
  * @context: a #GstGLContext
- * @error: (optional): a #GError
+ * @error: a #GError
  * @...: a NULL terminated list of #GstGLSLStage's
  *
  * Each stage will attempt to be compiled and attached to @shader.  Then
@@ -302,7 +302,7 @@ gst_gl_shader_new_link_with_stages (GstGLContext * context, GError ** error,
 /**
  * gst_gl_shader_new_with_stages:
  * @context: a #GstGLContext
- * @error: (optional): a #GError
+ * @error: a #GError
  * @...: a NULL terminated list of #GstGLSLStage's
  *
  * Each stage will attempt to be compiled and attached to @shader.  On error,
@@ -344,7 +344,7 @@ gst_gl_shader_new (GstGLContext * context)
 /**
  * gst_gl_shader_new_default:
  * @context: a #GstGLContext
- * @error: (optional): a #GError that is filled on failure
+ * @error: a #GError that is filled on failure
  *
  * Note: must be called in the GL thread
  *
@@ -594,7 +594,7 @@ gst_gl_shader_attach (GstGLShader * shader, GstGLSLStage * stage)
  * gst_gl_shader_compile_attach_stage:
  * @shader: a #GstGLShader
  * @stage: a #GstGLSLStage to attach
- * @error: (optional): a #GError
+ * @error: a #GError
  *
  * Compiles @stage and attaches it to @shader.
  *
@@ -626,7 +626,7 @@ gst_gl_shader_compile_attach_stage (GstGLShader * shader, GstGLSLStage * stage,
 /**
  * gst_gl_shader_link:
  * @shader: a #GstGLShader
- * @error: (optional): a #GError
+ * @error: a #GError
  *
  * Links the current list of #GstGLSLStage's in @shader.
  *
index 5ffc72d..6e9394e 100644 (file)
@@ -2545,7 +2545,7 @@ gst_discoverer_discover_uri_async (GstDiscoverer * discoverer,
  * gst_discoverer_discover_uri:
  * @discoverer: A #GstDiscoverer
  * @uri: The URI to run on.
- * @err: (out) (optional): If an error occurred, this field will be filled in.
+ * @err: If an error occurred, this field will be filled in.
  *
  * Synchronously discovers the given @uri.
  *
@@ -2607,7 +2607,7 @@ gst_discoverer_discover_uri (GstDiscoverer * discoverer, const gchar * uri,
  * gst_discoverer_new:
  * @timeout: timeout per file, in nanoseconds. Allowed are values between
  *     one second (#GST_SECOND) and one hour (3600 * #GST_SECOND)
- * @err: (optional): a pointer to a #GError. can be %NULL
+ * @err: a pointer to a #GError. can be %NULL
  *
  * Creates a new #GstDiscoverer with the provided timeout.
  *
index 610b3dc..8e63747 100644 (file)
@@ -597,7 +597,7 @@ getnameinfo_failed:
 /**
  * gst_rtsp_connection_get_tls:
  * @conn: a #GstRTSPConnection
- * @error: (optional): #GError for error reporting, or NULL to ignore.
+ * @error: #GError for error reporting, or NULL to ignore.
  *
  * Get the TLS connection of @conn.
  *
index 818f580..00f87e7 100644 (file)
@@ -265,8 +265,8 @@ gst_rtsp_message_parse_request (GstRTSPMessage * msg,
  * gst_rtsp_message_new_response:
  * @msg: (out) (transfer full): a location for the new #GstRTSPMessage
  * @code: the status code
- * @reason: (transfer none) (optional): the status reason or %NULL
- * @request: (transfer none) (optional): the request that triggered the response or %NULL
+ * @reason: (transfer none) (nullable): the status reason or %NULL
+ * @request: (transfer none) (nullable): the request that triggered the response or %NULL
  *
  * Create a new response #GstRTSPMessage with @code and @reason and store the
  * result message in @msg. Free with gst_rtsp_message_free().
@@ -297,8 +297,8 @@ gst_rtsp_message_new_response (GstRTSPMessage ** msg, GstRTSPStatusCode code,
  * gst_rtsp_message_init_response:
  * @msg: (out caller-allocates): a #GstRTSPMessage
  * @code: the status code
- * @reason: (transfer none) (optional): the status reason or %NULL
- * @request: (transfer none) (optional): the request that triggered the response or %NULL
+ * @reason: (transfer none) (nullable): the status reason or %NULL
+ * @request: (transfer none) (nullable): the request that triggered the response or %NULL
  *
  * Initialize @msg with @code and @reason.
  *
index d17c909..641f25e 100644 (file)
@@ -895,7 +895,7 @@ gst_mikey_message_new (void)
  * gst_mikey_message_new_from_bytes:
  * @bytes: a #GBytes
  * @info: a #GstMIKEYDecryptInfo
- * @error: (optional): a #GError
+ * @error: a #GError
  *
  * Make a new #GstMIKEYMessage from @bytes.
  *
@@ -2048,7 +2048,7 @@ invalid_data:
  * @data: (array length=size) (element-type guint8): bytes to read
  * @size: length of @data
  * @info: #GstMIKEYDecryptInfo
- * @error: (optional): a #GError
+ * @error: a #GError
  *
  * Parse @size bytes from @data into a #GstMIKEYMessage. @info contains the
  * parameters to decrypt and verify the data.
index 8c81090..df5f670 100644 (file)
@@ -851,7 +851,7 @@ gst_rtsp_server_set_property (GObject * object, guint propid,
  * gst_rtsp_server_create_socket:
  * @server: a #GstRTSPServer
  * @cancellable: (allow-none): a #GCancellable
- * @error: (out): a #GError
+ * @error: a #GError
  *
  * Create a #GSocket for @server. The socket will listen on the
  * configured service.
@@ -1319,7 +1319,7 @@ watch_destroyed (GstRTSPServer * server)
  * gst_rtsp_server_create_source:
  * @server: a #GstRTSPServer
  * @cancellable: (nullable): a #GCancellable or %NULL.
- * @error: (out): a #GError
+ * @error: a #GError
  *
  * Create a #GSource for @server. The new source will have a default
  * #GSocketSourceFunc of gst_rtsp_server_io_func().
index d73c4e8..ae1fb72 100644 (file)
@@ -617,7 +617,7 @@ gst_uri_protocol_is_supported (const GstURIType type, const gchar * protocol)
  * @type: Whether to create a source or a sink
  * @uri: URI to create an element for
  * @elementname: (nullable): Name of created element, can be %NULL.
- * @error: (optional): address where to store error information, or %NULL.
+ * @error: address where to store error information, or %NULL.
  *
  * Creates an element for handling the given URI.
  *
@@ -787,7 +787,7 @@ gst_uri_handler_get_uri (GstURIHandler * handler)
  * gst_uri_handler_set_uri:
  * @handler: A #GstURIHandler
  * @uri: URI to set
- * @error: (optional): address where to store a #GError in case of
+ * @error: address where to store a #GError in case of
  *    an error, or %NULL
  *
  * Tries to set the URI of the given handler.
index 801b17e..4a0ec5e 100644 (file)
@@ -47,7 +47,7 @@ G_DEFINE_BOXED_TYPE (GstNetTimePacket, gst_net_time_packet,
 
 /**
  * gst_net_time_packet_new:
- * @buffer: (array zero-terminated="0" fixed-size="16") (nullable): 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
@@ -123,7 +123,7 @@ gst_net_time_packet_copy (const GstNetTimePacket * packet)
  *
  * MT safe. Caller owns return value (g_free to free).
  *
- * Returns: (transfer full) (array zero-terminated="0" fixed-size="16"): 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)
index ecdb792..a9f694a 100644 (file)
@@ -78,7 +78,7 @@ gst_clock_time_to_ntp_timestamp_fraction (GstClockTime gst)
 
 /**
  * gst_ntp_packet_new:
- * @buffer: (array zero-terminated="0" fixed-size="48"): 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
@@ -208,7 +208,7 @@ gst_ntp_packet_copy (const GstNtpPacket * packet)
  *
  * MT safe. Caller owns return value (g_free to free).
  *
- * Returns: (transfer full) (array zero-terminated="0" fixed-size="48"): 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)