Control queue size before dropping

Omar Hatem omar.hatem at avidbeam.com
Tue Sep 12 12:08:43 UTC 2023


Hello,

We have a use case where we want to control the queue size before dropping
some frames. find code sample attached below.

*we used*:

   1. *max-size-time*=0, *max-size-bytes*=0. we set them by zero to disable
   their maximum.
   2. *max-size-buffers*=50. it's set to 50 before dropping
   3. *leaky*=2. to drop frames downstream.
   4. we added an identity element, and attached handoff_callback to memic
   latency of the downstream elements.

*Results*

   - playback is affected by the latency (slow).
   - observed queue size did not go beyond 4 buffers.

*Questions*

   - According to the documentation: the queue separates the downstream
   processing from the upstream processing (since it spawns a thread), why
   can't the queue reach a size of 50 buffers ?
   - If there is any alternative solution, please mention.


gstreamer used is *1.16.3*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230912/8e20e5f8/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cpp
Type: text/x-c++src
Size: 6224 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230912/8e20e5f8/attachment.cpp>


More information about the gstreamer-devel mailing list