Web lists-archives.com

Re: [MPlayer-dev-eng] [PATCH 5/5] stream_pvr: allow initial latency when opening stream

On Tue, Feb 02, 2016 at 11:21:37AM -0600, Reza Arbab wrote:
> @@ -1762,6 +1775,10 @@ pvr_stream_open (stream_t *stream, int mode, void *opts, int *file_format)
>      goto err_out;
>    }
> +  /* wait for device to begin streaming */
> +  if (!poll_device (pvr, 5000))
> +    goto err_out;

Maybe add a MSGL_INFO message before?
5 seconds seems like a long enough time that
it might be worth letting the user know what is
going on.
Apart from that I have a minor concern that waiting here might
result in losing some of the first data, as MPlayer
does a whole lot of setup (like opening the Window)
that might take a good bit of time.
I wonder if it wouldn't thus be better to just have
pvr_stream_read use a longer timeout the first time
through it.
Lastly, it might be worth trying if pvr_stream_read couldn't
just return an error (-1) when there is an error instead of
0, which is what causes the EOF if I remember right.
Because MPlayer can try some more clever handling further up
when it know an error happened (like trying to re-read, and
maybe even reset the device).
MPlayer-dev-eng mailing list