utgg wrote: 
> Changing this line in HLS.pm in Triode's alpha plugin:
> > 
Code:
--------------------
  >   > use constant FETCH_CHUNKS => 5; # number of chunks to prefetch
--------------------
> > 
> to:
> > 
Code:
--------------------
  >   > use constant FETCH_CHUNKS => 1; # number of chunks to prefetch
--------------------
> > 
> makes the stream start-up completely reliable and fast for me, and the
> stream playing is still rock solid.
> 
> That number means how many chunks of sound the plugin tries to buffer
> up before it starts playing - 5 equates to 32 seconds with Live
> streams and 50 seconds with Listen Again. The buffer will quickly
> build up to about that size after it starts anyway - and it has 6
> seconds while the first buffer is playing out to fetch the second one
> - which it easily manages on my poor broadband connection. If it tries
> to buffer too much before it starts, taking a long time over it,
> something errors before the stream has a chance to start.

Actually, the real reason the streams were often erroring before they
could start was due to a bug in HLS.pm. I don't know if you are
monitoring any of this Triode, but you may want to include this in your
next update. Near the end of HLS.pm:

Code:
--------------------
            if (!${*$self}{'_pl_noupdate'} && time() > ${*$self}{'_pl_fetched'} 
+ ${*$self}{'_pl_lastint'}) {
--------------------

wants to be:

Code:
--------------------
            if (length ${*$self}{'_pl_url'} && !${*$self}{'_pl_noupdate'} && 
time() > ${*$self}{'_pl_fetched'} + ${*$self}{'_pl_lastint'}) {
--------------------


It still doesn't seem to do any harm in reducing FETCH_CHUNKS to 1 as I
suggested originally. It gives a much faster start-up to the streams -
the start-up time could be a bit variable with 5 chunks. This is because
several async http chunk fetches are launched at once and it is random
which one arrives first - if the first chunk arrives last it will take
longer to start than if the first chunk arrives first. And having
several chunks being fetched simultaneously will slow the first one down
anyway.


------------------------------------------------------------------------
utgg's Profile: http://forums.slimdevices.com/member.php?userid=40900
View this thread: http://forums.slimdevices.com/showthread.php?t=53229

_______________________________________________
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to