Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3194>
/**
* gst_video_decoder_proxy_getcaps:
* @decoder: a #GstVideoDecoder
- * @caps: (allow-none): initial caps
- * @filter: (allow-none): filter caps
+ * @caps: (nullable): initial caps
+ * @filter: (nullable): filter caps
*
* Returns caps that express @caps (or sink template caps if @caps == NULL)
* restricted to resolution/format/... combinations supported by downstream
*
* Get the #GstVideoCodecState currently describing the output stream.
*
- * Returns: (transfer full): #GstVideoCodecState describing format of video data.
+ * Returns: (transfer full) (nullable): #GstVideoCodecState describing format of video data.
*/
GstVideoCodecState *
gst_video_decoder_get_output_state (GstVideoDecoder * decoder)
* @fmt: a #GstVideoFormat
* @width: The width in pixels
* @height: The height in pixels
- * @reference: (allow-none) (transfer none): An optional reference #GstVideoCodecState
+ * @reference: (nullable) (transfer none): An optional reference #GstVideoCodecState
*
* Creates a new #GstVideoCodecState with the specified @fmt, @width and @height
* as the output state for the decoder.
* The new output state will only take effect (set on pads and buffers) starting
* from the next call to #gst_video_decoder_finish_frame().
*
- * Returns: (transfer full): the newly configured output state.
+ * Returns: (transfer full) (nullable): the newly configured output state.
*/
GstVideoCodecState *
gst_video_decoder_set_output_state (GstVideoDecoder * decoder,
* @width: The width in pixels
* @height: The height in pixels
* @interlace_mode: A #GstVideoInterlaceMode
- * @reference: (allow-none) (transfer none): An optional reference #GstVideoCodecState
+ * @reference: (nullable) (transfer none): An optional reference #GstVideoCodecState
*
* Same as #gst_video_decoder_set_output_state() but also allows you to also set
* the interlacing mode.
*
- * Returns: (transfer full): the newly configured output state.
+ * Returns: (transfer full) (nullable): the newly configured output state.
*
* Since: 1.16.
*/
*
* Get the oldest pending unfinished #GstVideoCodecFrame
*
- * Returns: (transfer full): oldest pending unfinished #GstVideoCodecFrame.
+ * Returns: (transfer full) (nullable): oldest pending unfinished #GstVideoCodecFrame.
*/
GstVideoCodecFrame *
gst_video_decoder_get_oldest_frame (GstVideoDecoder * decoder)
*
* Get a pending unfinished #GstVideoCodecFrame
*
- * Returns: (transfer full): pending unfinished #GstVideoCodecFrame identified by @frame_number.
+ * Returns: (transfer full) (nullable): pending unfinished #GstVideoCodecFrame identified by @frame_number.
*/
GstVideoCodecFrame *
gst_video_decoder_get_frame (GstVideoDecoder * decoder, int frame_number)
* You should use gst_video_decoder_allocate_output_frame() instead of this
* function, if possible at all.
*
- * Returns: (transfer full): allocated buffer, or NULL if no buffer could be
+ * Returns: (transfer full) (nullable): allocated buffer, or NULL if no buffer could be
* allocated (e.g. when downstream is flushing or shutting down)
*/
GstBuffer *
/**
* gst_video_decoder_get_latency:
* @decoder: a #GstVideoDecoder
- * @min_latency: (out) (allow-none): address of variable in which to store the
+ * @min_latency: (out) (optional): address of variable in which to store the
* configured minimum latency, or %NULL
- * @max_latency: (out) (allow-none): address of variable in which to store the
+ * @max_latency: (out) (optional): address of variable in which to store the
* configured mximum latency, or %NULL
*
* Query the configured decoder latency. Results will be returned via
/**
* gst_video_decoder_merge_tags:
* @decoder: a #GstVideoDecoder
- * @tags: (allow-none): a #GstTagList to merge, or NULL to unset
+ * @tags: (nullable): a #GstTagList to merge, or NULL to unset
* previously-set tags
* @mode: the #GstTagMergeMode to use, usually #GST_TAG_MERGE_REPLACE
*
* gst_video_decoder_get_buffer_pool:
* @decoder: a #GstVideoDecoder
*
- * Returns: (transfer full): the instance of the #GstBufferPool used
+ * Returns: (transfer full) (nullable): the instance of the #GstBufferPool used
* by the decoder; free it after use it
*/
GstBufferPool *
/**
* gst_video_decoder_get_allocator:
* @decoder: a #GstVideoDecoder
- * @allocator: (out) (allow-none) (transfer full): the #GstAllocator
+ * @allocator: (out) (optional) (nullable) (transfer full): the #GstAllocator
* used
- * @params: (out) (allow-none) (transfer full): the
+ * @params: (out) (optional) (transfer full): the
* #GstAllocationParams of @allocator
*
* Lets #GstVideoDecoder sub-classes to know the memory @allocator
/**
* gst_video_encoder_proxy_getcaps:
* @enc: a #GstVideoEncoder
- * @caps: (allow-none): initial caps
- * @filter: (allow-none): filter caps
+ * @caps: (nullable): initial caps
+ * @filter: (nullable): filter caps
*
* Returns caps that express @caps (or sink template caps if @caps == NULL)
* restricted to resolution/format/... combinations supported by downstream
*
* Get the current #GstVideoCodecState
*
- * Returns: (transfer full): #GstVideoCodecState describing format of video data.
+ * Returns: (transfer full) (nullable): #GstVideoCodecState describing format of video data.
*/
GstVideoCodecState *
gst_video_encoder_get_output_state (GstVideoEncoder * encoder)
{
- GstVideoCodecState *state;
+ GstVideoCodecState *state = NULL;
GST_VIDEO_ENCODER_STREAM_LOCK (encoder);
- state = gst_video_codec_state_ref (encoder->priv->output_state);
+ if (encoder->priv->output_state)
+ state = gst_video_codec_state_ref (encoder->priv->output_state);
GST_VIDEO_ENCODER_STREAM_UNLOCK (encoder);
return state;
* gst_video_encoder_set_output_state:
* @encoder: a #GstVideoEncoder
* @caps: (transfer full): the #GstCaps to use for the output
- * @reference: (allow-none) (transfer none): An optional reference @GstVideoCodecState
+ * @reference: (nullable) (transfer none): An optional reference @GstVideoCodecState
*
* Creates a new #GstVideoCodecState with the specified caps as the output state
* for the encoder.
* The new output state will only take effect (set on pads and buffers) starting
* from the next call to #gst_video_encoder_finish_frame().
*
- * Returns: (transfer full): the newly configured output state.
+ * Returns: (transfer full) (nullable): the newly configured output state.
*/
GstVideoCodecState *
gst_video_encoder_set_output_state (GstVideoEncoder * encoder, GstCaps * caps,
/**
* gst_video_encoder_get_latency:
* @encoder: a #GstVideoEncoder
- * @min_latency: (out) (allow-none): address of variable in which to store the
+ * @min_latency: (out) (optional): address of variable in which to store the
* configured minimum latency, or %NULL
- * @max_latency: (out) (allow-none): address of variable in which to store the
+ * @max_latency: (out) (optional): address of variable in which to store the
* configured maximum latency, or %NULL
*
* Query the configured encoding latency. Results will be returned via
*
* Get the oldest unfinished pending #GstVideoCodecFrame
*
- * Returns: (transfer full): oldest unfinished pending #GstVideoCodecFrame
+ * Returns: (transfer full) (nullable): oldest unfinished pending #GstVideoCodecFrame
*/
GstVideoCodecFrame *
gst_video_encoder_get_oldest_frame (GstVideoEncoder * encoder)
*
* Get a pending unfinished #GstVideoCodecFrame
*
- * Returns: (transfer full): pending unfinished #GstVideoCodecFrame identified by @frame_number.
+ * Returns: (transfer full) (nullable): pending unfinished #GstVideoCodecFrame identified by @frame_number.
*/
GstVideoCodecFrame *
gst_video_encoder_get_frame (GstVideoEncoder * encoder, int frame_number)
/**
* gst_video_encoder_merge_tags:
* @encoder: a #GstVideoEncoder
- * @tags: (allow-none): a #GstTagList to merge, or NULL to unset
+ * @tags: (nullable): a #GstTagList to merge, or NULL to unset
* previously-set tags
* @mode: the #GstTagMergeMode to use, usually #GST_TAG_MERGE_REPLACE
*
/**
* gst_video_encoder_get_allocator:
* @encoder: a #GstVideoEncoder
- * @allocator: (out) (allow-none) (transfer full): the #GstAllocator
+ * @allocator: (out) (optional) (nullable) (transfer full): the #GstAllocator
* used
- * @params: (out) (allow-none) (transfer full): the
+ * @params: (out) (optional) (transfer full): the
* #GstAllocationParams of @allocator
*
* Lets #GstVideoEncoder sub-classes to know the memory @allocator
* Buffers can contain multiple #GstVideoMeta metadata items when dealing with
* multiview buffers.
*
- * Returns: (transfer none): the #GstVideoMeta with lowest id (usually 0) or %NULL when there
+ * Returns: (transfer none) (nullable): the #GstVideoMeta with lowest id (usually 0) or %NULL when there
* is no such metadata on @buffer.
*/
GstVideoMeta *
* Buffers can contain multiple #GstVideoMeta metadata items when dealing with
* multiview buffers.
*
- * Returns: (transfer none): the #GstVideoMeta with @id or %NULL when there is no such metadata
+ * Returns: (transfer none) (nullable): the #GstVideoMeta with @id or %NULL when there is no such metadata
* on @buffer.
*/
GstVideoMeta *
* Buffers can contain multiple #GstVideoRegionOfInterestMeta metadata items if
* multiple regions of interests are marked on a frame.
*
- * Returns: (transfer none): the #GstVideoRegionOfInterestMeta with @id or %NULL when there is
+ * Returns: (transfer none) (nullable): the #GstVideoRegionOfInterestMeta with @id or %NULL when there is
* no such metadata on @buffer.
*/
GstVideoRegionOfInterestMeta *
* Attaches #GstVideoTimeCodeMeta metadata to @buffer with the given
* parameters.
*
- * Returns: (transfer none): the #GstVideoTimeCodeMeta on @buffer, or
+ * Returns: (transfer none) (nullable): the #GstVideoTimeCodeMeta on @buffer, or
* (since 1.16) %NULL if the timecode was invalid.
*
* Since: 1.10
* The resulting config->latest_daily_jam is set to
* midnight, and timecode is set to the given time.
*
- * Returns: the #GstVideoTimeCode representation of @dt, or %NULL if
+ * Returns: (nullable): the #GstVideoTimeCode representation of @dt, or %NULL if
* no valid timecode could be created.
*
* Since: 1.16
*
* Since: 1.16
*
- * Returns: The new #GstVideoVBIParser or %NULL if the @format and/or @pixel_width
+ * Returns: (nullable): The new #GstVideoVBIParser or %NULL if the @format and/or @pixel_width
* is not supported.
*/
GstVideoVBIParser *
*
* Since: 1.16
*
- * Returns: The new #GstVideoVBIEncoder or %NULL if the @format and/or @pixel_width
+ * Returns: (nullable): The new #GstVideoVBIEncoder or %NULL if the @format and/or @pixel_width
* is not supported.
*/
GstVideoVBIEncoder *
*
* Since: 1.18
*
- * Returns: The first #GstVideoAFDMeta present on @b, or %NULL if
+ * Returns: (nullable): The first #GstVideoAFDMeta present on @b, or %NULL if
* no #GstVideoAFDMeta are present
*/
#define gst_buffer_get_video_afd_meta(b) \
*
* Since: 1.18
*
- * Returns: The first #GstVideoBarMeta present on @b, or %NULL if
+ * Returns: (nullable): The first #GstVideoBarMeta present on @b, or %NULL if
* no #GstVideoBarMeta are present
*/
#define gst_buffer_get_video_bar_meta(b) \
*
* Since: 1.16
*
- * Returns: The first #GstVideoCaptionMeta present on @b, or %NULL if
+ * Returns: (nullable): The first #GstVideoCaptionMeta present on @b, or %NULL if
* no #GstVideoCaptionMeta are present
*/
#define gst_buffer_get_video_caption_meta(b) \
* The optional @pool can be used to spawn threads, this is useful when
* creating new converters rapidly, for example when updating cropping.
*
- * Returns: a #GstVideoConverter or %NULL if conversion is not possible.
+ * Returns (nullable): a #GstVideoConverter or %NULL if conversion is not possible.
*
* Since: 1.20
*/
* Create a new converter object to convert between @in_info and @out_info
* with @config.
*
- * Returns: a #GstVideoConverter or %NULL if conversion is not possible.
+ * Returns (nullable): a #GstVideoConverter or %NULL if conversion is not possible.
*
* Since: 1.6
*/
* Get the default palette of @format. This the palette used in the pack
* function for paletted formats.
*
- * Returns: (transfer none): the default palette of @format or %NULL when
+ * Returns: (transfer none) (nullable): the default palette of @format or %NULL when
* @format does not have a palette.
*
* Since: 1.2
*
* Copy a GstVideoInfo structure.
*
- * Returns: a new #GstVideoInfo. free with gst_video_info_free.
+ * Returns: (transfer full): a new #GstVideoInfo. free with gst_video_info_free.
*
* Since: 1.6
*/
* Allocate a new #GstVideoInfo that is also initialized with
* gst_video_info_init().
*
- * Returns: a new #GstVideoInfo. free with gst_video_info_free().
+ * Returns: (transfer full): a new #GstVideoInfo. free with gst_video_info_free().
*
* Since: 1.6
*/
*
* Convert @mode to its string representation.
*
- * Returns: @mode as a string or NULL if @mode in invalid.
+ * Returns: @mode as a string.
*
* Since: 1.6
*/
*
* Convert @order to its string representation.
*
- * Returns: @order as a string or NULL if @order in invalid.
+ * Returns: @order as a string.
*
* Since: 1.12
*/
*
* Parse @caps to generate a #GstVideoInfo.
*
- * Returns: A #GstVideoInfo, or %NULL if @caps couldn't be parsed
+ * Returns: (transfer full) (nullable): A #GstVideoInfo, or %NULL if @caps couldn't be parsed
* Since: 1.20
*/
GstVideoInfo *
*
* Convert the values of @info into a #GstCaps.
*
- * Returns: a new #GstCaps containing the info of @info.
+ * Returns: (transfer full): a new #GstCaps containing the info of @info.
*/
GstCaps *
gst_video_info_to_caps (const GstVideoInfo * info)
* gst_video_info_align_full:
* @info: a #GstVideoInfo
* @align: alignment parameters
- * @plane_size: (out) (allow-none): array used to store the plane sizes
+ * @plane_size: (out) (optional): array used to store the plane sizes
*
* Extra padding will be added to the right side when stride alignment padding
* is required and @align will be updated with the new padding values.
* gst_video_multiview_mode_to_caps_string:
* @mview_mode: A #GstVideoMultiviewMode value
*
- * Returns: The caps string representation of the mode, or NULL if invalid.
- *
* Given a #GstVideoMultiviewMode returns the multiview-mode caps string
* for insertion into a caps structure
*
+ * Returns: (nullable): The caps string representation of the mode, or NULL if invalid.
+ *
* Since: 1.6
*/
const gchar *
*
* Returns the @n-th #GstVideoOverlayRectangle contained in @comp.
*
- * Returns: (transfer none): the @n-th rectangle, or NULL if @n is out of
+ * Returns: (transfer none) (nullable): the @n-th rectangle, or NULL if @n is out of
* bounds. Will not return a new reference, the caller will need to
* obtain her own reference using gst_video_overlay_rectangle_ref()
* if needed.
*
* Gets the GstVideoSEIUserDataUnregisteredMeta that might be present on @b.
*
- * Returns: The first #GstVideoSEIUserDataUnregisteredMeta present on @b, or %NULL if
+ * Returns: (nullable): The first #GstVideoSEIUserDataUnregisteredMeta present on @b, or %NULL if
* no #GstVideoSEIUserDataUnregisteredMeta are present
*
* Since: 1.22