[vlc-devel] [PATCH] LUA script to read DCP

Ilkka Ollakka ileoo at videolan.org
Thu Mar 7 16:36:33 CET 2013

On Thu, Mar 07, 2013 at 03:45:50PM +0100, Pierre Villard wrote:
> HI,


I noticed that you use is_file() call in that script. But you could just
try is_dir() call to path to know directly if it's directory name and
exists in probe().

I don't really know the underlying implementation of that is_dir() (just
spotted it from short googling) function and no idea if it does
something unwanted.

> The thing is available VLC specific Lua modules available in
> playlist directory are : msg, strings, stream, variables and xml.
> Interesting functions are in net module. Is there a reason not to
> make available this module to playlist directory ? It seems (maybe I
> am wrong) only this lua directory is checked when using the command
> './vlc dcp/directory/path'.

> About "Or maybe check if full_path is_dir() instead?", what do you
> mean ? I didn't notice this function so far.
> About "I think in here it would be better to allow known work
> access-modules (file, directory?)", yes it would be nice. Do you
> have an example in mind on which I could have a look to perform this
> test ?

for example something like this
locale working_accesses = {file="true",directory="true"}
if( working_accesses[vlc.access] == nil ) then
    return false
Basicly return if access isn't in that table.

> Thanks.

> On 06/03/2013 20:34, Ilkka Ollakka wrote:
> >Hi,

> >On Wed, Mar 06, 2013 at 08:14:55PM +0100, Pierre Villard wrote:
> >>---
> >>+function probe()
> >>+    -- TODO Remote files
> >>+    if( vlc.access == "http" ) then
> >>+       return false
> >>+    end
> >I think in here it would be better to allow known work access-modules
> >(file, directory?) and otherwise return false. As now for example
> >ftp/smb/rtsp don't hit that check. Or maybe check if full_path is_dir()
> >instead?

> >_______________________________________________
> >vlc-devel mailing list
> >To unsubscribe or modify your subscription options:
> >http://mailman.videolan.org/listinfo/vlc-devel

> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel

Ilkka Ollakka
Computer programmers never die, they just get lost in the processing.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20130307/06bc376e/attachment.sig>

More information about the vlc-devel mailing list