[vlc-devel] [PATCH] Zip: playlist demux and zip:// access
Rémi Denis-Courmont
rem at videolan.org
Sun Jan 11 10:12:53 CET 2009
Le samedi 10 janvier 2009 23:50:50 jpeg at videolan.org, vous avez écrit :
> + * Copyright (C) 2007 the VideoLAN team
^^^^ ???
> +#define ZIP_SEP "!/"
On my operating system, ! is allowed in filenames, and hence !/ is a valid
substring of a path.
>**/ +struct access_sys_t
> +{
(...)
> + /* file in zip information */
> + char *psz_archivepath;
I did not really understand why you need to retain this information past
pf_open.
> +#else
> +# error Can not compile zip demuxer without zlib support
> +#endif
Should this logic not be in Modules.am (via an automake conditional) or
directly in configure.ac?
> +vlc_module_begin();
> + set_shortname( "Zip");
> + set_category( CAT_INPUT );
> + set_subcategory( SUBCAT_INPUT_DEMUX );
> + set_description( _("Zip files demuxer" ) );
> + set_capability( "demux", 70 );
> + set_callbacks( DemuxOpen, DemuxClose );
> + add_shortcut( "unzip" );
> + add_shortcut( "zip" );
> + add_submodule();
> + set_description( "Zip access");
> + set_capability( "access", 0 );
> + add_shortcut( "unzip" );
> + add_shortcut( "zip" );
> + set_callbacks( AccessOpen, AccessClose );
> + set_subcategory( SUBCAT_INPUT_ACCESS );
> +vlc_module_end();
Please remove the semicolons.
> +int Demux ( demux_t *p_demux )
> +{
> + msg_Dbg( p_demux, "demuxing zip file..." );
> +
> + /* Get and lock playlist */
> + playlist_t *p_playlist = pl_Hold( p_demux );
If I recall correctly, demuxers are not allowed to access the playlist.
--
Rémi Denis-Courmont
http://git.remlab.net/cgi-bin/gitweb.cgi?p=vlc-courmisch.git;a=summary
More information about the vlc-devel
mailing list