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

access: simplify control default case, remove dummy warnings

parent 64cbdb74
...@@ -447,15 +447,6 @@ static int Control(access_t *access, int query, va_list args) ...@@ -447,15 +447,6 @@ static int Control(access_t *access, int query, va_list args)
return VLC_EGENERIC; return VLC_EGENERIC;
return VLC_SUCCESS; return VLC_SUCCESS;
} }
case ACCESS_GET_TITLE_INFO:
case ACCESS_GET_META:
case ACCESS_GET_CONTENT_TYPE:
case ACCESS_GET_SIGNAL:
case ACCESS_SET_TITLE:
case ACCESS_SET_SEEKPOINT:
case ACCESS_SET_PRIVATE_ID_STATE:
case ACCESS_SET_PRIVATE_ID_CA:
case ACCESS_GET_PRIVATE_ID_STATE:
default: default:
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
...@@ -345,16 +345,7 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -345,16 +345,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
case ACCESS_SET_PAUSE_STATE: case ACCESS_SET_PAUSE_STATE:
break; break;
case ACCESS_GET_TITLE_INFO:
case ACCESS_SET_TITLE:
case ACCESS_GET_META:
case ACCESS_SET_SEEKPOINT:
case ACCESS_SET_PRIVATE_ID_STATE:
case ACCESS_GET_CONTENT_TYPE:
return VLC_EGENERIC;
default: default:
msg_Warn( p_access, "unimplemented query in control" );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
return VLC_SUCCESS; return VLC_SUCCESS;
......
...@@ -469,7 +469,6 @@ int DirControl( access_t *p_access, int i_query, va_list args ) ...@@ -469,7 +469,6 @@ int DirControl( access_t *p_access, int i_query, va_list args )
{ {
switch( i_query ) switch( i_query )
{ {
/* */
case ACCESS_CAN_SEEK: case ACCESS_CAN_SEEK:
case ACCESS_CAN_FASTSEEK: case ACCESS_CAN_FASTSEEK:
*va_arg( args, bool* ) = false; *va_arg( args, bool* ) = false;
...@@ -480,23 +479,11 @@ int DirControl( access_t *p_access, int i_query, va_list args ) ...@@ -480,23 +479,11 @@ int DirControl( access_t *p_access, int i_query, va_list args )
*va_arg( args, bool* ) = true; *va_arg( args, bool* ) = true;
break; break;
/* */
case ACCESS_GET_PTS_DELAY: case ACCESS_GET_PTS_DELAY:
*va_arg( args, int64_t * ) = DEFAULT_PTS_DELAY * 1000; *va_arg( args, int64_t * ) = DEFAULT_PTS_DELAY * 1000;
break; break;
/* */
case ACCESS_SET_PAUSE_STATE:
case ACCESS_GET_TITLE_INFO:
case ACCESS_SET_TITLE:
case ACCESS_SET_SEEKPOINT:
case ACCESS_SET_PRIVATE_ID_STATE:
case ACCESS_GET_CONTENT_TYPE:
case ACCESS_GET_META:
return VLC_EGENERIC;
default: default:
msg_Warn( p_access, "unimplemented query in control" );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
return VLC_SUCCESS; return VLC_SUCCESS;
......
...@@ -1934,7 +1934,6 @@ static int AccessControl( access_t *p_access, int i_query, va_list args ) ...@@ -1934,7 +1934,6 @@ static int AccessControl( access_t *p_access, int i_query, va_list args )
switch( i_query ) switch( i_query )
{ {
/* */
case ACCESS_CAN_SEEK: case ACCESS_CAN_SEEK:
case ACCESS_CAN_FASTSEEK: case ACCESS_CAN_FASTSEEK:
case ACCESS_CAN_PAUSE: case ACCESS_CAN_PAUSE:
...@@ -1943,23 +1942,13 @@ static int AccessControl( access_t *p_access, int i_query, va_list args ) ...@@ -1943,23 +1942,13 @@ static int AccessControl( access_t *p_access, int i_query, va_list args )
*pb_bool = false; *pb_bool = false;
break; break;
/* */
case ACCESS_GET_PTS_DELAY: case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * ); pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = *pi_64 =
INT64_C(1000) * var_InheritInteger( p_access, "live-caching" ); INT64_C(1000) * var_InheritInteger( p_access, "live-caching" );
break; break;
/* */
case ACCESS_SET_PAUSE_STATE:
case ACCESS_GET_TITLE_INFO:
case ACCESS_SET_TITLE:
case ACCESS_SET_SEEKPOINT:
case ACCESS_SET_PRIVATE_ID_STATE:
return VLC_EGENERIC;
default: default:
msg_Warn( p_access, "unimplemented query in control" );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
...@@ -540,34 +540,19 @@ static int Control (access_t *access, int query, va_list args) ...@@ -540,34 +540,19 @@ static int Control (access_t *access, int query, va_list args)
case ACCESS_CAN_FASTSEEK: case ACCESS_CAN_FASTSEEK:
case ACCESS_CAN_PAUSE: case ACCESS_CAN_PAUSE:
case ACCESS_CAN_CONTROL_PACE: case ACCESS_CAN_CONTROL_PACE:
{ *va_arg (args, bool *) = false;
bool *v = va_arg (args, bool *); break;
*v = false;
return VLC_SUCCESS;
}
case ACCESS_GET_PTS_DELAY: case ACCESS_GET_PTS_DELAY:
{ {
int64_t *v = va_arg (args, int64_t *); int64_t *v = va_arg (args, int64_t *);
*v = var_InheritInteger (access, "live-caching") * INT64_C(1000); *v = var_InheritInteger (access, "live-caching") * INT64_C(1000);
return VLC_SUCCESS; break;
} }
case ACCESS_GET_TITLE_INFO:
case ACCESS_GET_META:
return VLC_EGENERIC;
case ACCESS_GET_CONTENT_TYPE: case ACCESS_GET_CONTENT_TYPE:
{ *va_arg (args, char **) = strdup ("video/MP2T");
char **pt = va_arg (args, char **); break;
*pt = strdup ("video/MP2T");
return VLC_SUCCESS;
}
case ACCESS_SET_PAUSE_STATE:
case ACCESS_SET_TITLE:
case ACCESS_SET_SEEKPOINT:
return VLC_EGENERIC;
case ACCESS_GET_SIGNAL: case ACCESS_GET_SIGNAL:
*va_arg (args, double *) = dvb_get_snr (dev); *va_arg (args, double *) = dvb_get_snr (dev);
...@@ -588,7 +573,7 @@ static int Control (access_t *access, int query, va_list args) ...@@ -588,7 +573,7 @@ static int Control (access_t *access, int query, va_list args)
} }
else else
dvb_remove_pid (dev, pid); dvb_remove_pid (dev, pid);
return VLC_SUCCESS; break;
} }
case ACCESS_SET_PRIVATE_ID_CA: case ACCESS_SET_PRIVATE_ID_CA:
...@@ -597,16 +582,15 @@ static int Control (access_t *access, int query, va_list args) ...@@ -597,16 +582,15 @@ static int Control (access_t *access, int query, va_list args)
struct dvbpsi_pmt_s *pmt = va_arg (args, struct dvbpsi_pmt_s *); struct dvbpsi_pmt_s *pmt = va_arg (args, struct dvbpsi_pmt_s *);
dvb_set_ca_pmt (dev, pmt); dvb_set_ca_pmt (dev, pmt);
return VLC_SUCCESS; break;
} }
#endif #endif
case ACCESS_GET_PRIVATE_ID_STATE:
return VLC_EGENERIC; return VLC_EGENERIC;
/*case ACCESS_GET_PRIVATE_ID_STATE: TODO? */
} }
msg_Warn (access, "unimplemented query %d in control", query); return VLC_SUCCESS;
return VLC_EGENERIC;
} }
......
...@@ -294,15 +294,7 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -294,15 +294,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
AVCPause( p_access, p_access->p_sys->i_node ); AVCPause( p_access, p_access->p_sys->i_node );
break; break;
case ACCESS_GET_TITLE_INFO:
case ACCESS_SET_TITLE:
case ACCESS_SET_SEEKPOINT:
case ACCESS_SET_PRIVATE_ID_STATE:
case ACCESS_GET_CONTENT_TYPE:
return VLC_EGENERIC;
default: default:
msg_Warn( p_access, "unimplemented query in control" );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
...@@ -378,7 +378,6 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -378,7 +378,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
switch( i_query ) switch( i_query )
{ {
/* */
case ACCESS_CAN_SEEK: case ACCESS_CAN_SEEK:
case ACCESS_CAN_FASTSEEK: case ACCESS_CAN_FASTSEEK:
case ACCESS_CAN_PAUSE: case ACCESS_CAN_PAUSE:
...@@ -386,20 +385,12 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -386,20 +385,12 @@ static int Control( access_t *p_access, int i_query, va_list args )
pb_bool = (bool*)va_arg( args, bool* ); pb_bool = (bool*)va_arg( args, bool* );
*pb_bool = false; *pb_bool = false;
break; break;
/* */
case ACCESS_GET_PTS_DELAY: case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * ); pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = DEFAULT_PTS_DELAY; *pi_64 = DEFAULT_PTS_DELAY;
break; break;
/* */
case ACCESS_SET_PAUSE_STATE:
case ACCESS_GET_TITLE_INFO:
case ACCESS_SET_TITLE:
case ACCESS_SET_SEEKPOINT:
case ACCESS_GET_CONTENT_TYPE:
return VLC_EGENERIC;
case ACCESS_GET_SIGNAL: case ACCESS_GET_SIGNAL:
pf1 = (double*)va_arg( args, double * ); pf1 = (double*)va_arg( args, double * );
pf2 = (double*)va_arg( args, double * ); pf2 = (double*)va_arg( args, double * );
...@@ -410,14 +401,9 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -410,14 +401,9 @@ static int Control( access_t *p_access, int i_query, va_list args )
*pf1 = (double)stat.i_snr / 65535.0; *pf1 = (double)stat.i_snr / 65535.0;
*pf2 = (double)stat.i_signal_strenth / 65535.0; *pf2 = (double)stat.i_signal_strenth / 65535.0;
} }
return VLC_SUCCESS; break;
case ACCESS_SET_PRIVATE_ID_STATE:
case ACCESS_SET_PRIVATE_ID_CA:
return VLC_EGENERIC;
default: default:
msg_Warn( p_access, "unimplemented query in control" );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
...@@ -295,26 +295,13 @@ static int Control(access_t *p_access, int i_query, va_list args) ...@@ -295,26 +295,13 @@ static int Control(access_t *p_access, int i_query, va_list args)
pb_bool = (bool*)va_arg(args, bool*); pb_bool = (bool*)va_arg(args, bool*);
*pb_bool = false; *pb_bool = false;
break; break;
/* */
case ACCESS_GET_PTS_DELAY: case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg(args, int64_t *); pi_64 = (int64_t*)va_arg(args, int64_t *);
*pi_64 = *pi_64 =
INT64_C(1000) * var_InheritInteger(p_access, "live-caching"); INT64_C(1000) * var_InheritInteger(p_access, "live-caching");
break; break;
case ACCESS_SET_PAUSE_STATE:
case ACCESS_GET_TITLE_INFO:
case ACCESS_SET_TITLE:
case ACCESS_SET_SEEKPOINT:
case ACCESS_SET_PRIVATE_ID_STATE:
case ACCESS_GET_CONTENT_TYPE:
return VLC_EGENERIC;
default: default:
msg_Warn(p_access, "unimplemented query in control");
return VLC_EGENERIC; return VLC_EGENERIC;
} }
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -375,7 +375,6 @@ static int FileControl( access_t *p_access, int i_query, va_list args ) ...@@ -375,7 +375,6 @@ static int FileControl( access_t *p_access, int i_query, va_list args )
switch( i_query ) switch( i_query )
{ {
/* */
case ACCESS_CAN_SEEK: case ACCESS_CAN_SEEK:
case ACCESS_CAN_FASTSEEK: case ACCESS_CAN_FASTSEEK:
pb_bool = (bool*)va_arg( args, bool* ); pb_bool = (bool*)va_arg( args, bool* );
...@@ -398,7 +397,6 @@ static int FileControl( access_t *p_access, int i_query, va_list args ) ...@@ -398,7 +397,6 @@ static int FileControl( access_t *p_access, int i_query, va_list args )
break; break;
} }
/* */
case ACCESS_GET_PTS_DELAY: case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * ); pi_64 = (int64_t*)va_arg( args, int64_t * );
if (IsRemote (p_sys->fd, p_access->psz_filepath)) if (IsRemote (p_sys->fd, p_access->psz_filepath))
...@@ -408,22 +406,11 @@ static int FileControl( access_t *p_access, int i_query, va_list args ) ...@@ -408,22 +406,11 @@ static int FileControl( access_t *p_access, int i_query, va_list args )
*pi_64 *= 1000; *pi_64 *= 1000;
break; break;
/* */
case ACCESS_SET_PAUSE_STATE: case ACCESS_SET_PAUSE_STATE:
/* Nothing to do */ /* Nothing to do */
break; break;
case ACCESS_GET_TITLE_INFO:
case ACCESS_SET_TITLE:
case ACCESS_SET_SEEKPOINT:
case ACCESS_SET_PRIVATE_ID_STATE:
case ACCESS_GET_META:
case ACCESS_GET_PRIVATE_ID_STATE:
case ACCESS_GET_CONTENT_TYPE:
return VLC_EGENERIC;
default: default:
msg_Warn( p_access, "unimplemented query %d in control", i_query );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
...@@ -874,7 +874,6 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -874,7 +874,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
switch( i_query ) switch( i_query )
{ {
/* */
case ACCESS_CAN_SEEK: case ACCESS_CAN_SEEK:
pb_bool = (bool*)va_arg( args, bool* ); pb_bool = (bool*)va_arg( args, bool* );
*pb_bool = !p_access->p_sys->directory; *pb_bool = !p_access->p_sys->directory;
...@@ -895,30 +894,19 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -895,30 +894,19 @@ static int Control( access_t *p_access, int i_query, va_list args )
*va_arg( args, uint64_t * ) = p_access->p_sys->size; *va_arg( args, uint64_t * ) = p_access->p_sys->size;
break; break;
/* */
case ACCESS_GET_PTS_DELAY: case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * ); pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = INT64_C(1000) *pi_64 = INT64_C(1000)
* var_InheritInteger( p_access, "network-caching" ); * var_InheritInteger( p_access, "network-caching" );
break; break;
/* */
case ACCESS_SET_PAUSE_STATE: case ACCESS_SET_PAUSE_STATE:
pb_bool = (bool*)va_arg( args, bool* ); pb_bool = (bool*)va_arg( args, bool* );
if ( !pb_bool ) if ( !pb_bool )
return Seek( p_access, p_access->info.i_pos ); return Seek( p_access, p_access->info.i_pos );
break; break;
case ACCESS_GET_TITLE_INFO:
case ACCESS_SET_TITLE:
case ACCESS_SET_SEEKPOINT:
case ACCESS_SET_PRIVATE_ID_STATE:
case ACCESS_GET_CONTENT_TYPE:
case ACCESS_GET_META:
return VLC_EGENERIC;
default: default:
msg_Warn( p_access, "unimplemented query in control: %d", i_query);
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
...@@ -345,7 +345,6 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -345,7 +345,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
switch( i_query ) switch( i_query )
{ {
/* */
case ACCESS_CAN_SEEK: case ACCESS_CAN_SEEK:
case ACCESS_CAN_FASTSEEK: case ACCESS_CAN_FASTSEEK:
pb_bool = (bool*)va_arg( args, bool* ); pb_bool = (bool*)va_arg( args, bool* );
...@@ -367,23 +366,12 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -367,23 +366,12 @@ static int Control( access_t *p_access, int i_query, va_list args )
*pi_64 = DEFAULT_PTS_DELAY; /* FIXME */ *pi_64 = DEFAULT_PTS_DELAY; /* FIXME */
break; break;
/* */
case ACCESS_SET_PAUSE_STATE: case ACCESS_SET_PAUSE_STATE:
/* Nothing to do */ /* Nothing to do */
break; break;
case ACCESS_GET_TITLE_INFO:
case ACCESS_SET_TITLE:
case ACCESS_SET_SEEKPOINT:
case ACCESS_SET_PRIVATE_ID_STATE:
case ACCESS_GET_META:
case ACCESS_GET_CONTENT_TYPE:
return VLC_EGENERIC;
default: default:
msg_Warn( p_access, "unimplemented query in control" );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -1019,14 +1019,7 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -1019,14 +1019,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
p_sys->psz_mime ? strdup( p_sys->psz_mime ) : NULL; p_sys->psz_mime ? strdup( p_sys->psz_mime ) : NULL;
break; break;
case ACCESS_GET_TITLE_INFO:
case ACCESS_SET_TITLE:
case ACCESS_SET_SEEKPOINT:
case ACCESS_SET_PRIVATE_ID_STATE:
return VLC_EGENERIC;
default: default:
msg_Warn( p_access, "unimplemented query in control" );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
...@@ -356,13 +356,6 @@ static int ControlAccess(access_t *access, int i_query, va_list args) ...@@ -356,13 +356,6 @@ static int ControlAccess(access_t *access, int i_query, va_list args)
case ACCESS_SET_PAUSE_STATE: case ACCESS_SET_PAUSE_STATE:
return VLC_SUCCESS; return VLC_SUCCESS;
case ACCESS_GET_TITLE_INFO:
case ACCESS_SET_TITLE:
case ACCESS_SET_SEEKPOINT:
case ACCESS_SET_PRIVATE_ID_STATE:
case ACCESS_GET_META:
case ACCESS_GET_PRIVATE_ID_STATE:
case ACCESS_GET_CONTENT_TYPE:
default: default:
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
...@@ -223,7 +223,6 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -223,7 +223,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
switch( i_query ) switch( i_query )
{ {
/* */
case ACCESS_CAN_SEEK: case ACCESS_CAN_SEEK:
pb_bool = (bool*)va_arg( args, bool* ); pb_bool = (bool*)va_arg( args, bool* );
*pb_bool = !p_sys->b_broadcast; *pb_bool = !p_sys->b_broadcast;
...@@ -247,7 +246,6 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -247,7 +246,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
return VLC_SUCCESS; return VLC_SUCCESS;
} }
/* */
case ACCESS_GET_PTS_DELAY: case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * ); pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = INT64_C(1000) *pi_64 = INT64_C(1000)
...@@ -263,7 +261,6 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -263,7 +261,6 @@ 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; *pb_bool = p_sys->asfh.stream[i_int].i_selected ? true : false;
break; break;
/* */
case ACCESS_SET_PAUSE_STATE: case ACCESS_SET_PAUSE_STATE:
b_bool = (bool)va_arg( args, int ); b_bool = (bool)va_arg( args, int );
if( b_bool ) if( b_bool )
...@@ -272,18 +269,8 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -272,18 +269,8 @@ static int Control( access_t *p_access, int i_query, va_list args )
Seek( p_access, p_access->info.i_pos ); Seek( p_access, p_access->info.i_pos );
break; break;
case ACCESS_GET_TITLE_INFO:
case ACCESS_SET_TITLE:
case ACCESS_SET_SEEKPOINT:
case ACCESS_SET_PRIVATE_ID_STATE:
case ACCESS_GET_CONTENT_TYPE:
case ACCESS_GET_META:
return VLC_EGENERIC;
default: default:
msg_Warn( p_access, "unimplemented query in control" );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
return VLC_SUCCESS; return VLC_SUCCESS;
} }
......
...@@ -224,7 +224,6 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -224,7 +224,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
switch( i_query ) switch( i_query )
{ {
/* */
case ACCESS_CAN_SEEK: case ACCESS_CAN_SEEK:
pb_bool = (bool*)va_arg( args, bool* ); pb_bool = (bool*)va_arg( args, bool* );
*pb_bool = p_sys->b_seekable; *pb_bool = p_sys->b_seekable;
...@@ -254,7 +253,6 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -254,7 +253,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
*va_arg( args, uint64_t * ) = p_sys->i_size; *va_arg( args, uint64_t * ) = p_sys->i_size;
break; break;
/* */
case ACCESS_GET_PTS_DELAY: case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * ); pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = INT64_C(1000) *pi_64 = INT64_C(1000)
...@@ -270,7 +268,6 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -270,7 +268,6 @@ 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; *pb_bool = p_sys->asfh.stream[i_int].i_selected ? true : false;
break; break;
/* */
case ACCESS_SET_PAUSE_STATE: case ACCESS_SET_PAUSE_STATE:
b_bool = (bool)va_arg( args, int ); b_bool = (bool)va_arg( args, int );
if( b_bool ) if( b_bool )
...@@ -285,19 +282,8 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -285,19 +282,8 @@ static int Control( access_t *p_access, int i_query, va_list args )
} }
break; break;
case ACCESS_GET_TITLE_INFO:
case ACCESS_SET_TITLE:
case ACCESS_SET_SEEKPOINT:
case ACCESS_SET_PRIVATE_ID_STATE:
case ACCESS_GET_CONTENT_TYPE:
case ACCESS_GET_META:
return VLC_EGENERIC;
default: default:
msg_Warn( p_access, "unimplemented query in control" );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
return VLC_SUCCESS; return VLC_SUCCESS;
} }
......
...@@ -230,7 +230,6 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -230,7 +230,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
switch( i_query ) switch( i_query )
{ {
/* */
case ACCESS_CAN_SEEK: case ACCESS_CAN_SEEK:
case ACCESS_CAN_FASTSEEK: case ACCESS_CAN_FASTSEEK:
pb_bool = ( bool* )va_arg( args, bool* ); pb_bool = ( bool* )va_arg( args, bool* );
...@@ -262,22 +261,11 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -262,22 +261,11 @@ static int Control( access_t *p_access, int i_query, va_list args )
* var_InheritInteger( p_access, "file-caching" ); * var_InheritInteger( p_access, "file-caching" );
break; break;
/* */
case ACCESS_SET_PAUSE_STATE: case ACCESS_SET_PAUSE_STATE:
/* Nothing to do */ /* Nothing to do */
break; break;
case ACCESS_GET_TITLE_INFO:
case ACCESS_SET_TITLE:
case ACCESS_SET_SEEKPOINT:
case ACCESS_SET_PRIVATE_ID_STATE:
case ACCESS_GET_META:
case ACCESS_GET_PRIVATE_ID_STATE:
case ACCESS_GET_CONTENT_TYPE:
return VLC_EGENERIC;
default: default:
msg_Warn( p_access, "unimplemented query %d in control", i_query );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
...@@ -305,7 +305,6 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -305,7 +305,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
{ {
switch( i_query ) switch( i_query )
{ {
/* */
case ACCESS_CAN_SEEK: case ACCESS_CAN_SEEK:
case ACCESS_CAN_FASTSEEK: case ACCESS_CAN_FASTSEEK:
case ACCESS_CAN_PAUSE: case ACCESS_CAN_PAUSE:
...@@ -321,21 +320,11 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -321,21 +320,11 @@ static int Control( access_t *p_access, int i_query, va_list args )
* var_InheritInteger(p_access, "network-caching"); * var_InheritInteger(p_access, "network-caching");
break; break;
/* */
case ACCESS_SET_PAUSE_STATE: case ACCESS_SET_PAUSE_STATE:
/* Nothing to do */ /* Nothing to do */
break; break;
case ACCESS_GET_TITLE_INFO:
case ACCESS_SET_TITLE:
case ACCESS_SET_SEEKPOINT:
case ACCESS_SET_PRIVATE_ID_STATE:
case ACCESS_GET_META:
case ACCESS_GET_CONTENT_TYPE:
return VLC_EGENERIC;
default: default:
msg_Warn( p_access, "unimplemented query in control" );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
...@@ -351,17 +351,7 @@ static int Control( access_t* p_access, int i_query, va_list args ) ...@@ -351,17 +351,7 @@ static int Control( access_t* p_access, int i_query, va_list args )
case ACCESS_SET_PAUSE_STATE: case ACCESS_SET_PAUSE_STATE:
break; break;
case ACCESS_GET_TITLE_INFO:
case ACCESS_SET_TITLE:
case ACCESS_SET_SEEKPOINT:
case ACCESS_SET_PRIVATE_ID_STATE:
case ACCESS_GET_META:
case ACCESS_GET_PRIVATE_ID_STATE:
case ACCESS_GET_CONTENT_TYPE:
return VLC_EGENERIC;
default: default:
msg_Warn( p_access, "unimplemented query %d in control", i_query );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
...@@ -332,17 +332,8 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -332,17 +332,8 @@ static int Control( access_t *p_access, int i_query, va_list args )
/* Nothing to do */ /* Nothing to do */
break; break;
case ACCESS_GET_TITLE_INFO:
case ACCESS_SET_TITLE:
case ACCESS_SET_SEEKPOINT:
case ACCESS_SET_PRIVATE_ID_STATE:
case ACCESS_GET_CONTENT_TYPE:
return VLC_EGENERIC;
default: default:
msg_Warn( p_access, "unimplemented query in control" );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
return VLC_SUCCESS; return VLC_SUCCESS;
......
...@@ -158,7 +158,6 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -158,7 +158,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
switch( i_query ) switch( i_query )
{ {
/* */
case ACCESS_CAN_SEEK: case ACCESS_CAN_SEEK:
case ACCESS_CAN_FASTSEEK: case ACCESS_CAN_FASTSEEK:
pb_bool = (bool*)va_arg( args, bool* ); pb_bool = (bool*)va_arg( args, bool* );
...@@ -179,22 +178,12 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -179,22 +178,12 @@ static int Control( access_t *p_access, int i_query, va_list args )
* var_InheritInteger( p_access, "network-caching" ); * var_InheritInteger( p_access, "network-caching" );
break; break;
/* */
case ACCESS_SET_PAUSE_STATE: case ACCESS_SET_PAUSE_STATE:
/* Nothing to do */ /* Nothing to do */
break; break;
case ACCESS_GET_TITLE_INFO:
case ACCESS_SET_TITLE:
case ACCESS_SET_SEEKPOINT:
case ACCESS_SET_PRIVATE_ID_STATE:
case ACCESS_GET_CONTENT_TYPE:
return VLC_EGENERIC;
default: default:
msg_Warn( p_access, "unimplemented query in control" );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -204,7 +204,6 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -204,7 +204,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
switch( i_query ) switch( i_query )
{ {
/* */
case ACCESS_CAN_SEEK: case ACCESS_CAN_SEEK:
case ACCESS_CAN_FASTSEEK: case ACCESS_CAN_FASTSEEK:
case ACCESS_CAN_PAUSE: case ACCESS_CAN_PAUSE:
...@@ -212,26 +211,15 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -212,26 +211,15 @@ static int Control( access_t *p_access, int i_query, va_list args )
pb_bool = (bool*)va_arg( args, bool* ); pb_bool = (bool*)va_arg( args, bool* );
*pb_bool = false; *pb_bool = false;
break; break;
/* */
case ACCESS_GET_PTS_DELAY: case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * ); pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = INT64_C(1000) *pi_64 = INT64_C(1000)
* var_InheritInteger(p_access, "network-caching"); * var_InheritInteger(p_access, "network-caching");
break; break;
/* */
case ACCESS_SET_PAUSE_STATE:
case ACCESS_GET_TITLE_INFO:
case ACCESS_SET_TITLE:
case ACCESS_SET_SEEKPOINT:
case ACCESS_SET_PRIVATE_ID_STATE:
case ACCESS_GET_CONTENT_TYPE:
return VLC_EGENERIC;
default: default:
msg_Warn( p_access, "unimplemented query in control" );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
return VLC_SUCCESS; return VLC_SUCCESS;
} }
......
...@@ -263,7 +263,6 @@ static int AccessControl( access_t *access, int query, va_list args ) ...@@ -263,7 +263,6 @@ static int AccessControl( access_t *access, int query, va_list args )
{ {
switch( query ) switch( query )
{ {
/* */
case ACCESS_CAN_SEEK: case ACCESS_CAN_SEEK:
case ACCESS_CAN_FASTSEEK: case ACCESS_CAN_FASTSEEK:
case ACCESS_CAN_PAUSE: case ACCESS_CAN_PAUSE:
...@@ -271,27 +270,16 @@ static int AccessControl( access_t *access, int query, va_list args ) ...@@ -271,27 +270,16 @@ static int AccessControl( access_t *access, int query, va_list args )
*va_arg( args, bool* ) = false; *va_arg( args, bool* ) = false;
break; break;
/* */
case ACCESS_GET_PTS_DELAY: case ACCESS_GET_PTS_DELAY:
*va_arg(args,int64_t *) = INT64_C(1000) *va_arg(args,int64_t *) = INT64_C(1000)
* var_InheritInteger( access, "live-caching" ); * var_InheritInteger( access, "live-caching" );
break; break;
/* */
case ACCESS_SET_PAUSE_STATE: case ACCESS_SET_PAUSE_STATE:
/* Nothing to do */ /* Nothing to do */
break; break;
case ACCESS_GET_TITLE_INFO:
case ACCESS_SET_TITLE:
case ACCESS_SET_SEEKPOINT:
case ACCESS_SET_PRIVATE_ID_STATE:
case ACCESS_GET_CONTENT_TYPE:
case ACCESS_GET_META:
return VLC_EGENERIC;
default: default:
msg_Warn( access, "Unimplemented query %d in control", query );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
...@@ -301,17 +301,11 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -301,17 +301,11 @@ static int Control( access_t *p_access, int i_query, va_list args )
p_access->info.i_pos = (uint64_t)(p_sys->i_sector - p_access->info.i_pos = (uint64_t)(p_sys->i_sector -
p_sys->p_sectors[1+p_access->info.i_title]) *VCD_DATA_SIZE; p_sys->p_sectors[1+p_access->info.i_title]) *VCD_DATA_SIZE;
} }
return VLC_SUCCESS; break;
} }
case ACCESS_SET_PRIVATE_ID_STATE:
case ACCESS_GET_CONTENT_TYPE:
return VLC_EGENERIC;
default: default:
msg_Warn( p_access, "unimplemented query in control" );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
return VLC_SUCCESS; return VLC_SUCCESS;
} }
......
...@@ -1011,12 +1011,12 @@ static int VCDControl( access_t *p_access, int i_query, va_list args ) ...@@ -1011,12 +1011,12 @@ static int VCDControl( access_t *p_access, int i_query, va_list args )
switch( i_query ) switch( i_query )
{ {
#if 0
/* Pass back a copy of meta information that was gathered when we /* Pass back a copy of meta information that was gathered when we
during the Open/Initialize call. during the Open/Initialize call.
*/ */
case ACCESS_GET_META: case ACCESS_GET_META:
dbg_print( INPUT_DBG_EVENT, "get meta info" ); dbg_print( INPUT_DBG_EVENT, "get meta info" );
#if 0
if( p_vcdplayer->p_meta ) if( p_vcdplayer->p_meta )
{ {
vlc_meta_t **pp_meta = (vlc_meta_t**)va_arg(args,vlc_meta_t**); vlc_meta_t **pp_meta = (vlc_meta_t**)va_arg(args,vlc_meta_t**);
...@@ -1025,30 +1025,25 @@ static int VCDControl( access_t *p_access, int i_query, va_list args ) ...@@ -1025,30 +1025,25 @@ static int VCDControl( access_t *p_access, int i_query, va_list args )
dbg_print( INPUT_DBG_META, "%s", "Meta copied" ); dbg_print( INPUT_DBG_META, "%s", "Meta copied" );
} }
else else
#endif
msg_Warn( p_access, "tried to copy NULL meta info" ); msg_Warn( p_access, "tried to copy NULL meta info" );
return VLC_SUCCESS; return VLC_SUCCESS;
#endif
case ACCESS_CAN_SEEK: case ACCESS_CAN_SEEK:
case ACCESS_CAN_FASTSEEK: case ACCESS_CAN_FASTSEEK:
case ACCESS_CAN_PAUSE: case ACCESS_CAN_PAUSE:
case ACCESS_CAN_CONTROL_PACE: case ACCESS_CAN_CONTROL_PACE:
dbg_print( INPUT_DBG_EVENT, dbg_print( INPUT_DBG_EVENT,
"seek/fastseek/pause/can_control_pace" ); "seek/fastseek/pause/can_control_pace" );
*((bool*)va_arg( args, bool* )) = true; *((bool*)va_arg( args, bool* )) = true;
return VLC_SUCCESS; break;
/* */
case ACCESS_GET_PTS_DELAY: case ACCESS_GET_PTS_DELAY:
*(int64_t*)va_arg(args,int64_t *) = INT64_C(1000) * *(int64_t*)va_arg(args,int64_t *) = INT64_C(1000) *
var_InheritInteger( p_access, "disc-caching" ); var_InheritInteger( p_access, "disc-caching" );
return VLC_SUCCESS; break;
/* */
case ACCESS_SET_PAUSE_STATE: case ACCESS_SET_PAUSE_STATE:
return VLC_SUCCESS; break;
case ACCESS_GET_TITLE_INFO: case ACCESS_GET_TITLE_INFO:
{ {
...@@ -1076,7 +1071,7 @@ static int VCDControl( access_t *p_access, int i_query, va_list args ) ...@@ -1076,7 +1071,7 @@ static int VCDControl( access_t *p_access, int i_query, va_list args )
if( p_vcdplayer->i_titles == 0 ) if( p_vcdplayer->i_titles == 0 )
{ {
*pi_int = 0; ppp_title = NULL; *pi_int = 0; ppp_title = NULL;
return VLC_SUCCESS; break;
} }
*pi_int = p_vcdplayer->i_titles; *pi_int = p_vcdplayer->i_titles;
*ppp_title = malloc(sizeof(input_title_t **)*p_vcdplayer->i_titles); *ppp_title = malloc(sizeof(input_title_t **)*p_vcdplayer->i_titles);
...@@ -1163,17 +1158,11 @@ static int VCDControl( access_t *p_access, int i_query, va_list args ) ...@@ -1163,17 +1158,11 @@ static int VCDControl( access_t *p_access, int i_query, va_list args )
VCDSetOrigin(p_access,vcdinfo_get_entry_lsn(p_vcdplayer->vcd,i), VCDSetOrigin(p_access,vcdinfo_get_entry_lsn(p_vcdplayer->vcd,i),
i_track,&(p_vcdplayer->play_item)); i_track,&(p_vcdplayer->play_item));
} }
return VLC_SUCCESS; break;
} }
case ACCESS_SET_PRIVATE_ID_STATE:
dbg_print( INPUT_DBG_EVENT, "set private id" );
return VLC_EGENERIC;
default: default:
msg_Warn( p_access, "unimplemented query in control" );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -312,12 +312,7 @@ static int Control( access_t *p_access, int i_query, va_list args ) ...@@ -312,12 +312,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
vlc_meta_Merge( p_meta, p_sys->p_meta ); vlc_meta_Merge( p_meta, p_sys->p_meta );
break; break;
case ACCESS_SET_PRIVATE_ID_STATE:
case ACCESS_GET_CONTENT_TYPE:
return VLC_EGENERIC;
default: default:
msg_Warn( p_access, "unimplemented query in control" );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
return VLC_SUCCESS; return VLC_SUCCESS;
......
...@@ -225,7 +225,6 @@ static int AccessControl( access_t *p_access, int i_query, va_list args ) ...@@ -225,7 +225,6 @@ static int AccessControl( access_t *p_access, int i_query, va_list args )
switch( i_query ) switch( i_query )
{ {
/* */
case ACCESS_CAN_SEEK: case ACCESS_CAN_SEEK:
case ACCESS_CAN_PAUSE: case ACCESS_CAN_PAUSE:
case ACCESS_CAN_CONTROL_PACE: case ACCESS_CAN_CONTROL_PACE:
...@@ -253,24 +252,12 @@ static int AccessControl( access_t *p_access, int i_query, va_list args ) ...@@ -253,24 +252,12 @@ static int AccessControl( access_t *p_access, int i_query, va_list args )
*pi_64 = DEFAULT_PTS_DELAY; *pi_64 = DEFAULT_PTS_DELAY;
break; break;
/* */
case ACCESS_SET_PAUSE_STATE: case ACCESS_SET_PAUSE_STATE:
/* Nothing to do */ /* Nothing to do */
break; break;
case ACCESS_GET_TITLE_INFO:
case ACCESS_SET_TITLE:
case ACCESS_SET_SEEKPOINT:
case ACCESS_SET_PRIVATE_ID_STATE:
case ACCESS_GET_META:
case ACCESS_GET_PRIVATE_ID_STATE:
case ACCESS_GET_CONTENT_TYPE:
return VLC_EGENERIC;
default: default:
msg_Warn( p_access, "unimplemented query %d in control", i_query );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
return VLC_SUCCESS; return VLC_SUCCESS;
} }
......
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