Commit a78bbdd2 authored by Thomas Guillem's avatar Thomas Guillem

access: change ACCESS_IS_DIRECTORY / STREAM_IS_DIRECTORY args

The first sort argument is no longer necessary.
parent 9109718b
......@@ -43,7 +43,7 @@ enum access_query_e
ACCESS_CAN_PAUSE, /* arg1= bool* cannot fail */
ACCESS_CAN_CONTROL_PACE,/* arg1= bool* cannot fail */
ACCESS_GET_SIZE=6, /* arg1= uin64_t* */
ACCESS_IS_DIRECTORY, /* arg1= bool *, arg2= bool *, res=can fail */
ACCESS_IS_DIRECTORY, /* arg1= bool *, res=can fail */
/* */
ACCESS_GET_PTS_DELAY = 0x101,/* arg1= int64_t* cannot fail */
......
......@@ -80,7 +80,7 @@ enum stream_query_e
STREAM_CAN_CONTROL_PACE, /**< arg1= bool * res=cannot fail*/
/* */
STREAM_GET_SIZE=6, /**< arg1= uint64_t * res=can fail */
STREAM_IS_DIRECTORY, /**< arg1= bool *, arg2= bool *, res=can fail*/
STREAM_IS_DIRECTORY, /**< arg1= bool *, res=can fail*/
/* */
STREAM_GET_PTS_DELAY = 0x101,/**< arg1= int64_t* res=cannot fail */
......
......@@ -45,7 +45,6 @@ static int Control(stream_t *p_stream, int i_query, va_list args)
switch( i_query )
{
case STREAM_IS_DIRECTORY:
*va_arg( args, bool * ) = false;
*va_arg( args, bool * ) = false;
break;
......
......@@ -626,7 +626,6 @@ static int DirControl( access_t *p_access, int i_query, va_list args )
switch( i_query )
{
case ACCESS_IS_DIRECTORY:
*va_arg( args, bool * ) = false; /* is not sorted */
*va_arg( args, bool * ) = p_access->pf_readdir == BrowseDirectory;
/* might loop */
break;
......
......@@ -924,7 +924,6 @@ static int DirControl( access_t *p_access, int i_query, va_list args )
switch( i_query )
{
case ACCESS_IS_DIRECTORY:
*va_arg( args, bool * ) = false; /* is not sorted */
*va_arg( args, bool * ) = true; /* might loop */
break;
default:
......
......@@ -400,7 +400,6 @@ DirControl(access_t *p_access, int i_query, va_list args)
switch (i_query)
{
case ACCESS_IS_DIRECTORY:
*va_arg( args, bool * ) = false; /* is not sorted */
*va_arg( args, bool * ) = true; /* might loop */
break;
default:
......
......@@ -538,7 +538,6 @@ static int DirControl( access_t *p_access, int i_query, va_list args )
switch( i_query )
{
case ACCESS_IS_DIRECTORY:
*va_arg( args, bool * ) = false; /* is not sorted */
*va_arg( args, bool * ) = true; /* might loop */
break;
default:
......
......@@ -413,7 +413,6 @@ static int DirControl( access_t *p_access, int i_query, va_list args )
switch( i_query )
{
case ACCESS_IS_DIRECTORY:
*va_arg( args, bool * ) = false; /* is not sorted */
*va_arg( args, bool * ) = true; /* might loop */
break;
default:
......
......@@ -35,7 +35,6 @@
struct demux_sys_t
{
bool b_dir_sorted;
bool b_dir_can_loop;
};
......@@ -48,14 +47,12 @@ static int Demux( demux_t *p_demux );
int Import_Dir ( vlc_object_t *p_this)
{
demux_t *p_demux = (demux_t *)p_this;
bool b_dir_sorted, b_dir_can_loop;
bool b_dir_can_loop;
if( stream_Control( p_demux->s, STREAM_IS_DIRECTORY,
&b_dir_sorted, &b_dir_can_loop ) )
if( stream_Control( p_demux->s, STREAM_IS_DIRECTORY, &b_dir_can_loop ) )
return VLC_EGENERIC;
STANDARD_DEMUX_INIT_MSG( "reading directory content" );
p_demux->p_sys->b_dir_sorted = b_dir_sorted;
p_demux->p_sys->b_dir_can_loop = b_dir_can_loop;
return VLC_SUCCESS;
......
......@@ -84,9 +84,9 @@ bool CheckContentType( stream_t * p_stream, const char * psz_ctype );
#define CHECK_FILE() \
do { \
bool b_sorted, b_loop; \
bool b_loop; \
if( stream_Control( ((demux_t *)p_this)->s, STREAM_IS_DIRECTORY, \
&b_sorted, &b_loop ) == VLC_SUCCESS ) \
&b_loop ) == VLC_SUCCESS ) \
return VLC_EGENERIC; \
} while(0)
......
......@@ -1061,7 +1061,6 @@ static int ControlDirectory( access_t *p_access, int i_query, va_list args )
switch( i_query )
{
case ACCESS_IS_DIRECTORY:
*va_arg( args, bool * ) = true; /* is sorted */
*va_arg( args, bool * ) = true; /* might loop */
break;
default:
......
......@@ -173,7 +173,6 @@ int access_vaDirectoryControlHelper( access_t *p_access, int i_query, va_list ar
*va_arg( args, int64_t * ) = 0;
break;
case ACCESS_IS_DIRECTORY:
*va_arg( args, bool * ) = false;
*va_arg( args, bool * ) = false;
break;
default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment