[vlc-devel] [PATCH] dvdnav: add Demux submodule

Thomas Guillem thomas at gllm.fr
Wed Mar 18 15:47:10 CET 2015

When opening a DVD, libdvdread was doing a lot of read of 2kB and a lot
of seek at the same position. Mainly because the same part of the IFO
was read from different context (but still from the same thread). In
order to workaround this issue, I put in cache the IFO file (that is
128kB max), so now there is only one read of 128kB per IFO.

I also did some test with and without the readahead_flag. With this flag
(enabled by default for all except OS2), the read size is between 4OOkB
and 500kB but I have seen few reads of 850kB after a seek. Without this
flag, the read size is always 2kB.
I don't know which flag is a better for a net access. Is it better to
have less but bigger read accesses or more but smaller read accesses ?

I also simulated a very long read, 1 second to read 100kB. I didn't see
any issues expect that there was a lot of buffering pause.

So I fail to see the difference between the dvdnav demux and any other
demux regarding I/O.

On Tue, Mar 17, 2015, at 23:46, Luca Barbato wrote:
> On 17/03/15 23:06, Rémi Denis-Courmont wrote:
> > Le mardi 17 mars 2015, 22:57:20 Luca Barbato a écrit :
> >> On 12/03/15 13:52, Rémi Denis-Courmont wrote:
> >>> Le 2015-03-12 13:14, Thomas Guillem a écrit :
> >>>> It allows to use dvdnav via a VLC access.
> >>>
> >>> And it locks up if the stream returns no data (something that cannot
> >>> happen with regular files).
> >>
> >> Uhm sounds bad if you use nfs or anything similar, if the streams return
> >> an error it is not handled?
> >
> > I mean it locks up if the stream read does not return (in any reasonable time
> > frame), in other words if you have a (long) blocking read. That situation is
> > not possible for a regular file. Regular file I/O is never blocking: it either
> > completes or fails straight away.
> >
> And access doesn't have tunable timeouts with poll so the problem gets 
> quite substantial.
> Maybe net_Read could get a timeout field or it won't help at all? I can 
> think of a number of situations in which even a normal demuxer might end 
> up locked in the bad way you pointed out =/
> lu
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

More information about the vlc-devel mailing list