bufferpool: Clarify GstBufferPoolClass::start() usage

Make it clear that chaining up to the default implementation
is optional if subclasses do not want preallocation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6328>
This commit is contained in:
Seungha Yang 2024-03-12 01:22:03 +09:00 committed by GStreamer Marge Bot
parent 69d0501e8f
commit 27662d5fb8
2 changed files with 7 additions and 1 deletions

View file

@ -4413,7 +4413,10 @@ This function takes ownership of @config.</doc>
</virtual-method>
<virtual-method name="start">
<doc xml:space="preserve" filename="../subprojects/gstreamer/gst/gstbufferpool.h">Start the bufferpool. The default implementation will preallocate
min-buffers buffers and put them in the queue.</doc>
min-buffers buffers and put them in the queue.
Subclasses do not need to chain up to the parent's default implementation
if they don't want min-buffers based preallocation.</doc>
<source-position filename="../subprojects/gstreamer/gst/gstbufferpool.h"/>
<return-value transfer-ownership="none">
<doc xml:space="preserve" filename="../subprojects/gstreamer/gst/gstbufferpool.h">whether the pool could be started.</doc>

View file

@ -157,6 +157,9 @@ struct _GstBufferPoolClass {
* Start the bufferpool. The default implementation will preallocate
* min-buffers buffers and put them in the queue.
*
* Subclasses do not need to chain up to the parent's default implementation
* if they don't want min-buffers based preallocation.
*
* Returns: whether the pool could be started.
*/
gboolean (*start) (GstBufferPool *pool);