Changeset 6691

Show
Ignore:
Timestamp:
06/27/09 03:18:45 (14 months ago)
Author:
metamorph68
Message:

Added buffer's remaining time when computing estimated remaining time. fixes #295.
Some remarks:

  • Adding precise estimated time is complicated, in particular due to the stream muxing.
  • The current estimation is quite satisfactory, in particular since it does not care about the (possibly complex) underlying streams. Also, I noticed that it is often quite precise for estimating the 10 last seconds.
  • Ogg file reading should be factorized along with the other file formats. This would have avoided this issue. However, this needs the implementation of multi-channel (audio+video) buffers, which should be done for 1.0
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/liquidsoap/src/formats/oggformat.ml

    r6344 r6691  
    154154    (* Compute an estimated number of remaining ticks. *) 
    155155    assert (!in_bytes!=0) ; 
     156    let abglen = Generator.length abg in 
    156157    let compression = 
    157       (float (!out_samples)) /. (float !in_bytes) 
     158      (float (!out_samples + abglen)) /. (float !in_bytes) 
    158159    in 
    159160    let remaining_samples =