Commit c0d5d158 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

stream: removed unused control argument

parent 7898afcf
......@@ -143,7 +143,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 *, res=can fail*/
STREAM_IS_DIRECTORY, /**< res=can fail */
/* */
STREAM_GET_PTS_DELAY = 0x101,/**< arg1= int64_t* res=cannot fail */
......
......@@ -614,21 +614,6 @@ static int BrowseDirectory( access_t *p_access, input_item_node_t *p_node )
return i_ret;
}
static int DirControl( access_t *p_access, int i_query, va_list args )
{
switch( i_query )
{
case STREAM_IS_DIRECTORY:
*va_arg( args, bool * ) = p_access->pf_readdir == BrowseDirectory;
/* might loop */
break;
default:
return access_vaDirectoryControlHelper( p_access, i_query, args );
}
return VLC_SUCCESS;
}
static int BrowserInit( access_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
......@@ -637,7 +622,7 @@ static int BrowserInit( access_t *p_access )
p_access->pf_readdir = BrowseShare;
else
p_access->pf_readdir = BrowseDirectory;
p_access->pf_control = DirControl;
p_access->pf_control = access_vaDirectoryControlHelper;
return VLC_SUCCESS;
}
......@@ -113,7 +113,6 @@ static ssize_t Read( access_t *, void *, size_t );
static int Seek( access_t *, uint64_t );
static int Control( access_t *, int, va_list );
static int DirRead( access_t *, input_item_node_t * );
static int DirControl( access_t *, int, va_list );
#ifdef ENABLE_SOUT
static int OutSeek( sout_access_out_t *, off_t );
static ssize_t Write( sout_access_out_t *, block_t * );
......@@ -728,7 +727,7 @@ static int InOpen( vlc_object_t *p_this )
if( b_directory )
{
p_access->pf_readdir = DirRead;
p_access->pf_control = DirControl;
p_access->pf_control = access_vaDirectoryControlHelper;
} else
ACCESS_SET_CALLBACKS( Read, NULL, Control, Seek ); \
......@@ -963,20 +962,6 @@ static int DirRead (access_t *p_access, input_item_node_t *p_current_node)
return i_ret;
}
static int DirControl( access_t *p_access, int i_query, va_list args )
{
switch( i_query )
{
case STREAM_IS_DIRECTORY:
*va_arg( args, bool * ) = true; /* might loop */
break;
default:
return access_vaDirectoryControlHelper( p_access, i_query, args );
}
return VLC_SUCCESS;
}
/*****************************************************************************
* Write:
*****************************************************************************/
......
......@@ -401,21 +401,6 @@ MountRead(access_t *p_access, input_item_node_t *p_node)
return i_ret;
}
static int
DirControl(access_t *p_access, int i_query, va_list args)
{
switch (i_query)
{
case STREAM_IS_DIRECTORY:
*va_arg( args, bool * ) = true; /* might loop */
break;
default:
return access_vaDirectoryControlHelper(p_access, i_query, args);
}
return VLC_SUCCESS;
}
static void
nfs_opendir_cb(int i_status, struct nfs_context *p_nfs, void *p_data,
void *p_private_data)
......@@ -712,7 +697,7 @@ Open(vlc_object_t *p_obj)
{
p_access->pf_readdir = DirRead;
p_access->pf_seek = NULL;
p_access->pf_control = DirControl;
p_access->pf_control = access_vaDirectoryControlHelper;
}
else
vlc_assert_unreachable();
......@@ -745,7 +730,7 @@ Open(vlc_object_t *p_obj)
p_access->pf_readdir = MountRead;
p_access->pf_seek = NULL;
p_access->pf_control = DirControl;
p_access->pf_control = access_vaDirectoryControlHelper;
}
return VLC_SUCCESS;
......
......@@ -81,7 +81,6 @@ static int Seek( access_t *, uint64_t );
static int Control( access_t *, int, va_list );
static int DirRead( access_t *, input_item_node_t * );
static int DirControl( access_t *, int, va_list );
struct access_sys_t
{
......@@ -402,7 +401,7 @@ static int Open( vlc_object_t* p_this )
p_sys->file = libssh2_sftp_opendir( p_sys->sftp_session, psz_path );
p_access->pf_readdir = DirRead;
p_access->pf_control = DirControl;
p_access->pf_control = access_vaDirectoryControlHelper;
if( !p_sys->psz_base_url )
{
......@@ -600,17 +599,3 @@ static int DirRead (access_t *p_access, input_item_node_t *p_current_node)
free( psz_file );
return i_ret;
}
static int DirControl( access_t *p_access, int i_query, va_list args )
{
switch( i_query )
{
case STREAM_IS_DIRECTORY:
*va_arg( args, bool * ) = true; /* might loop */
break;
default:
return access_vaDirectoryControlHelper( p_access, i_query, args );
}
return VLC_SUCCESS;
}
......@@ -85,7 +85,6 @@ static int Seek( access_t *, uint64_t );
static int Control( access_t *, int, va_list );
#ifndef _WIN32
static int DirRead( access_t *, input_item_node_t * );
static int DirControl( access_t *, int, va_list );
#endif
struct access_sys_t
......@@ -244,7 +243,7 @@ static int Open( vlc_object_t *p_this )
#else
p_sys->url = url;
p_access->pf_readdir = DirRead;
p_access->pf_control = DirControl;
p_access->pf_control = access_vaDirectoryControlHelper;
i_smb = smbc_opendir( psz_uri );
i_size = 0;
#endif
......@@ -399,20 +398,6 @@ static int DirRead (access_t *p_access, input_item_node_t *p_node )
return i_ret;
}
static int DirControl( access_t *p_access, int i_query, va_list args )
{
switch( i_query )
{
case STREAM_IS_DIRECTORY:
*va_arg( args, bool * ) = true; /* might loop */
break;
default:
return access_vaDirectoryControlHelper( p_access, i_query, args );
}
return VLC_SUCCESS;
}
#endif
/*****************************************************************************
......
......@@ -42,9 +42,8 @@ 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_can_loop;
if( vlc_stream_Control( p_demux->s, STREAM_IS_DIRECTORY, &b_dir_can_loop ) )
if( vlc_stream_Control( p_demux->s, STREAM_IS_DIRECTORY ) )
return VLC_EGENERIC;
p_demux->pf_demux = Demux;
......
......@@ -81,9 +81,8 @@ bool CheckMimeType( stream_t * p_stream, const char * psz_ctype );
#define CHECK_FILE() \
do { \
bool b_loop; \
if( vlc_stream_Control( ((demux_t *)p_this)->s, STREAM_IS_DIRECTORY, \
&b_loop ) == VLC_SUCCESS ) \
if( vlc_stream_Control( ((demux_t *)p_this)->s, \
STREAM_IS_DIRECTORY ) == VLC_SUCCESS ) \
return VLC_EGENERIC; \
} while(0)
......
......@@ -1259,20 +1259,6 @@ static int ReadDirectory( access_t *p_access, input_item_node_t* p_node )
return VLC_SUCCESS;
}
static int ControlDirectory( access_t *p_access, int i_query, va_list args )
{
switch( i_query )
{
case STREAM_IS_DIRECTORY:
*va_arg( args, bool * ) = true; /* might loop */
break;
default:
return access_vaDirectoryControlHelper( p_access, i_query, args );
}
return VLC_SUCCESS;
}
static int Open( vlc_object_t *p_this )
{
access_t* p_access = (access_t*)p_this;
......@@ -1289,7 +1275,7 @@ static int Open( vlc_object_t *p_this )
}
p_access->pf_readdir = ReadDirectory;
p_access->pf_control = ControlDirectory;
p_access->pf_control = access_vaDirectoryControlHelper;
return VLC_SUCCESS;
}
......
......@@ -171,7 +171,6 @@ int access_vaDirectoryControlHelper( access_t *p_access, int i_query, va_list ar
*va_arg( args, int64_t * ) = 0;
break;
case STREAM_IS_DIRECTORY:
*va_arg( args, bool * ) = false;
break;
default:
return VLC_EGENERIC;
......
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