Commit be19f7fa authored by Laurent Aimar's avatar Laurent Aimar

Removed useless ACCESS_GET_MTU/STREAM_GET_MTU.

parent 8d305dc5
......@@ -45,8 +45,7 @@ enum access_query_e
ACCESS_CAN_CONTROL_PACE,/* arg1= bool* cannot fail */
/* */
ACCESS_GET_MTU = 0x100, /* arg1= int* cannot fail(0 if no sense)*/
ACCESS_GET_PTS_DELAY, /* arg1= int64_t* cannot fail */
ACCESS_GET_PTS_DELAY = 0x101,/* arg1= int64_t* cannot fail */
/* */
ACCESS_GET_TITLE_INFO, /* arg1=input_title_t*** arg2=int* res=can fail */
/* Meta data */
......
......@@ -89,8 +89,6 @@ enum stream_query_e
STREAM_GET_SIZE, /**< arg1= int64_t * res=cannot fail (0 if no sense)*/
STREAM_GET_MTU, /**< arg1= int * res=cannot fail (0 if no sense)*/
/* Special for direct access control from demuxer.
* XXX: avoid using it by all means */
STREAM_CONTROL_ACCESS, /* arg1= int i_access_query, args res: can fail
......@@ -135,13 +133,6 @@ static inline int64_t stream_Size( stream_t *s )
return i_pos;
}
static inline int stream_MTU( stream_t *s )
{
int i_mtu;
stream_Control( s, STREAM_GET_MTU, &i_mtu );
return i_mtu;
}
static inline int stream_Seek( stream_t *s, int64_t i_pos )
{
return stream_Control( s, STREAM_SET_POSITION, i_pos );
......
......@@ -535,10 +535,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
pb_bool = (bool*)va_arg( args, bool* );
*pb_bool = false;
break;
case ACCESS_GET_MTU: /* 4 */
pi_int = (int*)va_arg( args, int * );
*pi_int = 0;
break;
case ACCESS_GET_PTS_DELAY: /* 5 */
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = var_GetInteger( p_access, "dvb-caching" ) * 1000;
......
......@@ -341,9 +341,8 @@ static int Seek( access_t *p_access, int64_t i_pos )
*****************************************************************************/
static int Control( access_t *p_access, int i_query, va_list args )
{
bool *pb_bool;
int *pi_int;
int64_t *pi_64;
bool *pb_bool;
int64_t *pi_64;
switch( i_query )
{
......@@ -355,11 +354,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
*pb_bool = true;
break;
case ACCESS_GET_MTU:
pi_int = (int*)va_arg( args, int * );
*pi_int = CDDA_DATA_ONCE;
break;
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = var_GetInteger( p_access, "cdda-caching" ) * 1000;
......
......@@ -929,15 +929,6 @@ static int CDDAControl( access_t *p_access, int i_query, va_list args )
return VLC_SUCCESS;
}
/* */
case ACCESS_GET_MTU:
{
pi_int = (int*)va_arg( args, int * );
*pi_int = p_cdda-> i_blocks_per_read * CDIO_CD_FRAMESIZE_RAW;
dbg_print( INPUT_DBG_META, "Get MTU %d", *pi_int);
break;
}
case ACCESS_GET_PTS_DELAY:
{
int64_t *pi_64 = (int64_t*)va_arg( args, int64_t * );
......
......@@ -465,9 +465,8 @@ fatal:
*****************************************************************************/
static int Control( access_t *p_access, int i_query, va_list args )
{
bool *pb_bool;
int *pi_int;
int64_t *pi_64;
bool *pb_bool;
int64_t *pi_64;
switch( i_query )
{
......@@ -485,11 +484,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
break;
/* */
case ACCESS_GET_MTU:
pi_int = (int*)va_arg( args, int * );
*pi_int = 0;
break;
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = DEFAULT_PTS_DELAY * 1000;
......
......@@ -1824,11 +1824,6 @@ static int AccessControl( access_t *p_access, int i_query, va_list args )
break;
/* */
case ACCESS_GET_MTU:
pi_int = (int*)va_arg( args, int * );
*pi_int = 0;
break;
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = (int64_t)var_GetInteger( p_access, "dshow-caching" ) * 1000;
......
......@@ -712,7 +712,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
{
access_sys_t *p_sys = p_access->p_sys;
bool *pb_bool, b_bool;
int *pi_int, i_int;
int i_int;
int64_t *pi_64;
double *pf1, *pf2;
dvbpsi_pmt_t *p_pmt;
......@@ -729,14 +729,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
*pb_bool = false;
break;
/* */
case ACCESS_GET_MTU:
pi_int = (int*)va_arg( args, int * );
if( p_sys->b_scan_mode )
*pi_int = 0;
else
*pi_int = DVB_READ_ONCE * TS_PACKET_SIZE;
break;
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = var_GetInteger( p_access, "dvb-caching" ) * 1000;
......
......@@ -324,11 +324,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
break;
/* */
case ACCESS_GET_MTU:
pi_int = (int*)va_arg( args, int * );
*pi_int = MTU;
break;
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = (int64_t) p_sys->i_pts_delay * 1000;
......
......@@ -276,9 +276,8 @@ static int Seek (access_t *p_access, int64_t i_pos)
static int Control( access_t *p_access, int i_query, va_list args )
{
access_sys_t *p_sys = p_access->p_sys;
bool *pb_bool;
int *pi_int;
int64_t *pi_64;
bool *pb_bool;
int64_t *pi_64;
switch( i_query )
{
......@@ -296,11 +295,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
break;
/* */
case ACCESS_GET_MTU:
pi_int = (int*)va_arg( args, int * );
*pi_int = 0;
break;
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = var_GetInteger( p_access, "file-caching" ) * INT64_C(1000);
......
......@@ -553,9 +553,8 @@ static ssize_t Write( sout_access_out_t *p_access, block_t *p_buffer )
*****************************************************************************/
static int Control( access_t *p_access, int i_query, va_list args )
{
bool *pb_bool;
int *pi_int;
int64_t *pi_64;
bool *pb_bool;
int64_t *pi_64;
switch( i_query )
{
......@@ -578,11 +577,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
break;
/* */
case ACCESS_GET_MTU:
pi_int = (int*)va_arg( args, int * );
*pi_int = 0;
break;
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = (int64_t)var_GetInteger( p_access, "ftp-caching" ) * INT64_C(1000);
......
......@@ -394,12 +394,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
*pb_bool = p_sys->b_pace_control;
break;
/* */
case ACCESS_GET_MTU:
pi_int = (int*)va_arg( args, int * );
*pi_int = 0;
break;
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = var_GetInteger( p_access,
......
......@@ -913,10 +913,9 @@ static int Seek( access_t *p_access, int64_t i_pos )
static int Control( access_t *p_access, int i_query, va_list args )
{
access_sys_t *p_sys = p_access->p_sys;
bool *pb_bool;
int *pi_int;
int64_t *pi_64;
vlc_meta_t *p_meta;
bool *pb_bool;
int64_t *pi_64;
vlc_meta_t *p_meta;
switch( i_query )
{
......@@ -941,11 +940,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
break;
/* */
case ACCESS_GET_MTU:
pi_int = (int*)va_arg( args, int * );
*pi_int = 0;
break;
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = (int64_t)var_GetInteger( p_access, "http-caching" ) * 1000;
......@@ -1710,7 +1704,7 @@ static void AuthParseHeader( access_t *p_access, const char *psz_header,
const char *psz_end = strchr( psz_header, ' ' );
if( psz_end )
msg_Warn( p_access, "Unknown authentication scheme: '%*s'",
psz_end - psz_header, psz_header );
(int)(psz_end - psz_header), psz_header );
else
msg_Warn( p_access, "Unknown authentication scheme: '%s'",
psz_header );
......
......@@ -292,10 +292,6 @@ static int Control (access_t *p_access, int query, va_list args)
*((bool *)va_arg (args, bool *)) = true;
return VLC_SUCCESS;
case ACCESS_GET_MTU:
*((int *)va_arg (args, int *)) = p_sys->mtu;
return VLC_SUCCESS;
case ACCESS_GET_PTS_DELAY:
{
int delay_ms = var_CreateGetInteger (p_access, "file-caching");
......
......@@ -232,7 +232,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
access_sys_t *p_sys = p_access->p_sys;
bool *pb_bool;
bool b_bool;
int *pi_int;
int64_t *pi_64;
int i_int;
......@@ -256,11 +255,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
break;
/* */
case ACCESS_GET_MTU:
pi_int = (int*)va_arg( args, int * );
*pi_int = 0;
break;
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = (int64_t)var_GetInteger( p_access, "mms-caching" ) * INT64_C(1000);
......
......@@ -251,7 +251,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
access_sys_t *p_sys = p_access->p_sys;
bool *pb_bool;
bool b_bool;
int *pi_int;
int64_t *pi_64;
int i_int;
vlc_value_t val;
......@@ -285,11 +284,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
break;
/* */
case ACCESS_GET_MTU:
pi_int = (int*)va_arg( args, int * );
*pi_int = 0;
break;
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
var_Get( p_access, "mms-caching", &val );
......@@ -737,7 +731,7 @@ static int MMSOpen( access_t *p_access, vlc_url_t *p_url, int i_proto )
msg_Dbg( p_access,
"answer 0x06 flags:0x%8.8"PRIx32" media_length:%"PRIu32"s "
"packet_length:%zul packet_count:%"PRId32" max_bit_rate:%d "
"packet_length:%u packet_count:%"PRId32" max_bit_rate:%d "
"header_size:%zu",
p_sys->i_flags_broadcast,
p_sys->i_media_length,
......
......@@ -1015,11 +1015,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
break;
/* */
case ACCESS_GET_MTU:
pi_int = (int*)va_arg( args, int * );
*pi_int = 0;
break;
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = (int64_t)var_GetInteger( p_access, "pvr-caching" ) * 1000;
......
......@@ -448,7 +448,6 @@ static int Seek( access_t *p_access, int64_t i_pos )
static int Control( access_t *p_access, int i_query, va_list args )
{
bool *pb_bool;
int *pi_int;
int64_t *pi_64;
switch( i_query )
......@@ -471,11 +470,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
break;
/* */
case ACCESS_GET_MTU:
pi_int = (int*) va_arg( args, int * );
*pi_int = 0;
break;
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*) va_arg( args, int64_t * );
*pi_64 = var_GetInteger( p_access, "rtmp-caching" ) * INT64_C(1000);
......
......@@ -341,12 +341,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
*pb_bool = true;//p_sys->b_pace_control;
break;
/* */
case ACCESS_GET_MTU:
pi_int = (int*)va_arg( args, int * );
*pi_int = 0;
break;
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = var_GetInteger( p_access, "realrtsp-caching" ) * 1000;
......
......@@ -407,11 +407,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
*pb_bool = true;
break;
case ACCESS_GET_MTU:
pi_int = (int*)va_arg( args, int * );
*pi_int = 0;
break;
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = (int64_t)var_GetInteger( p_access, "smb-caching" ) * 1000;
......
......@@ -164,9 +164,8 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len )
*****************************************************************************/
static int Control( access_t *p_access, int i_query, va_list args )
{
bool *pb_bool;
int *pi_int;
int64_t *pi_64;
bool *pb_bool;
int64_t *pi_64;
switch( i_query )
{
......@@ -185,12 +184,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
*pb_bool = true; /* FIXME */
break;
/* */
case ACCESS_GET_MTU:
pi_int = (int*)va_arg( args, int * );
*pi_int = 0;
break;
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = (int64_t)var_GetInteger( p_access, "tcp-caching" ) * INT64_C(1000);
......
......@@ -188,9 +188,8 @@ static void Close( vlc_object_t *p_this )
*****************************************************************************/
static int Control( access_t *p_access, int i_query, va_list args )
{
bool *pb_bool;
int *pi_int;
int64_t *pi_64;
bool *pb_bool;
int64_t *pi_64;
switch( i_query )
{
......@@ -203,11 +202,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
*pb_bool = false;
break;
/* */
case ACCESS_GET_MTU:
pi_int = (int*)va_arg( args, int * );
*pi_int = MTU;
break;
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = var_GetInteger( p_access, "udp-caching" ) * 1000;
......
......@@ -1053,9 +1053,8 @@ static int DemuxControl( demux_t *p_demux, int i_query, va_list args )
*****************************************************************************/
static int AccessControl( access_t *p_access, int i_query, va_list args )
{
bool *pb_bool;
int *pi_int;
int64_t *pi_64;
bool *pb_bool;
int64_t *pi_64;
demux_sys_t *p_sys = (demux_sys_t *) p_access->p_sys;
switch( i_query )
......@@ -1076,11 +1075,6 @@ static int AccessControl( access_t *p_access, int i_query, va_list args )
break;
/* */
case ACCESS_GET_MTU:
pi_int = (int*)va_arg( args, int * );
*pi_int = 0;
break;
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = (int64_t) p_sys->i_cache * 1000;
......
......@@ -259,11 +259,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
break;
/* */
case ACCESS_GET_MTU:
pi_int = (int*)va_arg( args, int * );
*pi_int = VCD_DATA_ONCE;
break;
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = var_GetInteger( p_access, "vcd-caching" ) * 1000;
......
......@@ -1070,12 +1070,6 @@ static int VCDControl( access_t *p_access, int i_query, va_list args )
}
/* */
case ACCESS_GET_MTU:
pi_int = (int*)va_arg( args, int * );
*pi_int = (p_vcdplayer->i_blocks_per_read * M2F2_SECTOR_SIZE);
dbg_print( INPUT_DBG_EVENT, "GET MTU: %d", *pi_int );
break;
case ACCESS_GET_PTS_DELAY:
{
int64_t *pi_64 = (int64_t*)va_arg( args, int64_t * );
......
......@@ -63,11 +63,6 @@ static int AccessControl( access_t *p_access, int i_query, va_list args )
break;
/* */
case ACCESS_GET_MTU:
pi_int = (int*)va_arg( args, int * );
*pi_int = 0;
break;
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = DEFAULT_PTS_DELAY * 1000;
......
......@@ -243,9 +243,6 @@ static int Control (stream_t *stream, int query, va_list args)
case STREAM_GET_SIZE:
*(va_arg (args, int64_t *)) = 0;
break;
case STREAM_GET_MTU:
*(va_arg (args, int *)) = 0;
break;
default:
return VLC_EGENERIC;
}
......
......@@ -276,13 +276,6 @@ static int Control( stream_t *s, int i_query, va_list args )
return VLC_SUCCESS;
}
case STREAM_GET_MTU:
{
int *pi_mtu = (int*)va_arg( args, int* );
*pi_mtu = 0;
return VLC_SUCCESS;
}
/* */
case STREAM_GET_CONTENT_TYPE: /* arg1= char ** */
return VLC_EGENERIC;
......
......@@ -410,12 +410,10 @@ stream_t *stream_AccessNew( access_t *p_access, char **ppsz_list )
if( p_sys->stream.p_buffer == NULL )
goto error;
p_sys->stream.i_used = 0;
access_Control( p_access, ACCESS_GET_MTU,
&p_sys->stream.i_read_size );
if( p_sys->stream.i_read_size <= 0 )
p_sys->stream.i_read_size = STREAM_READ_ATONCE;
else if( p_sys->stream.i_read_size <= 256 )
p_sys->stream.i_read_size = 256;
p_sys->stream.i_read_size = STREAM_READ_ATONCE;
#if STREAM_READ_ATONCE < 256
# error "Invalid STREAM_READ_ATONCE value"
#endif
for( i = 0; i < STREAM_CACHE_TRACK; i++ )
{
......@@ -615,9 +613,6 @@ static int AStreamControl( stream_t *s, int i_query, va_list args )
return VLC_EGENERIC;
}
case STREAM_GET_MTU:
return VLC_EGENERIC;
case STREAM_CONTROL_ACCESS:
{
i_int = (int) va_arg( args, int );
......
......@@ -219,7 +219,6 @@ static int DStreamControl( stream_t *s, int i_query, va_list args )
stream_sys_t *p_sys = s->p_sys;
int64_t *p_i64;
bool *p_b;
int *p_int;
switch( i_query )
{
......@@ -259,11 +258,6 @@ static int DStreamControl( stream_t *s, int i_query, va_list args )
return VLC_SUCCESS;
}
case STREAM_GET_MTU:
p_int = (int*) va_arg( args, int * );
*p_int = 0;
return VLC_SUCCESS;
case STREAM_CONTROL_ACCESS:
case STREAM_GET_CONTENT_TYPE:
case STREAM_SET_RECORD_STATE:
......
......@@ -122,7 +122,6 @@ static int Control( stream_t *s, int i_query, va_list args )
p_sys->i_pos = i_64;
break;
case STREAM_GET_MTU:
case STREAM_GET_CONTENT_TYPE:
return VLC_EGENERIC;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment