Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gstout-buffer-duration #247

Open
antonellocaroli opened this issue Mar 14, 2022 · 3 comments
Open

gstout-buffer-duration #247

antonellocaroli opened this issue Mar 14, 2022 · 3 comments

Comments

@antonellocaroli
Copy link

Hi,

I cannot understand what values this setting accepts (min and max)
and what it actually does...
could someone please clarify this for me, thank you!!!

@mill1000
Copy link
Contributor

The usage should be documented under the --help-gstout option.

{ "gstout-buffer-duration", 0, 0, G_OPTION_ARG_DOUBLE, &buffer_duration,
"The size of the buffer in seconds. Set to zero to disable buffering.",

In summary, it accepts a decimal number of seconds to buffer the network stream before playback. The value is scaled to nanoseconds and provided to the gstreamer playbin.

gint64 buffer_duration_ns = round(buffer_duration * 1.0e9);
Log_info("gstreamer",
"Setting buffer duration to %" PRId64 "ms",
buffer_duration_ns / 1000000);
g_object_set(G_OBJECT(player_),
"buffer-duration",
buffer_duration_ns,
NULL);

The minimum value is 0, or no buffer. The maximum value is probably the maximum value of a gint64 (approax 9.2x10e18 ns, or about 292 years).

@antonellocaroli
Copy link
Author

antonellocaroli commented Mar 15, 2022

I did a test by setting:

--gstout-buffer-duration=300.0

in fact the use of ram changes...and sometimes the play, of course, starts with a certain delay...

so I thought of unplugging the LAN cable to see if the playback would continue (thinking that the stream is stored in RAM), but as soon as I unplugged the cable the playback stops immediately ...

perhaps it would be more functional if there were an input buffer and an output buffer.

@mill1000
Copy link
Contributor

mill1000 commented Apr 7, 2022

Playback and buffering are all handled by gstreamer. This project has no control of how the buffering is implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants