doc: baseparse: Clarify consumed vs output size

When we finish a frame, we pass a size which semantic can easily be confused.
Improve the documentation to clarify that the parameter size is the amount of
input data being consumed and, if set, the output_buffer size can differ.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5754>
This commit is contained in:
Nicolas Dufresne 2023-12-01 12:10:36 -05:00
parent 2e75b8c8e9
commit 73338aa1ae
2 changed files with 10 additions and 4 deletions

View file

@ -3161,10 +3161,13 @@ is emptied or chain returns with error.</doc>
</parameters> </parameters>
</method> </method>
<method name="finish_frame" c:identifier="gst_base_parse_finish_frame"> <method name="finish_frame" c:identifier="gst_base_parse_finish_frame">
<doc xml:space="preserve" filename="../subprojects/gstreamer/libs/gst/base/gstbaseparse.c">Collects parsed data and pushes this downstream. <doc xml:space="preserve" filename="../subprojects/gstreamer/libs/gst/base/gstbaseparse.c">Collects parsed data and pushes it downstream.
Source pad caps must be set when this is called. Source pad caps must be set when this is called.
If @frame's out_buffer is set, that will be used as subsequent frame data. If @frame's out_buffer is set, that will be used as subsequent frame data,
and @size amount will be flushed from the input data. The output_buffer size
can differ from the consumed size indicated by @size.
Otherwise, @size samples will be taken from the input and used for output, Otherwise, @size samples will be taken from the input and used for output,
and the output's metadata (timestamps etc) will be taken as (optionally) and the output's metadata (timestamps etc) will be taken as (optionally)
set by the subclass on @frame's (input) buffer (which is otherwise set by the subclass on @frame's (input) buffer (which is otherwise

View file

@ -2682,10 +2682,13 @@ no_caps:
* @frame: a #GstBaseParseFrame * @frame: a #GstBaseParseFrame
* @size: consumed input data represented by frame * @size: consumed input data represented by frame
* *
* Collects parsed data and pushes this downstream. * Collects parsed data and pushes it downstream.
* Source pad caps must be set when this is called. * Source pad caps must be set when this is called.
* *
* If @frame's out_buffer is set, that will be used as subsequent frame data. * If @frame's out_buffer is set, that will be used as subsequent frame data,
* and @size amount will be flushed from the input data. The output_buffer size
* can differ from the consumed size indicated by @size.
*
* Otherwise, @size samples will be taken from the input and used for output, * Otherwise, @size samples will be taken from the input and used for output,
* and the output's metadata (timestamps etc) will be taken as (optionally) * and the output's metadata (timestamps etc) will be taken as (optionally)
* set by the subclass on @frame's (input) buffer (which is otherwise * set by the subclass on @frame's (input) buffer (which is otherwise