[vlc-devel] RE : [PATCH] -- still image demux

brezhoneg1 brezhoneg1 at yahoo.fr
Sat Jan 10 15:44:51 CET 2009

> -----Message d'origine-----
> De : vlc-devel-bounces at videolan.org [mailto:vlc-devel-
> bounces at videolan.org] De la part de Laurent Aimar
> Envoyé : samedi 10 janvier 2009 10:32
> À : Mailing list for VLC media player developers
> Objet : Re: [vlc-devel] RE : RE : [PATCH] -- still image demux
> On Fri, Jan 09, 2009, brezhoneg1 wrote:
> >
> >
> > > De : vlc-devel-bounces at videolan.org [mailto:vlc-devel-
> > > bounces at videolan.org] De la part de Laurent Aimar
> >
> >
> > >>    vlc image.ext
> > >  I do not think this one is wanted.
> > >
> > > The fake module will then never terminate. So with a jpeg file
> > > a music directory, you will block on the jpeg :(
> >
> > Well, it may happen, but it should not be too much of a problem.
> > If you use dir://, there is an option to ignore certain files (As of
> > today, jpg is ignored by default anyway).And, you are never really
> > blocked. Pressing N(ext) will allow you to go on to the next item in
> > playlist.
>  Yes but I do not want vlc hanging indefinitely on image file, it will
> considered as a bug by users.
>  Now, a solution might be that if fake:// prefix is not used, the
> is
> set to a sane value (like a few seconds, 5s at most ?).

okay, what I understand is that users who don't want image files should
not get some popping up unexpectedly (whether they stay 1s, 5s or
infinitely would probably be seen as a problem ?)
This can actually happen when you import a whole directory with qt4
Behind the scene, a vlc directory:// is issued. As of today, the
--ignore-filetypes is set to
"m3u,db,nfo,jpg,gif,sfv,txt,sub,idx,srt,cue".  jpg and gif were added
because things like vlc image.jpg were indeed already working in a very
annoying manner (a less than 1 sec display!)

Why not extend this ignore list to png, tiff and a few others ? That
way, music fans still use vlc without any regression.

For users who explicitly want to import image directories (they will
have to reset the ignore list option), having an infinite duration and
N(ext) and P(revious) as a means to browse through the directory is a
good thing (That's my experience). As an example, I have implemented a
way of browsing the default snapshot directory that I use with vlc. I
find it nice to be able to see snapshot results without quitting vlc,
and decide on the time I want to spend contemplating them :)

In any case, fake-duration can be set up as a preference. Today's
default is 0 (meaning infinite). Default could be set up to something
else. Personally, I find 0 is still what is best. But, color and taste
discussions ... 

> > On the plus side  (only possible if fake:// is not explicit),
> > -  you can easily browse whole image directories :  vlc *.jpg
> > - create slideshow : vlc --fake-duration  5000 *.jpg
> > - directly drop images from an explorer into the qt4 playlist
> >
> >
> > > Btw, with an increased priority, you really need to (at least)
> > that
> > > the
> > > provided file exist (using stat).
> > >
> >
> > Do you really think it is important ?
> > The way it is coded, "vlc image.ext" exactly means "vlc fake://
> > --fake-file=image.ext"
> > If the file doesn't exist, there will be identical behaviour (same
> > issued at the decoder level).  Testing it earlier just means issuing
> > error a bit earlier.
>  Yes, but without that check, the fake access_demux will be used and
> hang VLC without displaying anything except an error message that the
> may not even see...
>  Now, why fake works like this ? I mean why the decoding is delagated
to a
> decoder ? It prevents using multiple fake in the same input for
> and
> make the use of vlc_object_find mandatory :( (That part is not
> related
> to your patch).
I suppose opening the fake file was delayed till decoding time to allow
caching at the appropriate level (where direct buffers are available).
Today's implementation is optimized for performance (1 fake reference
clock and yet a one-off decoding process and a minimum of

I tested again what happens if the file doesn't exist. The behaviour is
okay. And that usually happens when user mistypes the name at the
command line. In that case, relevant errors are displayed right away (in
red !)


More information about the vlc-devel mailing list