gst: add properties for limits of negotiated buffers

By default, the pipewiresrc tries to negotiate 16 buffers. This value is
hard coded in the pipewiresrc. If the buffers are large, this could lead
to an undesirably high memory usage. Applications that know about the
buffer size and that fewer buffers are sufficient should be able to
configure the limits for the number of buffers that are negotiated.

Therefore, add the min-buffers and max-buffers properties to the
pipewiresrc to enable applications to configure limits for the number of
negotiated buffers.
This commit is contained in:
Michael Tretter 2020-03-20 17:00:36 +01:00 committed by Wim Taymans
parent b01c264c5c
commit fd00d16361
2 changed files with 46 additions and 1 deletions

View file

@ -61,6 +61,8 @@ struct _GstPipeWireSrc {
gchar *path;
gchar *client_name;
gboolean always_copy;
gint min_buffers;
gint max_buffers;
int fd;
gboolean negotiated;