access: remove ACCESS controls, use STREAM
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 18 Jul 2016 16:00:59 +0000 (19:00 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 21 Jul 2016 16:59:24 +0000 (19:59 +0300)
They have been identical for a while.

37 files changed:
include/vlc_access.h
modules/access/archive/access.c
modules/access/attachment.c
modules/access/avio.c
modules/access/cdda.c
modules/access/concat.c
modules/access/dshow/dshow.cpp
modules/access/dsm/access.c
modules/access/dtv/access.c
modules/access/dv.c
modules/access/dvb/access.c
modules/access/eyetv.m
modules/access/file.c
modules/access/ftp.c
modules/access/http.c
modules/access/http/access.c
modules/access/imem-access.c
modules/access/imem.c
modules/access/mms/mmsh.c
modules/access/mms/mmstu.c
modules/access/mtp.c
modules/access/nfs.c
modules/access/rar/access.c
modules/access/rtsp/access.c
modules/access/satip.c
modules/access/sdp.c
modules/access/sftp.c
modules/access/smb.c
modules/access/tcp.c
modules/access/udp.c
modules/access/v4l2/access.c
modules/access/vcd/vcd.c
modules/access/vdr.c
modules/access/zip/zipaccess.c
modules/demux/ogg.c
modules/services_discovery/upnp.cpp
src/input/access.c

index fbf56f8..34950a4 100644 (file)
@@ -24,7 +24,7 @@
 #ifndef VLC_ACCESS_H
 #define VLC_ACCESS_H 1
 
-#include <vlc_block.h>
+#include <vlc_stream.h>
 
 /**
  * \defgroup access Access
  * Input byte stream modules interface
  */
 
-enum access_query_e
-{
-    /* capabilities */
-    ACCESS_CAN_SEEK,        /* arg1= bool*    cannot fail */
-    ACCESS_CAN_FASTSEEK,    /* arg1= bool*    cannot fail */
-    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 *, res=can fail */
-
-    /* */
-    ACCESS_GET_PTS_DELAY = 0x101,/* arg1= int64_t*       cannot fail */
-    ACCESS_GET_TITLE_INFO,  /* arg1=input_title_t*** arg2=int*  res=can fail */
-    ACCESS_GET_TITLE,       /* arg1=unsigned * res=can fail */
-    ACCESS_GET_SEEKPOINT,   /* arg1=unsigned * res=can fail */
-
-    /* Meta data */
-    ACCESS_GET_META,        /* arg1= vlc_meta_t * res=can fail */
-    ACCESS_GET_CONTENT_TYPE,/* arg1=char **ppsz_content_type res=can fail */
-
-    ACCESS_GET_SIGNAL,      /* arg1=double *pf_quality, arg2=double *pf_strength   res=can fail */
-
-    /* */
-    ACCESS_SET_PAUSE_STATE = 0x200, /* arg1= bool           can fail */
-
-    /* */
-    ACCESS_SET_TITLE,       /* arg1= int            can fail */
-    ACCESS_SET_SEEKPOINT,   /* arg1= int            can fail */
-
-    /* Special mode for access/demux communication
-     * XXX: avoid to use it unless you can't */
-    ACCESS_SET_PRIVATE_ID_STATE = 0x1000, /* arg1= int i_private_data, bool b_selected    res=can fail */
-    ACCESS_SET_PRIVATE_ID_CA,             /* arg1= int i_program_number, uint16_t i_vpid, uint16_t i_apid1, uint16_t i_apid2, uint16_t i_apid3, uint8_t i_length, uint8_t *p_data */
-    ACCESS_GET_PRIVATE_ID_STATE,          /* arg1=int i_private_data arg2=bool *          res=can fail */
-};
-
 struct access_t
 {
     VLC_COMMON_MEMBERS
@@ -96,7 +60,7 @@ struct access_t
     int         (*pf_seek) ( access_t *, uint64_t );         /* can be null if can't seek */
 
     /* Used to retrieve and configure the access
-     * XXX mandatory. look at access_query_e to know what query you *have to* support */
+     * XXX mandatory. look at stream_query_e to know what query you *have to* support */
     int         (*pf_control)( access_t *, int i_query, va_list args);
 
     /* Access has to maintain them uptodate */
@@ -236,7 +200,7 @@ static inline int access_Control( access_t *p_access, int i_query, ... )
 
 static inline int access_GetSize( access_t *p_access, uint64_t *size )
 {
-    return access_Control( p_access, ACCESS_GET_SIZE, size );
+    return access_Control( p_access, STREAM_GET_SIZE, size );
 }
 
 /**
index bb1b9e8..5f824f6 100644 (file)
@@ -265,11 +265,11 @@ static int Control(access_t *p_access, int i_query, va_list args)
     switch (i_query)
     {
 
-    case ACCESS_CAN_SEEK:
+    case STREAM_CAN_SEEK:
         *va_arg(args, bool *)= p_sys->b_seekable;
         break;
 
-    case ACCESS_CAN_FASTSEEK:
+    case STREAM_CAN_FASTSEEK:
         if (!p_sys->b_seekable || !p_sys->p_stream)
         {
             *va_arg( args, bool* ) = false;
@@ -278,19 +278,19 @@ static int Control(access_t *p_access, int i_query, va_list args)
         else
             return stream_vaControl( p_sys->p_stream, i_query, args );
 
-    case ACCESS_SET_PAUSE_STATE:
+    case STREAM_SET_PAUSE_STATE:
         break;
 
-    case ACCESS_CAN_PAUSE:
-    case ACCESS_CAN_CONTROL_PACE:
+    case STREAM_CAN_PAUSE:
+    case STREAM_CAN_CONTROL_PACE:
         *va_arg(args, bool *) = true;
         break;
 
-    case ACCESS_GET_SIZE:
+    case STREAM_GET_SIZE:
         *va_arg(args, uint64_t *) = archive_entry_size(p_sys->p_entry);
         break;
 
-    case ACCESS_GET_PTS_DELAY:
+    case STREAM_GET_PTS_DELAY:
         *va_arg(args, int64_t *) = DEFAULT_PTS_DELAY;
         break;
 
index c5ddee4..0f4a8c8 100644 (file)
@@ -144,19 +144,19 @@ static int Control(access_t *access, int query, va_list args)
 
     switch (query)
     {
-    case ACCESS_CAN_SEEK:
-    case ACCESS_CAN_FASTSEEK:
-    case ACCESS_CAN_PAUSE:
-    case ACCESS_CAN_CONTROL_PACE:
+    case STREAM_CAN_SEEK:
+    case STREAM_CAN_FASTSEEK:
+    case STREAM_CAN_PAUSE:
+    case STREAM_CAN_CONTROL_PACE:
         *va_arg(args, bool *) = true;
         break;
-    case ACCESS_GET_SIZE:
+    case STREAM_GET_SIZE:
         *va_arg(args, uint64_t *) = sys->attachment->i_data;
         break;
-    case ACCESS_GET_PTS_DELAY:
+    case STREAM_GET_PTS_DELAY:
         *va_arg(args, int64_t *) = DEFAULT_PTS_DELAY;
         break;
-    case ACCESS_SET_PAUSE_STATE:
+    case STREAM_SET_PAUSE_STATE:
         return VLC_SUCCESS;
 
     default:
index d4f0cc6..a05cc71 100644 (file)
@@ -406,8 +406,8 @@ static int Control(access_t *access, int query, va_list args)
     bool *b;
 
     switch (query) {
-    case ACCESS_CAN_SEEK:
-    case ACCESS_CAN_FASTSEEK: /* FIXME how to do that ? */
+    case STREAM_CAN_SEEK:
+    case STREAM_CAN_FASTSEEK: /* FIXME how to do that ? */
         b = va_arg(args, bool *);
 #if LIBAVFORMAT_VERSION_MAJOR < 54
         *b = !sys->context->is_streamed;
@@ -415,7 +415,7 @@ static int Control(access_t *access, int query, va_list args)
         *b = sys->context->seekable;
 #endif
         return VLC_SUCCESS;
-    case ACCESS_CAN_PAUSE:
+    case STREAM_CAN_PAUSE:
         b = va_arg(args, bool *);
 #if LIBAVFORMAT_VERSION_MAJOR < 54
         *b = sys->context->prot->url_read_pause != NULL;
@@ -423,21 +423,21 @@ static int Control(access_t *access, int query, va_list args)
         *b = sys->context->read_pause != NULL;
 #endif
         return VLC_SUCCESS;
-    case ACCESS_CAN_CONTROL_PACE:
+    case STREAM_CAN_CONTROL_PACE:
         b = va_arg(args, bool *);
         *b = true; /* FIXME */
         return VLC_SUCCESS;
-    case ACCESS_GET_SIZE:
+    case STREAM_GET_SIZE:
         if (sys->size < 0)
             return VLC_EGENERIC;
         *va_arg(args, uint64_t *) = sys->size;
         return VLC_SUCCESS;
-    case ACCESS_GET_PTS_DELAY: {
+    case STREAM_GET_PTS_DELAY: {
         int64_t *delay = va_arg(args, int64_t *);
         *delay = INT64_C(1000) * var_InheritInteger(access, "network-caching");
         return VLC_SUCCESS;
     }
-    case ACCESS_SET_PAUSE_STATE: {
+    case STREAM_SET_PAUSE_STATE: {
         bool is_paused = va_arg(args, int);
         if (avio_pause(sys->context, is_paused)< 0)
             return VLC_EGENERIC;
index 85daf46..e306c67 100644 (file)
@@ -351,21 +351,21 @@ static int Control( access_t *p_access, int i_query, va_list args )
 {
     switch( i_query )
     {
-        case ACCESS_CAN_SEEK:
-        case ACCESS_CAN_FASTSEEK:
-        case ACCESS_CAN_PAUSE:
-        case ACCESS_CAN_CONTROL_PACE:
+        case STREAM_CAN_SEEK:
+        case STREAM_CAN_FASTSEEK:
+        case STREAM_CAN_PAUSE:
+        case STREAM_CAN_CONTROL_PACE:
             *va_arg( args, bool* ) = true;
             break;
-        case ACCESS_GET_SIZE:
+        case STREAM_GET_SIZE:
             *va_arg( args, uint64_t * ) = p_access->p_sys->size;
             break;
-        case ACCESS_GET_PTS_DELAY:
+        case STREAM_GET_PTS_DELAY:
             *va_arg( args, int64_t * ) =
                 INT64_C(1000) * var_InheritInteger( p_access, "disc-caching" );
             break;
 
-        case ACCESS_SET_PAUSE_STATE:
+        case STREAM_SET_PAUSE_STATE:
             break;
 
         default:
index 18e9bdd..c12f03a 100644 (file)
@@ -142,7 +142,7 @@ static int Seek(access_t *access, uint64_t position)
             break;
 
         bool can_seek;
-        access_Control(a, ACCESS_CAN_SEEK, &can_seek);
+        access_Control(a, STREAM_CAN_SEEK, &can_seek);
         if (!can_seek)
             break;
 
@@ -171,29 +171,29 @@ static int Control(access_t *access, int query, va_list args)
 
     switch (query)
     {
-        case ACCESS_CAN_SEEK:
+        case STREAM_CAN_SEEK:
             *va_arg(args, bool *) = sys->can_seek;
             break;
-        case ACCESS_CAN_FASTSEEK:
+        case STREAM_CAN_FASTSEEK:
             *va_arg(args, bool *) = sys->can_seek_fast;
             break;
-        case ACCESS_CAN_PAUSE:
+        case STREAM_CAN_PAUSE:
             *va_arg(args, bool *) = sys->can_pause;
             break;
-        case ACCESS_CAN_CONTROL_PACE:
+        case STREAM_CAN_CONTROL_PACE:
             *va_arg(args, bool *) = sys->can_control_pace;
             break;
-        case ACCESS_GET_SIZE:
+        case STREAM_GET_SIZE:
             if (sys->size == UINT64_MAX)
                 return VLC_EGENERIC;
             *va_arg(args, uint64_t *) = sys->size;
             break;
-        case ACCESS_GET_PTS_DELAY:
+        case STREAM_GET_PTS_DELAY:
             *va_arg(args, int64_t *) = sys->caching;
             break;
 
-        case ACCESS_GET_SIGNAL:
-        case ACCESS_SET_PAUSE_STATE:
+        case STREAM_GET_SIGNAL:
+        case STREAM_SET_PAUSE_STATE:
             return access_vaControl(sys->access, query, args);
 
         default:
@@ -265,13 +265,13 @@ static int Open(vlc_object_t *obj)
         memcpy(e->mrl, mrl, mlen + 1);
 
         if (sys->can_seek)
-            access_Control(a, ACCESS_CAN_SEEK, &sys->can_seek);
+            access_Control(a, STREAM_CAN_SEEK, &sys->can_seek);
         if (sys->can_seek_fast)
-            access_Control(a, ACCESS_CAN_FASTSEEK, &sys->can_seek_fast);
+            access_Control(a, STREAM_CAN_FASTSEEK, &sys->can_seek_fast);
         if (sys->can_pause)
-            access_Control(a, ACCESS_CAN_PAUSE, &sys->can_pause);
+            access_Control(a, STREAM_CAN_PAUSE, &sys->can_pause);
         if (sys->can_control_pace)
-            access_Control(a, ACCESS_CAN_CONTROL_PACE, &sys->can_control_pace);
+            access_Control(a, STREAM_CAN_CONTROL_PACE, &sys->can_control_pace);
         if (sys->size != UINT64_MAX)
         {
             uint64_t size;
@@ -283,7 +283,7 @@ static int Open(vlc_object_t *obj)
         }
 
         int64_t caching;
-        access_Control(a, ACCESS_GET_PTS_DELAY, &caching);
+        access_Control(a, STREAM_GET_PTS_DELAY, &caching);
         if (caching > sys->caching)
             sys->caching = caching;
 
index f8901bf..5edac9d 100644 (file)
@@ -1901,21 +1901,21 @@ static int AccessControl( access_t *p_access, int i_query, va_list args )
 
     switch( i_query )
     {
-    case ACCESS_CAN_SEEK:
-    case ACCESS_CAN_FASTSEEK:
-    case ACCESS_CAN_PAUSE:
-    case ACCESS_CAN_CONTROL_PACE:
+    case STREAM_CAN_SEEK:
+    case STREAM_CAN_FASTSEEK:
+    case STREAM_CAN_PAUSE:
+    case STREAM_CAN_CONTROL_PACE:
         pb_bool = (bool*)va_arg( args, bool* );
         *pb_bool = false;
         break;
 
-    case ACCESS_GET_PTS_DELAY:
+    case STREAM_GET_PTS_DELAY:
         pi_64 = (int64_t*)va_arg( args, int64_t * );
         *pi_64 =
             INT64_C(1000) * var_InheritInteger( p_access, "live-caching" );
         break;
 
-    case ACCESS_GET_CONTENT_TYPE:
+    case STREAM_GET_CONTENT_TYPE:
     {
         dshow_stream_t *p_stream = p_access->p_sys->pp_streams[0];
         char **type = va_arg( args, char ** );
index 7229904..879fc96 100644 (file)
@@ -477,29 +477,29 @@ static int Control( access_t *p_access, int i_query, va_list args )
 {
     switch( i_query )
     {
-    case ACCESS_CAN_SEEK:
-    case ACCESS_CAN_PAUSE:
-    case ACCESS_CAN_CONTROL_PACE:
+    case STREAM_CAN_SEEK:
+    case STREAM_CAN_PAUSE:
+    case STREAM_CAN_CONTROL_PACE:
         *va_arg( args, bool* ) = true;
         break;
 
-    case ACCESS_CAN_FASTSEEK:
+    case STREAM_CAN_FASTSEEK:
         *va_arg( args, bool* ) = false;
         break;
 
-    case ACCESS_GET_SIZE:
+    case STREAM_GET_SIZE:
     {
         smb_stat st = smb_stat_fd( p_access->p_sys->p_session,
                                    p_access->p_sys->i_fd );
         *va_arg( args, uint64_t * ) = smb_stat_get( st, SMB_STAT_SIZE );
         break;
     }
-    case ACCESS_GET_PTS_DELAY:
+    case STREAM_GET_PTS_DELAY:
         *va_arg( args, int64_t * ) = INT64_C(1000)
             * var_InheritInteger( p_access, "network-caching" );
         break;
 
-    case ACCESS_SET_PAUSE_STATE:
+    case STREAM_SET_PAUSE_STATE:
         /* Nothing to do */
         break;
 
@@ -617,7 +617,7 @@ static int DirControl( access_t *p_access, int i_query, va_list args )
 {
     switch( i_query )
     {
-    case ACCESS_IS_DIRECTORY:
+    case STREAM_IS_DIRECTORY:
         *va_arg( args, bool * ) = p_access->pf_readdir == BrowseDirectory;
                                   /* might loop */
         break;
index fd438ba..c52fb0a 100644 (file)
@@ -529,25 +529,25 @@ static int Control (access_t *access, int query, va_list args)
 
     switch (query)
     {
-        case ACCESS_CAN_SEEK:
-        case ACCESS_CAN_FASTSEEK:
-        case ACCESS_CAN_PAUSE:
-        case ACCESS_CAN_CONTROL_PACE:
+        case STREAM_CAN_SEEK:
+        case STREAM_CAN_FASTSEEK:
+        case STREAM_CAN_PAUSE:
+        case STREAM_CAN_CONTROL_PACE:
             *va_arg (args, bool *) = false;
             break;
 
-        case ACCESS_GET_PTS_DELAY:
+        case STREAM_GET_PTS_DELAY:
         {
             int64_t *v = va_arg (args, int64_t *);
             *v = var_InheritInteger (access, "live-caching") * INT64_C(1000);
             break;
         }
 
-        case ACCESS_GET_CONTENT_TYPE:
+        case STREAM_GET_CONTENT_TYPE:
             *va_arg (args, char **) = strdup ("video/MP2T");
             break;
 
-        case ACCESS_GET_SIGNAL:
+        case STREAM_GET_SIGNAL:
             /* Fetch the signal levels only every so often to avoid stressing
              * the device bus. */
             if ((sys->signal_poll++))
@@ -557,7 +557,7 @@ static int Control (access_t *access, int query, va_list args)
             *va_arg (args, double *) = dvb_get_signal_strength (dev);
             return VLC_SUCCESS;
 
-        case ACCESS_SET_PRIVATE_ID_STATE:
+        case STREAM_SET_PRIVATE_ID_STATE:
         {
             unsigned pid = va_arg (args, int);
             bool add = va_arg (args, int);
@@ -574,7 +574,7 @@ static int Control (access_t *access, int query, va_list args)
             break;
         }
 
-        case ACCESS_SET_PRIVATE_ID_CA:
+        case STREAM_SET_PRIVATE_ID_CA:
         {
             en50221_capmt_info_t *pmt = va_arg (args, en50221_capmt_info_t *);
 
@@ -583,7 +583,7 @@ static int Control (access_t *access, int query, va_list args)
             break;
         }
 
-        case ACCESS_GET_PRIVATE_ID_STATE:
+        case STREAM_GET_PRIVATE_ID_STATE:
         {
             unsigned pid = va_arg (args, int);
             bool *on = va_arg (args, bool *);
index 6600880..43ccb5a 100644 (file)
@@ -270,23 +270,23 @@ static int Control( access_t *p_access, int i_query, va_list args )
     switch( i_query )
     {
         /* */
-        case ACCESS_CAN_PAUSE:
+        case STREAM_CAN_PAUSE:
             *va_arg( args, bool* ) = true;
             break;
 
-       case ACCESS_CAN_SEEK:
-       case ACCESS_CAN_FASTSEEK:
-       case ACCESS_CAN_CONTROL_PACE:
+       case STREAM_CAN_SEEK:
+       case STREAM_CAN_FASTSEEK:
+       case STREAM_CAN_CONTROL_PACE:
             *va_arg( args, bool* ) = false;
             break;
 
-        case ACCESS_GET_PTS_DELAY:
+        case STREAM_GET_PTS_DELAY:
             *va_arg( args, int64_t * ) =
                 INT64_C(1000) * var_InheritInteger( p_access, "live-caching" );
             break;
 
         /* */
-        case ACCESS_SET_PAUSE_STATE:
+        case STREAM_SET_PAUSE_STATE:
             AVCPause( p_access, p_access->p_sys->i_node );
             break;
 
index ae5d5d6..28e06df 100644 (file)
@@ -388,24 +388,24 @@ static int Control( access_t *p_access, int i_query, va_list args )
 
     switch( i_query )
     {
-        case ACCESS_CAN_SEEK:
-        case ACCESS_CAN_FASTSEEK:
-        case ACCESS_CAN_PAUSE:
-        case ACCESS_CAN_CONTROL_PACE:
+        case STREAM_CAN_SEEK:
+        case STREAM_CAN_FASTSEEK:
+        case STREAM_CAN_PAUSE:
+        case STREAM_CAN_CONTROL_PACE:
             pb_bool = (bool*)va_arg( args, bool* );
             *pb_bool = false;
             break;
 
-        case ACCESS_GET_CONTENT_TYPE:
+        case STREAM_GET_CONTENT_TYPE:
             *va_arg( args, char** ) = strdup("application/vnd.apple.mpegurl"); // m3u8
             return VLC_SUCCESS;
 
-        case ACCESS_GET_PTS_DELAY:
+        case STREAM_GET_PTS_DELAY:
             pi_64 = (int64_t*)va_arg( args, int64_t * );
             *pi_64 = DEFAULT_PTS_DELAY;
             break;
 
-        case ACCESS_GET_SIGNAL:
+        case STREAM_GET_SIGNAL:
             pf1 = (double*)va_arg( args, double * );
             pf2 = (double*)va_arg( args, double * );
 
index 59b962f..09fd194 100644 (file)
@@ -280,20 +280,20 @@ static int Control(access_t *p_access, int i_query, va_list args)
     access_sys_t  *p_sys = (access_sys_t *) p_access->p_sys;
 
     switch(i_query) {
-        case ACCESS_CAN_SEEK:
-        case ACCESS_CAN_FASTSEEK:
+        case STREAM_CAN_SEEK:
+        case STREAM_CAN_FASTSEEK:
             pb_bool = (bool*)va_arg(args, bool*);
             *pb_bool = false;
             break;
-        case ACCESS_CAN_PAUSE:
+        case STREAM_CAN_PAUSE:
             pb_bool = (bool*)va_arg(args, bool*);
             *pb_bool = false;
             break;
-        case ACCESS_CAN_CONTROL_PACE:
+        case STREAM_CAN_CONTROL_PACE:
             pb_bool = (bool*)va_arg(args, bool*);
             *pb_bool = false;
             break;
-        case ACCESS_GET_PTS_DELAY:
+        case STREAM_GET_PTS_DELAY:
             pi_64 = (int64_t*)va_arg(args, int64_t *);
             *pi_64 =
                 INT64_C(1000) * var_InheritInteger(p_access, "live-caching");
index e91992d..8823ea1 100644 (file)
@@ -325,19 +325,19 @@ static int FileControl( access_t *p_access, int i_query, va_list args )
 
     switch( i_query )
     {
-        case ACCESS_CAN_SEEK:
-        case ACCESS_CAN_FASTSEEK:
+        case STREAM_CAN_SEEK:
+        case STREAM_CAN_FASTSEEK:
             pb_bool = (bool*)va_arg( args, bool* );
             *pb_bool = (p_access->pf_seek != NoSeek);
             break;
 
-        case ACCESS_CAN_PAUSE:
-        case ACCESS_CAN_CONTROL_PACE:
+        case STREAM_CAN_PAUSE:
+        case STREAM_CAN_CONTROL_PACE:
             pb_bool = (bool*)va_arg( args, bool* );
             *pb_bool = p_sys->b_pace_control;
             break;
 
-        case ACCESS_GET_SIZE:
+        case STREAM_GET_SIZE:
         {
             struct stat st;
 
@@ -347,7 +347,7 @@ static int FileControl( access_t *p_access, int i_query, va_list args )
             break;
         }
 
-        case ACCESS_GET_PTS_DELAY:
+        case STREAM_GET_PTS_DELAY:
             pi_64 = (int64_t*)va_arg( args, int64_t * );
             if (IsRemote (p_sys->fd, p_access->psz_filepath))
                 *pi_64 = var_InheritInteger (p_access, "network-caching");
@@ -356,7 +356,7 @@ static int FileControl( access_t *p_access, int i_query, va_list args )
             *pi_64 *= 1000;
             break;
 
-        case ACCESS_SET_PAUSE_STATE:
+        case STREAM_SET_PAUSE_STATE:
             /* Nothing to do */
             break;
 
index 7a0bcb3..91be656 100644 (file)
@@ -916,7 +916,7 @@ static int DirControl( access_t *p_access, int i_query, va_list args )
 {
     switch( i_query )
     {
-    case ACCESS_IS_DIRECTORY:
+    case STREAM_IS_DIRECTORY:
         *va_arg( args, bool * ) = true; /* might loop */
         break;
     default:
@@ -966,35 +966,35 @@ static int Control( access_t *p_access, int i_query, va_list args )
 
     switch( i_query )
     {
-        case ACCESS_CAN_SEEK:
+        case STREAM_CAN_SEEK:
             pb_bool = (bool*)va_arg( args, bool* );
             *pb_bool = true;
             break;
-        case ACCESS_CAN_FASTSEEK:
+        case STREAM_CAN_FASTSEEK:
             pb_bool = (bool*)va_arg( args, bool* );
             *pb_bool = false;
             break;
-        case ACCESS_CAN_PAUSE:
+        case STREAM_CAN_PAUSE:
             pb_bool = (bool*)va_arg( args, bool* );
             *pb_bool = true;    /* FIXME */
             break;
-        case ACCESS_CAN_CONTROL_PACE:
+        case STREAM_CAN_CONTROL_PACE:
             pb_bool = (bool*)va_arg( args, bool* );
             *pb_bool = true;    /* FIXME */
             break;
-        case ACCESS_GET_SIZE:
+        case STREAM_GET_SIZE:
             if( p_access->p_sys->size == UINT64_MAX )
                 return VLC_EGENERIC;
             *va_arg( args, uint64_t * ) = p_access->p_sys->size;
             break;
 
-        case ACCESS_GET_PTS_DELAY:
+        case STREAM_GET_PTS_DELAY:
             pi_64 = (int64_t*)va_arg( args, int64_t * );
             *pi_64 = INT64_C(1000)
                    * var_InheritInteger( p_access, "network-caching" );
             break;
 
-        case ACCESS_SET_PAUSE_STATE:
+        case STREAM_SET_PAUSE_STATE:
             pb_bool = (bool*)va_arg( args, bool* );
             if ( !pb_bool )
                  return Seek( p_access, p_access->p_sys->offset );
index c7162ac..04246e8 100644 (file)
@@ -678,28 +678,28 @@ static int Control( access_t *p_access, int i_query, va_list args )
     switch( i_query )
     {
         /* */
-        case ACCESS_CAN_SEEK:
+        case STREAM_CAN_SEEK:
             pb_bool = (bool*)va_arg( args, bool* );
             *pb_bool = p_sys->b_seekable;
             break;
-        case ACCESS_CAN_FASTSEEK:
+        case STREAM_CAN_FASTSEEK:
             pb_bool = (bool*)va_arg( args, bool* );
             *pb_bool = false;
             break;
-        case ACCESS_CAN_PAUSE:
-        case ACCESS_CAN_CONTROL_PACE:
+        case STREAM_CAN_PAUSE:
+        case STREAM_CAN_CONTROL_PACE:
             pb_bool = (bool*)va_arg( args, bool* );
             *pb_bool = true;
             break;
 
         /* */
-        case ACCESS_GET_PTS_DELAY:
+        case STREAM_GET_PTS_DELAY:
             pi_64 = (int64_t*)va_arg( args, int64_t * );
             *pi_64 = INT64_C(1000)
                 * var_InheritInteger( p_access, "network-caching" );
             break;
 
-        case ACCESS_GET_SIZE:
+        case STREAM_GET_SIZE:
             if( !p_sys->b_has_size )
                 return VLC_EGENERIC;
             pi_64 = (int64_t*)va_arg( args, int64_t * );
@@ -707,10 +707,10 @@ static int Control( access_t *p_access, int i_query, va_list args )
            break;
 
         /* */
-        case ACCESS_SET_PAUSE_STATE:
+        case STREAM_SET_PAUSE_STATE:
             break;
 
-        case ACCESS_GET_CONTENT_TYPE:
+        case STREAM_GET_CONTENT_TYPE:
         {
             char **type = va_arg( args, char ** );
 
index 81cf3e5..0b0e56e 100644 (file)
@@ -68,20 +68,20 @@ static int FileControl(access_t *access, int query, va_list args)
 
     switch (query)
     {
-        case ACCESS_CAN_SEEK:
+        case STREAM_CAN_SEEK:
             *va_arg(args, bool *) = vlc_http_file_can_seek(sys->resource);
             break;
 
-        case ACCESS_CAN_FASTSEEK:
+        case STREAM_CAN_FASTSEEK:
             *va_arg(args, bool *) = false;
             break;
 
-        case ACCESS_CAN_PAUSE:
-        case ACCESS_CAN_CONTROL_PACE:
+        case STREAM_CAN_PAUSE:
+        case STREAM_CAN_CONTROL_PACE:
             *va_arg(args, bool *) = true;
             break;
 
-        case ACCESS_GET_SIZE:
+        case STREAM_GET_SIZE:
         {
             uintmax_t val = vlc_http_file_get_size(sys->resource);
             if (val >= UINT64_MAX)
@@ -91,16 +91,16 @@ static int FileControl(access_t *access, int query, va_list args)
             break;
         }
 
-        case ACCESS_GET_PTS_DELAY:
+        case STREAM_GET_PTS_DELAY:
             *va_arg(args, int64_t *) = INT64_C(1000) *
                 var_InheritInteger(access, "network-caching");
             break;
 
-        case ACCESS_GET_CONTENT_TYPE:
+        case STREAM_GET_CONTENT_TYPE:
             *va_arg(args, char **) = vlc_http_file_get_type(sys->resource);
             break;
 
-        case ACCESS_SET_PAUSE_STATE:
+        case STREAM_SET_PAUSE_STATE:
             break;
 
         default:
@@ -132,19 +132,19 @@ static int LiveControl(access_t *access, int query, va_list args)
 
     switch (query)
     {
-        case ACCESS_CAN_SEEK:
-        case ACCESS_CAN_FASTSEEK:
-        case ACCESS_CAN_PAUSE:
-        case ACCESS_CAN_CONTROL_PACE:
+        case STREAM_CAN_SEEK:
+        case STREAM_CAN_FASTSEEK:
+        case STREAM_CAN_PAUSE:
+        case STREAM_CAN_CONTROL_PACE:
             *va_arg(args, bool *) = false;
             break;
 
-        case ACCESS_GET_PTS_DELAY:
+        case STREAM_GET_PTS_DELAY:
             *va_arg(args, int64_t *) = INT64_C(1000) *
                 var_InheritInteger(access, "network-caching");
             break;
 
-        case ACCESS_GET_CONTENT_TYPE:
+        case STREAM_GET_CONTENT_TYPE:
             *va_arg(args, char **) = vlc_http_live_get_type(sys->resource);
             break;
 
index 00466e3..d7a80bb 100644 (file)
@@ -68,30 +68,30 @@ static int Control(access_t *access, int query, va_list args)
 
     switch (query)
     {
-        case ACCESS_CAN_SEEK:
+        case STREAM_CAN_SEEK:
             *va_arg(args, bool *) = sys->seek_cb != NULL;
             break;
 
-        case ACCESS_CAN_FASTSEEK:
+        case STREAM_CAN_FASTSEEK:
             *va_arg(args, bool *) = false;
             break;
 
-        case ACCESS_CAN_PAUSE:
-        case ACCESS_CAN_CONTROL_PACE:
+        case STREAM_CAN_PAUSE:
+        case STREAM_CAN_CONTROL_PACE:
             *va_arg(args, bool *) = sys->seek_cb != NULL;
             break;
 
-        case ACCESS_GET_SIZE:
+        case STREAM_GET_SIZE:
             if (sys->size == UINT64_MAX)
                 return VLC_EGENERIC;
             *va_arg(args, uint64_t *) = sys->size;
             break;
 
-        case ACCESS_GET_PTS_DELAY:
+        case STREAM_GET_PTS_DELAY:
             *va_arg(args, int64_t *) = DEFAULT_PTS_DELAY;
             break;
 
-        case ACCESS_SET_PAUSE_STATE:
+        case STREAM_SET_PAUSE_STATE:
             break;
 
         default:
index eb47af3..73b0c34 100644 (file)
@@ -331,29 +331,29 @@ static int ControlAccess(access_t *access, int i_query, va_list args)
     (void) access;
     switch (i_query)
     {
-    case ACCESS_CAN_SEEK:
-    case ACCESS_CAN_FASTSEEK: {
+    case STREAM_CAN_SEEK:
+    case STREAM_CAN_FASTSEEK: {
         bool *b = va_arg( args, bool* );
         *b = false;
         return VLC_SUCCESS;
     }
-    case ACCESS_CAN_PAUSE:
-    case ACCESS_CAN_CONTROL_PACE: {
+    case STREAM_CAN_PAUSE:
+    case STREAM_CAN_CONTROL_PACE: {
         bool *b = va_arg( args, bool* );
         *b = true;
         return VLC_SUCCESS;
     }
-    case ACCESS_GET_SIZE: {
+    case STREAM_GET_SIZE: {
         uint64_t *s = va_arg(args, uint64_t *);
         *s = var_InheritInteger(access, "imem-size");
         return *s ? VLC_SUCCESS : VLC_EGENERIC;
     }
-    case ACCESS_GET_PTS_DELAY: {
+    case STREAM_GET_PTS_DELAY: {
         int64_t *delay = va_arg(args, int64_t *);
         *delay = DEFAULT_PTS_DELAY; /* FIXME? */
         return VLC_SUCCESS;
     }
-    case ACCESS_SET_PAUSE_STATE:
+    case STREAM_SET_PAUSE_STATE:
         return VLC_SUCCESS;
 
     default:
index cc2280e..9571974 100644 (file)
@@ -207,23 +207,23 @@ static int Control( access_t *p_access, int i_query, va_list args )
 
     switch( i_query )
     {
-        case ACCESS_CAN_SEEK:
+        case STREAM_CAN_SEEK:
             pb_bool = (bool*)va_arg( args, bool* );
             *pb_bool = !p_sys->b_broadcast;
             break;
 
-        case ACCESS_CAN_FASTSEEK:
+        case STREAM_CAN_FASTSEEK:
             pb_bool = (bool*)va_arg( args, bool* );
             *pb_bool = false;
             break;
 
-        case ACCESS_CAN_PAUSE:
-        case ACCESS_CAN_CONTROL_PACE:
+        case STREAM_CAN_PAUSE:
+        case STREAM_CAN_CONTROL_PACE:
             pb_bool = (bool*)va_arg( args, bool* );
             *pb_bool = true;
             break;
 
-        case ACCESS_GET_SIZE:
+        case STREAM_GET_SIZE:
         {
             uint64_t *s = va_arg( args, uint64_t * );
             if (p_sys->b_broadcast)
@@ -232,13 +232,13 @@ static int Control( access_t *p_access, int i_query, va_list args )
             return VLC_SUCCESS;
         }
 
-        case ACCESS_GET_PTS_DELAY:
+        case STREAM_GET_PTS_DELAY:
             pi_64 = (int64_t*)va_arg( args, int64_t * );
             *pi_64 = INT64_C(1000)
                    * var_InheritInteger( p_access, "network-caching" );
             break;
 
-        case ACCESS_GET_PRIVATE_ID_STATE:
+        case STREAM_GET_PRIVATE_ID_STATE:
             i_int = (int)va_arg( args, int );
             pb_bool = (bool *)va_arg( args, bool * );
 
@@ -247,7 +247,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
             *pb_bool =  p_sys->asfh.stream[i_int].i_selected ? true : false;
             break;
 
-        case ACCESS_SET_PRIVATE_ID_STATE:
+        case STREAM_SET_PRIVATE_ID_STATE:
         {
             i_int = (int)va_arg( args, int );
             b_bool = (bool)va_arg( args, int );
@@ -284,7 +284,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
             return VLC_SUCCESS;
         }
 
-        case ACCESS_SET_PAUSE_STATE:
+        case STREAM_SET_PAUSE_STATE:
             b_bool = (bool)va_arg( args, int );
             if( b_bool )
                 Stop( p_access );
index fdd8c84..f1ff695 100644 (file)
@@ -218,22 +218,22 @@ static int Control( access_t *p_access, int i_query, va_list args )
 
     switch( i_query )
     {
-        case ACCESS_CAN_SEEK:
+        case STREAM_CAN_SEEK:
             pb_bool = (bool*)va_arg( args, bool* );
             *pb_bool = p_sys->b_seekable;
             break;
 
-        case ACCESS_CAN_FASTSEEK:
+        case STREAM_CAN_FASTSEEK:
             pb_bool = (bool*)va_arg( args, bool* );
             *pb_bool = false;
             break;
 
-        case ACCESS_CAN_PAUSE:
+        case STREAM_CAN_PAUSE:
             pb_bool = (bool*)va_arg( args, bool* );
             *pb_bool = true;
             break;
 
-        case ACCESS_CAN_CONTROL_PACE:
+        case STREAM_CAN_CONTROL_PACE:
             pb_bool = (bool*)va_arg( args, bool* );
 
 #if 0       /* Disable for now until we have a clock synchro algo
@@ -243,19 +243,19 @@ static int Control( access_t *p_access, int i_query, va_list args )
             *pb_bool = true;
             break;
 
-        case ACCESS_GET_SIZE:
+        case STREAM_GET_SIZE:
             if( !p_sys->b_seekable )
                 return VLC_EGENERIC;
             *va_arg( args, uint64_t * ) = p_sys->i_size;
             break;
 
-        case ACCESS_GET_PTS_DELAY:
+        case STREAM_GET_PTS_DELAY:
             pi_64 = (int64_t*)va_arg( args, int64_t * );
             *pi_64 = INT64_C(1000)
                    * var_InheritInteger( p_access, "network-caching" );
             break;
 
-        case ACCESS_GET_PRIVATE_ID_STATE:
+        case STREAM_GET_PRIVATE_ID_STATE:
             i_int = (int)va_arg( args, int );
             pb_bool = (bool *)va_arg( args, bool * );
 
@@ -264,7 +264,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
             *pb_bool =  p_sys->asfh.stream[i_int].i_selected ? true : false;
             break;
 
-        case ACCESS_SET_PRIVATE_ID_STATE:
+        case STREAM_SET_PRIVATE_ID_STATE:
         {
             i_int = (int)va_arg( args, int );
             b_bool = (bool)va_arg( args, int );
@@ -301,7 +301,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
             return VLC_SUCCESS;
         }
 
-        case ACCESS_SET_PAUSE_STATE:
+        case STREAM_SET_PAUSE_STATE:
             b_bool = (bool)va_arg( args, int );
             if( b_bool )
             {
index f25937a..22f5bde 100644 (file)
@@ -224,19 +224,19 @@ static int Control( access_t *p_access, int i_query, va_list args )
 
     switch( i_query )
     {
-        case ACCESS_CAN_SEEK:
-        case ACCESS_CAN_FASTSEEK:
+        case STREAM_CAN_SEEK:
+        case STREAM_CAN_FASTSEEK:
             pb_bool = ( bool* )va_arg( args, bool* );
             *pb_bool = true;
             break;
 
-        case ACCESS_CAN_PAUSE:
-        case ACCESS_CAN_CONTROL_PACE:
+        case STREAM_CAN_PAUSE:
+        case STREAM_CAN_CONTROL_PACE:
             pb_bool = ( bool* )va_arg( args, bool* );
             *pb_bool = true;
             break;
 
-        case ACCESS_GET_SIZE:
+        case STREAM_GET_SIZE:
         {
             uint64_t *s = va_arg( args, uint64_t * );
             struct stat st;
@@ -249,13 +249,13 @@ static int Control( access_t *p_access, int i_query, va_list args )
             break;
         }
 
-        case ACCESS_GET_PTS_DELAY:
+        case STREAM_GET_PTS_DELAY:
             pi_64 = ( int64_t* )va_arg( args, int64_t * );
             *pi_64 = INT64_C(1000)
                    * var_InheritInteger( p_access, "file-caching" );
             break;
 
-        case ACCESS_SET_PAUSE_STATE:
+        case STREAM_SET_PAUSE_STATE:
             /* Nothing to do */
             break;
 
index 754085b..4b02a35 100644 (file)
@@ -269,31 +269,31 @@ FileControl(access_t *p_access, int i_query, va_list args)
 
     switch (i_query)
     {
-        case ACCESS_CAN_SEEK:
+        case STREAM_CAN_SEEK:
             *va_arg(args, bool *) = true;
             break;
 
-        case ACCESS_CAN_FASTSEEK:
+        case STREAM_CAN_FASTSEEK:
             *va_arg(args, bool *) = false;
             break;
 
-        case ACCESS_CAN_PAUSE:
-        case ACCESS_CAN_CONTROL_PACE:
+        case STREAM_CAN_PAUSE:
+        case STREAM_CAN_CONTROL_PACE:
             *va_arg(args, bool *) = true;
             break;
 
-        case ACCESS_GET_SIZE:
+        case STREAM_GET_SIZE:
         {
             *va_arg(args, uint64_t *) = p_sys->stat.nfs_size;
             break;
         }
 
-        case ACCESS_GET_PTS_DELAY:
+        case STREAM_GET_PTS_DELAY:
             *va_arg(args, int64_t *) = var_InheritInteger(p_access,
                                                           "network-caching");
             break;
 
-        case ACCESS_SET_PAUSE_STATE:
+        case STREAM_SET_PAUSE_STATE:
             break;
 
         default:
@@ -404,7 +404,7 @@ DirControl(access_t *p_access, int i_query, va_list args)
 {
     switch (i_query)
     {
-    case ACCESS_IS_DIRECTORY:
+    case STREAM_IS_DIRECTORY:
         *va_arg( args, bool * ) = true; /* might loop */
         break;
     default:
index 769ec4b..0fbc193 100644 (file)
@@ -106,30 +106,30 @@ static int Control(access_t *access, int query, va_list args)
         return VLC_EGENERIC;
 
     switch (query) {
-    case ACCESS_CAN_SEEK: {
+    case STREAM_CAN_SEEK: {
         bool *b = va_arg(args, bool *);
         return stream_Control(s, STREAM_CAN_SEEK, b);
     }
-    case ACCESS_CAN_FASTSEEK: {
+    case STREAM_CAN_FASTSEEK: {
         bool *b = va_arg(args, bool *);
         return stream_Control(s, STREAM_CAN_FASTSEEK, b);
     }
     /* FIXME the following request should ask the underlying access object */
-    case ACCESS_CAN_PAUSE:
-    case ACCESS_CAN_CONTROL_PACE: {
+    case STREAM_CAN_PAUSE:
+    case STREAM_CAN_CONTROL_PACE: {
         bool *b = va_arg(args, bool *);
         *b = true;
         return VLC_SUCCESS;
     }
-    case ACCESS_GET_SIZE:
+    case STREAM_GET_SIZE:
         *va_arg(args, uint64_t *) = sys->file->size;
         return VLC_SUCCESS;
-    case ACCESS_GET_PTS_DELAY: {
+    case STREAM_GET_PTS_DELAY: {
         int64_t *delay = va_arg(args, int64_t *);
         *delay = DEFAULT_PTS_DELAY;
         return VLC_SUCCESS;
     }
-    case ACCESS_SET_PAUSE_STATE:
+    case STREAM_SET_PAUSE_STATE:
         return VLC_SUCCESS;
 
     default:
index 7b0f49c..04c331c 100644 (file)
@@ -305,22 +305,22 @@ static int Control( access_t *p_access, int i_query, va_list args )
 {
     switch( i_query )
     {
-        case ACCESS_CAN_SEEK:
-        case ACCESS_CAN_FASTSEEK:
-        case ACCESS_CAN_PAUSE:
+        case STREAM_CAN_SEEK:
+        case STREAM_CAN_FASTSEEK:
+        case STREAM_CAN_PAUSE:
             *va_arg( args, bool* ) = false;
             break;
 
-        case ACCESS_CAN_CONTROL_PACE:
+        case STREAM_CAN_CONTROL_PACE:
             *va_arg( args, bool* ) = true;
             break;
 
-        case ACCESS_GET_PTS_DELAY:
+        case STREAM_GET_PTS_DELAY:
             *va_arg( args, int64_t * ) = INT64_C(1000)
                 * var_InheritInteger(p_access, "network-caching");
             break;
 
-        case ACCESS_SET_PAUSE_STATE:
+        case STREAM_SET_PAUSE_STATE:
             /* Nothing to do */
             break;
 
index 185ea0d..715260b 100644 (file)
@@ -551,14 +551,14 @@ static int satip_control(access_t *access, int i_query, va_list args) {
 
     switch(i_query)
     {
-        case ACCESS_CAN_CONTROL_PACE:
-        case ACCESS_CAN_SEEK:
-        case ACCESS_CAN_PAUSE:
+        case STREAM_CAN_CONTROL_PACE:
+        case STREAM_CAN_SEEK:
+        case STREAM_CAN_PAUSE:
             pb_bool = (bool*)va_arg(args, bool*);
             *pb_bool = false;
             break;
 
-        case ACCESS_GET_PTS_DELAY:
+        case STREAM_GET_PTS_DELAY:
             pi_64 = (int64_t*)va_arg(args, int64_t *);
             *pi_64 = INT64_C(1000) * var_InheritInteger(access, "live-caching");
             break;
index 40f8184..74cef07 100644 (file)
@@ -112,28 +112,28 @@ static int Control (access_t *access, int query, va_list args)
 
     switch (query)
     {
-        case ACCESS_CAN_SEEK:
-        case ACCESS_CAN_FASTSEEK:
-        case ACCESS_CAN_PAUSE:
-        case ACCESS_CAN_CONTROL_PACE:
+        case STREAM_CAN_SEEK:
+        case STREAM_CAN_FASTSEEK:
+        case STREAM_CAN_PAUSE:
+        case STREAM_CAN_CONTROL_PACE:
         {
             bool *b = va_arg(args, bool*);
             *b = true;
             return VLC_SUCCESS;
         }
 
-        case ACCESS_GET_SIZE:
+        case STREAM_GET_SIZE:
             *va_arg(args, uint64_t *) = sys->length;
             return VLC_SUCCESS;
 
-        case ACCESS_GET_PTS_DELAY:
+        case STREAM_GET_PTS_DELAY:
         {
             int64_t *dp = va_arg(args, int64_t *);
             *dp = DEFAULT_PTS_DELAY;
             return VLC_SUCCESS;
         }
     
-        case ACCESS_SET_PAUSE_STATE:
+        case STREAM_SET_PAUSE_STATE:
             return VLC_SUCCESS;
     }
     return VLC_EGENERIC;
index 514f518..24f0618 100644 (file)
@@ -412,35 +412,35 @@ static int Control( access_t* p_access, int i_query, va_list args )
 
     switch( i_query )
     {
-    case ACCESS_CAN_SEEK:
+    case STREAM_CAN_SEEK:
         pb_bool = (bool*)va_arg( args, bool* );
         *pb_bool = true;
         break;
 
-    case ACCESS_CAN_FASTSEEK:
+    case STREAM_CAN_FASTSEEK:
         pb_bool = (bool*)va_arg( args, bool* );
         *pb_bool = false;
         break;
 
-    case ACCESS_CAN_PAUSE:
-    case ACCESS_CAN_CONTROL_PACE:
+    case STREAM_CAN_PAUSE:
+    case STREAM_CAN_CONTROL_PACE:
         pb_bool = (bool*)va_arg( args, bool* );
         *pb_bool = true;
         break;
 
-    case ACCESS_GET_SIZE:
+    case STREAM_GET_SIZE:
         if( p_access->pf_readdir != NULL )
             return VLC_EGENERIC;
         *va_arg( args, uint64_t * ) = p_access->p_sys->filesize;
         break;
 
-    case ACCESS_GET_PTS_DELAY:
+    case STREAM_GET_PTS_DELAY:
         pi_64 = (int64_t*)va_arg( args, int64_t* );
         *pi_64 = INT64_C(1000)
                * var_InheritInteger( p_access, "network-caching" );
         break;
 
-    case ACCESS_SET_PAUSE_STATE:
+    case STREAM_SET_PAUSE_STATE:
         break;
 
     default:
@@ -528,7 +528,7 @@ static int DirControl( access_t *p_access, int i_query, va_list args )
 {
     switch( i_query )
     {
-    case ACCESS_IS_DIRECTORY:
+    case STREAM_IS_DIRECTORY:
         *va_arg( args, bool * ) = true; /* might loop */
         break;
     default:
index d81814c..ab0bc7d 100644 (file)
@@ -404,7 +404,7 @@ static int DirControl( access_t *p_access, int i_query, va_list args )
 {
     switch( i_query )
     {
-    case ACCESS_IS_DIRECTORY:
+    case STREAM_IS_DIRECTORY:
         *va_arg( args, bool * ) = true; /* might loop */
         break;
     default:
@@ -422,28 +422,28 @@ static int Control( access_t *p_access, int i_query, va_list args )
 {
     switch( i_query )
     {
-    case ACCESS_CAN_SEEK:
-    case ACCESS_CAN_PAUSE:
-    case ACCESS_CAN_CONTROL_PACE:
+    case STREAM_CAN_SEEK:
+    case STREAM_CAN_PAUSE:
+    case STREAM_CAN_CONTROL_PACE:
         *va_arg( args, bool* ) = true;
         break;
 
-    case ACCESS_CAN_FASTSEEK:
+    case STREAM_CAN_FASTSEEK:
         *va_arg( args, bool* ) = false;
         break;
 
-    case ACCESS_GET_SIZE:
+    case STREAM_GET_SIZE:
         if( p_access->pf_readdir != NULL )
             return VLC_EGENERIC;
         *va_arg( args, uint64_t * ) = p_access->p_sys->size;
         break;
 
-    case ACCESS_GET_PTS_DELAY:
+    case STREAM_GET_PTS_DELAY:
         *va_arg( args, int64_t * ) = INT64_C(1000)
             * var_InheritInteger( p_access, "network-caching" );
         break;
 
-    case ACCESS_SET_PAUSE_STATE:
+    case STREAM_SET_PAUSE_STATE:
         /* Nothing to do */
         break;
 
index 1319efb..4fc8116 100644 (file)
@@ -158,27 +158,27 @@ static int Control( access_t *p_access, int i_query, va_list args )
 
     switch( i_query )
     {
-        case ACCESS_CAN_SEEK:
-        case ACCESS_CAN_FASTSEEK:
+        case STREAM_CAN_SEEK:
+        case STREAM_CAN_FASTSEEK:
             pb_bool = (bool*)va_arg( args, bool* );
             *pb_bool = false;
             break;
-        case ACCESS_CAN_PAUSE:
+        case STREAM_CAN_PAUSE:
             pb_bool = (bool*)va_arg( args, bool* );
             *pb_bool = true;    /* FIXME */
             break;
-        case ACCESS_CAN_CONTROL_PACE:
+        case STREAM_CAN_CONTROL_PACE:
             pb_bool = (bool*)va_arg( args, bool* );
             *pb_bool = true;    /* FIXME */
             break;
 
-        case ACCESS_GET_PTS_DELAY:
+        case STREAM_GET_PTS_DELAY:
             pi_64 = (int64_t*)va_arg( args, int64_t * );
             *pi_64 = INT64_C(1000)
                    * var_InheritInteger( p_access, "network-caching" );
             break;
 
-        case ACCESS_SET_PAUSE_STATE:
+        case STREAM_SET_PAUSE_STATE:
             /* Nothing to do */
             break;
 
index c9d2d43..61af085 100644 (file)
@@ -238,15 +238,15 @@ static int Control( access_t *p_access, int i_query, va_list args )
 
     switch( i_query )
     {
-        case ACCESS_CAN_SEEK:
-        case ACCESS_CAN_FASTSEEK:
-        case ACCESS_CAN_PAUSE:
-        case ACCESS_CAN_CONTROL_PACE:
+        case STREAM_CAN_SEEK:
+        case STREAM_CAN_FASTSEEK:
+        case STREAM_CAN_PAUSE:
+        case STREAM_CAN_CONTROL_PACE:
             pb_bool = (bool*)va_arg( args, bool* );
             *pb_bool = false;
             break;
 
-        case ACCESS_GET_PTS_DELAY:
+        case STREAM_GET_PTS_DELAY:
             pi_64 = (int64_t*)va_arg( args, int64_t * );
             *pi_64 = INT64_C(1000)
                    * var_InheritInteger(p_access, "network-caching");
index 828a9fd..b4b8d2f 100644 (file)
@@ -255,19 +255,19 @@ static int AccessControl( access_t *access, int query, va_list args )
 {
     switch( query )
     {
-        case ACCESS_CAN_SEEK:
-        case ACCESS_CAN_FASTSEEK:
-        case ACCESS_CAN_PAUSE:
-        case ACCESS_CAN_CONTROL_PACE:
+        case STREAM_CAN_SEEK:
+        case STREAM_CAN_FASTSEEK:
+        case STREAM_CAN_PAUSE:
+        case STREAM_CAN_CONTROL_PACE:
             *va_arg( args, bool* ) = false;
             break;
 
-        case ACCESS_GET_PTS_DELAY:
+        case STREAM_GET_PTS_DELAY:
             *va_arg(args,int64_t *) = INT64_C(1000)
                 * var_InheritInteger( access, "live-caching" );
             break;
 
-        case ACCESS_SET_PAUSE_STATE:
+        case STREAM_SET_PAUSE_STATE:
             /* Nothing to do */
             break;
 
index f2e044e..e93641a 100644 (file)
@@ -236,14 +236,14 @@ static int Control( access_t *p_access, int i_query, va_list args )
     switch( i_query )
     {
         /* */
-        case ACCESS_CAN_SEEK:
-        case ACCESS_CAN_FASTSEEK:
-        case ACCESS_CAN_PAUSE:
-        case ACCESS_CAN_CONTROL_PACE:
+        case STREAM_CAN_SEEK:
+        case STREAM_CAN_FASTSEEK:
+        case STREAM_CAN_PAUSE:
+        case STREAM_CAN_CONTROL_PACE:
             *va_arg( args, bool* ) = true;
             break;
 
-        case ACCESS_GET_SIZE:
+        case STREAM_GET_SIZE:
         {
             int i = p_sys->i_current_title;
 
@@ -254,16 +254,16 @@ static int Control( access_t *p_access, int i_query, va_list args )
         }
 
         /* */
-        case ACCESS_GET_PTS_DELAY:
+        case STREAM_GET_PTS_DELAY:
             *va_arg( args, int64_t * ) = INT64_C(1000)
                 * var_InheritInteger(p_access, "disc-caching");
             break;
 
         /* */
-        case ACCESS_SET_PAUSE_STATE:
+        case STREAM_SET_PAUSE_STATE:
             break;
 
-        case ACCESS_GET_TITLE_INFO:
+        case STREAM_GET_TITLE_INFO:
             ppp_title = va_arg( args, input_title_t*** );
             *va_arg( args, int* ) = p_sys->i_titles;
 
@@ -273,19 +273,19 @@ static int Control( access_t *p_access, int i_query, va_list args )
                 (*ppp_title)[i] = vlc_input_title_New();
             break;
 
-        case ACCESS_GET_TITLE:
+        case STREAM_GET_TITLE:
             *va_arg( args, unsigned * ) = p_sys->i_current_title;
             break;
 
-        case ACCESS_GET_SEEKPOINT:
+        case STREAM_GET_SEEKPOINT:
             *va_arg( args, unsigned * ) = p_sys->i_current_seekpoint;
             break;
 
-        case ACCESS_GET_CONTENT_TYPE:
+        case STREAM_GET_CONTENT_TYPE:
             *va_arg( args, char ** ) = strdup("video/MP2P");
             break;
 
-        case ACCESS_SET_TITLE:
+        case STREAM_SET_TITLE:
         {
             int i = va_arg( args, int );
             if( i != p_sys->i_current_title )
@@ -301,7 +301,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
             break;
         }
 
-        case ACCESS_SET_SEEKPOINT:
+        case STREAM_SET_SEEKPOINT:
         {
             int i = va_arg( args, int );
             unsigned i_title = p_sys->i_current_title;
index a23f4a0..9f0e3eb 100644 (file)
@@ -269,28 +269,28 @@ static int Control( access_t *p_access, int i_query, va_list args )
 
     switch( i_query )
     {
-        case ACCESS_CAN_SEEK:
-        case ACCESS_CAN_FASTSEEK:
-        case ACCESS_CAN_PAUSE:
-        case ACCESS_CAN_CONTROL_PACE:
+        case STREAM_CAN_SEEK:
+        case STREAM_CAN_FASTSEEK:
+        case STREAM_CAN_PAUSE:
+        case STREAM_CAN_CONTROL_PACE:
             *va_arg( args, bool* ) = true;
             break;
 
-        case ACCESS_GET_SIZE:
+        case STREAM_GET_SIZE:
             *va_arg( args, uint64_t* ) = p_sys->size;
             break;
 
-        case ACCESS_GET_PTS_DELAY:
+        case STREAM_GET_PTS_DELAY:
             pi64 = va_arg( args, int64_t * );
             *pi64 = INT64_C(1000)
                   * var_InheritInteger( p_access, "file-caching" );
             break;
 
-        case ACCESS_SET_PAUSE_STATE:
+        case STREAM_SET_PAUSE_STATE:
             /* nothing to do */
             break;
 
-        case ACCESS_GET_TITLE_INFO:
+        case STREAM_GET_TITLE_INFO:
             /* return a copy of our seek points */
             if( !p_sys->p_marks )
                 return VLC_EGENERIC;
@@ -302,28 +302,28 @@ static int Control( access_t *p_access, int i_query, va_list args )
             **ppp_title = vlc_input_title_Duplicate( p_sys->p_marks );
             break;
 
-        case ACCESS_GET_TITLE:
+        case STREAM_GET_TITLE:
             *va_arg( args, unsigned * ) = 0;
             break;
 
-        case ACCESS_GET_SEEKPOINT:
+        case STREAM_GET_SEEKPOINT:
             *va_arg( args, unsigned * ) = p_sys->cur_seekpoint;
             break;
 
-        case ACCESS_GET_CONTENT_TYPE:
+        case STREAM_GET_CONTENT_TYPE:
             *va_arg( args, char ** ) =
                 strdup( p_sys->b_ts_format ? "video/MP2T" : "video/MP2P" );
             break;
 
-        case ACCESS_SET_TITLE:
+        case STREAM_SET_TITLE:
             /* ignore - only one title */
             break;
 
-        case ACCESS_SET_SEEKPOINT:
+        case STREAM_SET_SEEKPOINT:
             i = va_arg( args, int );
             return Seek( p_access, p_sys->offsets[i] );
 
-        case ACCESS_GET_META:
+        case STREAM_GET_META:
             p_meta = va_arg( args, vlc_meta_t* );
             vlc_meta_Merge( p_meta, p_sys->p_meta );
             break;
@@ -388,7 +388,7 @@ static int Seek( access_t *p_access, uint64_t i_pos )
 {
     access_sys_t *p_sys = p_access->p_sys;
 
-    /* might happen if called by ACCESS_SET_SEEKPOINT */
+    /* might happen if called by STREAM_SET_SEEKPOINT */
     i_pos = __MIN( i_pos, p_sys->size );
 
     p_sys->offset = i_pos;
index 2399b2d..f9e9a63 100644 (file)
@@ -222,19 +222,19 @@ static int AccessControl( access_t *p_access, int i_query, va_list args )
 
     switch( i_query )
     {
-        case ACCESS_CAN_SEEK:
-        case ACCESS_CAN_PAUSE:
-        case ACCESS_CAN_CONTROL_PACE:
+        case STREAM_CAN_SEEK:
+        case STREAM_CAN_PAUSE:
+        case STREAM_CAN_CONTROL_PACE:
             pb_bool = (bool*)va_arg( args, bool* );
             *pb_bool = true;
             break;
 
-        case ACCESS_CAN_FASTSEEK:
+        case STREAM_CAN_FASTSEEK:
             pb_bool = (bool*)va_arg( args, bool* );
             *pb_bool = false;
             break;
 
-        case ACCESS_GET_SIZE:
+        case STREAM_GET_SIZE:
         {
             unz_file_info z_info;
 
@@ -244,12 +244,12 @@ static int AccessControl( access_t *p_access, int i_query, va_list args )
             break;
         }
 
-        case ACCESS_GET_PTS_DELAY:
+        case STREAM_GET_PTS_DELAY:
             pi_64 = (int64_t*)va_arg( args, int64_t * );
             *pi_64 = DEFAULT_PTS_DELAY;
             break;
 
-        case ACCESS_SET_PAUSE_STATE:
+        case STREAM_SET_PAUSE_STATE:
             /* Nothing to do */
             break;
 
index 6bdb96d..1e3a234 100644 (file)
@@ -233,7 +233,7 @@ static int Open( vlc_object_t * p_this )
     p_sys->i_length = -1;
     p_sys->b_preparsing_done = false;
 
-    stream_Control( p_demux->s, ACCESS_GET_PTS_DELAY, & p_sys->i_access_delay );
+    stream_Control( p_demux->s, STREAM_GET_PTS_DELAY, & p_sys->i_access_delay );
 
     /* Set exported functions */
     p_demux->pf_demux = Demux;
@@ -838,7 +838,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             stream_Control( p_demux->s, STREAM_CAN_FASTSEEK, &b );
 
             f = (double)va_arg( args, double );
-            if ( p_sys->i_length <= 0 || !b /* || ! ACCESS_CAN_FASTSEEK */ )
+            if ( p_sys->i_length <= 0 || !b /* || ! STREAM_CAN_FASTSEEK */ )
             {
                 Ogg_ResetStreamsHelper( p_sys );
                 Oggseek_BlindSeektoPosition( p_demux, p_stream, f, b );
index 9f4c2f9..d86a2fb 100644 (file)
@@ -1201,7 +1201,7 @@ static int ControlDirectory( access_t *p_access, int i_query, va_list args )
 {
     switch( i_query )
     {
-    case ACCESS_IS_DIRECTORY:
+    case STREAM_IS_DIRECTORY:
         *va_arg( args, bool * ) = true; /* might loop */
         break;
     default:
index e5a61c9..72f5857 100644 (file)
@@ -165,16 +165,16 @@ int access_vaDirectoryControlHelper( access_t *p_access, int i_query, va_list ar
 
     switch( i_query )
     {
-        case ACCESS_CAN_SEEK:
-        case ACCESS_CAN_FASTSEEK:
-        case ACCESS_CAN_PAUSE:
-        case ACCESS_CAN_CONTROL_PACE:
+        case STREAM_CAN_SEEK:
+        case STREAM_CAN_FASTSEEK:
+        case STREAM_CAN_PAUSE:
+        case STREAM_CAN_CONTROL_PACE:
             *va_arg( args, bool* ) = false;
             break;
-        case ACCESS_GET_PTS_DELAY:
+        case STREAM_GET_PTS_DELAY:
             *va_arg( args, int64_t * ) = 0;
             break;
-        case ACCESS_IS_DIRECTORY:
+        case STREAM_IS_DIRECTORY:
             *va_arg( args, bool * ) = false;
             break;
         default:
@@ -311,34 +311,11 @@ static int AStreamSeek(stream_t *s, uint64_t offset)
     return vlc_access_Seek(sys->access, offset);
 }
 
-#define static_control_match(foo) \
-    static_assert((unsigned) STREAM_##foo == ACCESS_##foo, "Mismatch")
-
 static int AStreamControl(stream_t *s, int cmd, va_list args)
 {
     stream_sys_t *sys = s->p_sys;
     access_t *access = sys->access;
 
-    static_control_match(CAN_SEEK);
-    static_control_match(CAN_FASTSEEK);
-    static_control_match(CAN_PAUSE);
-    static_control_match(CAN_CONTROL_PACE);
-    static_control_match(GET_SIZE);
-    static_control_match(IS_DIRECTORY);
-    static_control_match(GET_PTS_DELAY);
-    static_control_match(GET_TITLE_INFO);
-    static_control_match(GET_TITLE);
-    static_control_match(GET_SEEKPOINT);
-    static_control_match(GET_META);
-    static_control_match(GET_CONTENT_TYPE);
-    static_control_match(GET_SIGNAL);
-    static_control_match(SET_PAUSE_STATE);
-    static_control_match(SET_TITLE);
-    static_control_match(SET_SEEKPOINT);
-    static_control_match(SET_PRIVATE_ID_STATE);
-    static_control_match(SET_PRIVATE_ID_CA);
-    static_control_match(GET_PRIVATE_ID_STATE);
-
     switch (cmd)
     {
         case STREAM_SET_TITLE: