/*****************************************************************************
- * zip.h: Module (access+demux) to extract different archives, based on zlib
+ * zip.h: Module (access+filter) to extract different archives, based on zlib
*****************************************************************************
- * Copyright (C) 2007 the VideoLAN team
+ * Copyright (C) 2009 the VideoLAN team
* $Id$
*
* Authors: Jean-Philippe André <jpeg@videolan.org>
/*****************************************************************************
* zipaccess.c: Module (access) to extract different archives, based on zlib
*****************************************************************************
- * Copyright (C) 2007 the VideoLAN team
+ * Copyright (C) 2009 the VideoLAN team
* $Id$
*
* Authors: Jean-Philippe André <jpeg@videolan.org>
free( p_sys->fileFunctions );
free( p_sys );
}
- var_Destroy( p_access, "zip-no-xspf" );
}
/** **************************************************************************
static int AccessControl( access_t *p_access, int i_query, va_list args )
{
bool *pb_bool;
- int *pi_int;
int64_t *pi_64;
switch( i_query )
*pb_bool = false;
break;
- /* */
- case ACCESS_GET_MTU:
- pi_int = (int*)va_arg( args, int * );
- *pi_int = 0;
- break;
-
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = DEFAULT_PTS_DELAY;
/*****************************************************************************
* zipstream.c: stream_filter that creates a XSPF playlist from a Zip archive
*****************************************************************************
- * Copyright (C) 2007 the VideoLAN team
+ * Copyright (C) 2009 the VideoLAN team
* $Id$
*
* Authors: Jean-Philippe André <jpeg@videolan.org>
add_submodule()
set_subcategory( SUBCAT_INPUT_ACCESS )
set_description( _( "Zip access" ) )
- set_capability( "access", 70 )
+ set_capability( "access", 0 )
add_shortcut( "unzip" )
add_shortcut( "zip" )
set_callbacks( AccessOpen, AccessClose )
}
/* Find the stream uri */
- /* FIXME FIXME FIXME */
- input_thread_t *p_input_thread = (input_thread_t*)
- vlc_object_find( p_this, VLC_OBJECT_INPUT, FIND_PARENT );
- if( !p_input_thread )
- {
- free( p_sys );
- free( p_sys->fileFunctions );
- return VLC_EGENERIC;
- }
- input_item_t *p_input_item = input_GetItem( p_input_thread );
- if( !p_input_item )
+ char *psz_tmp;
+ if( asprintf( &psz_tmp, "%s.xspf", s->psz_path ) == -1 )
{
free( p_sys );
free( p_sys->fileFunctions );
- return VLC_EGENERIC;
+ return VLC_ENOMEM;
}
- s->p_sys->psz_path = strdup( p_input_item->psz_uri );
- vlc_gc_decref( p_input_item );
-// vlc_object_release( p_input_thread );
- /* FIXME FIXME FIXME */
+ p_sys->psz_path = s->psz_path;
+ s->psz_path = psz_tmp;
return VLC_SUCCESS;
}
return VLC_SUCCESS;
}
- case STREAM_GET_MTU:
- {
- int *pi_mtu = (int*)va_arg( args, int* );
- *pi_mtu = 0;
- return VLC_SUCCESS;
- }
-
case STREAM_GET_CONTENT_TYPE:
return VLC_EGENERIC;