[MPlayer-dev-eng] [PATCH] Allow to set network timeout
Reimar Doeffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Wed Jun 20 12:23:32 CEST 2007
Hello,
On Wed, Jun 20, 2007 at 11:05:57AM +0200, Carl Eugen Hoyos wrote:
> On 2007-06-18 13:28, Dominik 'Rathann' Mierzejewski wrote:
> > On Monday, 18 June 2007 at 10:53, cehoyos wrote:
> > > Author: cehoyos
> > > Date: Mon Jun 18 10:53:53 2007
> > > New Revision: 23574
> > >
> > > Log:
> > > Stop playing at eof or if no data arrives for ten seconds.
> >
> > Please make the timeout configurable.
>
> Attached is a patch that allows to configure the network timeout.
>
> I won't apply unless someone approves it.
If it gets such a generic name it probably should also affect the
call that sets sockopt timeout.
> extern "C" char* network_username;
> extern "C" char* network_password;
> +extern "C" int network_timeout;
Since you do it everywhere else I'd align the variable name here as
well.
> @@ -505,7 +506,8 @@
> TaskScheduler& scheduler
> = bufferQueue->readSource()->envir().taskScheduler();
> int delay = bufferQueue->prevPacketPTS * 1.05 >
> - rtpState->mediaSession->playEndTime() ? 1000000 : 10000000;
> + rtpState->mediaSession->playEndTime() ?
> + network_timeout * 100000 : network_timeout * 1000000;
I'd introduce an extra variable to hold the timeout, this gets too messy
IMO.
Oh, on second reading that is already a second variable.
How about simplifying this in the current code first:
> int delay = 10000000;
> if (bufferQueue->prevPacketPTS > 0.95 * rtpState->mediaSession->playEndTime())
> delay /= 10;
> +.B \-network-timeout (LIVE555 only)
> +Set network timeout. When 95% are played, a thenth is used.
> +.
> +.TP
This so not parses for me. The German variant is almost understandable,
but only almost too ;-)
Also it is not entirely correct 1 / 1.05 != 0.95.
Greetings,
Reimar Doeffinger
More information about the MPlayer-dev-eng
mailing list