[vlc-commits] access: change ACCESS_IS_DIRECTORY / STREAM_IS_DIRECTORY args

Thomas Guillem git at videolan.org
Thu May 19 15:57:26 CEST 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Apr 29 12:39:44 2016 +0200| [a78bbdd234ce88577022a2a97c0645bb5e8162b7] | committer: Thomas Guillem

access: change ACCESS_IS_DIRECTORY / STREAM_IS_DIRECTORY args

The first sort argument is no longer necessary.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a78bbdd234ce88577022a2a97c0645bb5e8162b7
---

 include/vlc_access.h                |    2 +-
 include/vlc_stream.h                |    2 +-
 modules/access/archive/stream.c     |    1 -
 modules/access/dsm/access.c         |    1 -
 modules/access/ftp.c                |    1 -
 modules/access/nfs.c                |    1 -
 modules/access/sftp.c               |    1 -
 modules/access/smb.c                |    1 -
 modules/demux/playlist/directory.c  |    7 ++-----
 modules/demux/playlist/playlist.h   |    4 ++--
 modules/services_discovery/upnp.cpp |    1 -
 src/input/access.c                  |    1 -
 12 files changed, 6 insertions(+), 17 deletions(-)

diff --git a/include/vlc_access.h b/include/vlc_access.h
index 9ac8a81..7764716 100644
--- a/include/vlc_access.h
+++ b/include/vlc_access.h
@@ -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 */
diff --git a/include/vlc_stream.h b/include/vlc_stream.h
index 0b64f61..06df123 100644
--- a/include/vlc_stream.h
+++ b/include/vlc_stream.h
@@ -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 */
diff --git a/modules/access/archive/stream.c b/modules/access/archive/stream.c
index 2fb7986..05d1ec1 100644
--- a/modules/access/archive/stream.c
+++ b/modules/access/archive/stream.c
@@ -46,7 +46,6 @@ static int Control(stream_t *p_stream, int i_query, va_list args)
     {
         case STREAM_IS_DIRECTORY:
             *va_arg( args, bool * ) = false;
-            *va_arg( args, bool * ) = false;
             break;
 
         case STREAM_CAN_SEEK:
diff --git a/modules/access/dsm/access.c b/modules/access/dsm/access.c
index 94155ca..ea07949 100644
--- a/modules/access/dsm/access.c
+++ b/modules/access/dsm/access.c
@@ -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;
diff --git a/modules/access/ftp.c b/modules/access/ftp.c
index 7017ea1..9b8e9b5 100644
--- a/modules/access/ftp.c
+++ b/modules/access/ftp.c
@@ -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:
diff --git a/modules/access/nfs.c b/modules/access/nfs.c
index 9e5b6a2..fe65e44 100644
--- a/modules/access/nfs.c
+++ b/modules/access/nfs.c
@@ -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:
diff --git a/modules/access/sftp.c b/modules/access/sftp.c
index 550d69d..498626b 100644
--- a/modules/access/sftp.c
+++ b/modules/access/sftp.c
@@ -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:
diff --git a/modules/access/smb.c b/modules/access/smb.c
index 5f6bd2e..e5ebb4f 100644
--- a/modules/access/smb.c
+++ b/modules/access/smb.c
@@ -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:
diff --git a/modules/demux/playlist/directory.c b/modules/demux/playlist/directory.c
index 314568f..034b037 100644
--- a/modules/demux/playlist/directory.c
+++ b/modules/demux/playlist/directory.c
@@ -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;
diff --git a/modules/demux/playlist/playlist.h b/modules/demux/playlist/playlist.h
index 3a8090e..de9290e 100644
--- a/modules/demux/playlist/playlist.h
+++ b/modules/demux/playlist/playlist.h
@@ -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)
 
diff --git a/modules/services_discovery/upnp.cpp b/modules/services_discovery/upnp.cpp
index c5c30a8..122c378 100644
--- a/modules/services_discovery/upnp.cpp
+++ b/modules/services_discovery/upnp.cpp
@@ -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:
diff --git a/src/input/access.c b/src/input/access.c
index 520e450..aaf6530 100644
--- a/src/input/access.c
+++ b/src/input/access.c
@@ -174,7 +174,6 @@ int access_vaDirectoryControlHelper( access_t *p_access, int i_query, va_list ar
             break;
         case ACCESS_IS_DIRECTORY:
             *va_arg( args, bool * ) = false;
-            *va_arg( args, bool * ) = false;
             break;
         default:
             return VLC_EGENERIC;



More information about the vlc-commits mailing list