case ACCESS_GET_PRIVATE_ID_STATE:
i_int = (int)va_arg( args, int );
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t );
+ pb_bool = (vlc_bool_t *)va_arg( args, vlc_bool_t * );
if( i_int < 0 || i_int > 127 )
return VLC_EGENERIC;
* and bitrate mutual exclusion(optional) */
E_( asf_HeaderParse )( &p_sys->asfh,
p_sys->p_header, p_sys->i_header );
- msg_Dbg( p_access, "packet count=%lld packet size=%d",
+ msg_Dbg( p_access, "packet count="I64Fd" packet size=%d",
p_sys->asfh.i_data_packets_count,
p_sys->asfh.i_min_data_packet_size );
case ACCESS_GET_PRIVATE_ID_STATE:
i_int = (int)va_arg( args, int );
- pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t );
+ pb_bool = (vlc_bool_t *)va_arg( args, vlc_bool_t * );
if( i_int < 0 || i_int > 127 )
return VLC_EGENERIC;
*****************************************************************************/
typedef struct entries_sect_s
{
- uint8_t psz_id[8]; /* "ENTRYVCD" */
+ char psz_id[8]; /* "ENTRYVCD" */
uint8_t i_version; /* 0x02 VCD2.0
0x01 SVCD */
uint8_t i_sys_prof_tag; /* 0x01 if VCD1.1
static void CloseDecoder ( vlc_object_t * );
static void *DecodeBlock ( decoder_t *, block_t ** );
-static int SyncInfo ( const byte_t *, int *, int *, int *,int * );
+static int SyncInfo ( const byte_t *, unsigned int *, unsigned int *,
+ unsigned int *, int * );
static uint8_t *GetOutBuffer ( decoder_t *, void ** );
static aout_buffer_t *GetAoutBuffer( decoder_t * );
* their SyncInfo...
*****************************************************************************/
static int SyncInfo( const byte_t * p_buf,
- int * pi_channels, int * pi_channels_conf,
- int * pi_sample_rate, int * pi_bit_rate )
+ unsigned int * pi_channels,
+ unsigned int * pi_channels_conf,
+ unsigned int * pi_sample_rate, int * pi_bit_rate )
{
static const uint8_t halfrate[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3 };
static const int rate[] = { 32, 40, 48, 56, 64, 80, 96, 112,
static inline int SyncCode( const uint8_t * );
static int SyncInfo ( const uint8_t *, unsigned int *, unsigned int *,
- unsigned int *, unsigned int *, unsigned int * );
+ unsigned int *, int *, unsigned int * );
static uint8_t *GetOutBuffer ( decoder_t *, void ** );
static aout_buffer_t *GetAoutBuffer( decoder_t * );
static int SyncInfo16be( const uint8_t *p_buf,
unsigned int *pi_audio_mode,
unsigned int *pi_sample_rate,
- unsigned int *pi_bit_rate,
+ int *pi_bit_rate,
unsigned int *pi_frame_length )
{
unsigned int i_frame_size;
unsigned int *pi_channels,
unsigned int *pi_channels_conf,
unsigned int *pi_sample_rate,
- unsigned int *pi_bit_rate,
+ int *pi_bit_rate,
unsigned int *pi_frame_length )
{
unsigned int i_audio_mode;
#endif
static block_t *PacketizeBlock( decoder_t *, block_t ** );
-static int SyncInfo( decoder_t *, uint8_t *, int *, int *, int *,int * );
+static int SyncInfo( decoder_t *, uint8_t *, unsigned int *, unsigned int *,
+ unsigned int *,int * );
#ifdef USE_LIBFLAC
* SyncInfo: parse FLAC sync info
*****************************************************************************/
static int SyncInfo( decoder_t *p_dec, uint8_t *p_buf,
- int * pi_channels, int * pi_channels_conf,
- int * pi_sample_rate, int * pi_bits_per_sample )
+ unsigned int * pi_channels,
+ unsigned int * pi_channels_conf,
+ unsigned int * pi_sample_rate,
+ int * pi_bits_per_sample )
{
decoder_sys_t *p_sys = p_dec->p_sys;
int i_header, i_temp, i_read;
* AddNibble: read a nibble from a source packet and add it to our integer.
*****************************************************************************/
static inline unsigned int AddNibble( unsigned int i_code,
- uint8_t *p_src, int *pi_index )
+ uint8_t *p_src, unsigned int *pi_index )
{
if( *pi_index & 0x1 )
{
char *param2;
} macro_t;
-static int FileLoad( FILE *f, uint8_t **pp_data, int *pi_data )
+static int FileLoad( FILE *f, char **pp_data, int *pi_data )
{
int i_read;
return VLC_SUCCESS;
}
-static int MacroParse( macro_t *m, uint8_t *psz_src )
+static int MacroParse( macro_t *m, char *psz_src )
{
- uint8_t *dup = strdup( psz_src );
- uint8_t *src = dup;
- uint8_t *p;
+ char *dup = strdup( (char *)psz_src );
+ char *src = dup;
+ char *p;
int i_skip;
#define EXTRACT( name, l ) \
static void MacroDo( httpd_file_sys_t *p_args,
macro_t *m,
- uint8_t *p_request, int i_request,
- uint8_t **pp_data, int *pi_data,
- uint8_t **pp_dst )
+ char *p_request, int i_request,
+ char **pp_data, int *pi_data,
+ char **pp_dst )
{
intf_thread_t *p_intf = p_args->p_intf;
intf_sys_t *p_sys = p_args->p_intf->p_sys;
#undef ALLOC
}
-static uint8_t *MacroSearch( uint8_t *src, uint8_t *end, int i_mvlc, vlc_bool_t b_after )
+static char *MacroSearch( char *src, char *end, int i_mvlc, vlc_bool_t b_after )
{
int i_id;
int i_level = 0;
while( src < end )
{
- if( src + 4 < end && !strncmp( src, "<vlc", 4 ) )
+ if( src + 4 < end && !strncmp( (char *)src, "<vlc", 4 ) )
{
int i_skip;
macro_t m;
}
static void Execute( httpd_file_sys_t *p_args,
- uint8_t *p_request, int i_request,
- uint8_t **pp_data, int *pi_data,
- uint8_t **pp_dst,
- uint8_t *_src, uint8_t *_end )
+ char *p_request, int i_request,
+ char **pp_data, int *pi_data,
+ char **pp_dst,
+ char *_src, char *_end )
{
intf_thread_t *p_intf = p_args->p_intf;
- uint8_t *src, *dup, *end;
- uint8_t *dst = *pp_dst;
+ char *src, *dup, *end;
+ char *dst = *pp_dst;
src = dup = malloc( _end - _src + 1 );
end = src +( _end - _src );
/* we parse searching <vlc */
while( src < end )
{
- uint8_t *p;
+ char *p;
int i_copy;
- p = strstr( src, "<vlc" );
+ p = (char *)strstr( (char *)src, "<vlc" );
if( p < end && p == src )
{
macro_t m;
case MVLC_IF:
{
vlc_bool_t i_test;
- uint8_t *endif;
+ char *endif;
EvaluateRPN( p_args->vars, &p_args->stack, m.param1 );
if( SSPopN( &p_args->stack, p_args->vars ) )
if( i_test == 0 )
{
- uint8_t *start = MacroSearch( src, endif, MVLC_ELSE, VLC_TRUE );
+ char *start = MacroSearch( src, endif, MVLC_ELSE, VLC_TRUE );
if( start )
{
- uint8_t *stop = MacroSearch( start, endif, MVLC_END, VLC_FALSE );
+ char *stop = MacroSearch( start, endif, MVLC_END, VLC_FALSE );
if( stop )
{
Execute( p_args, p_request, i_request, pp_data, pi_data, &dst, start, stop );
}
else if( i_test == 1 )
{
- uint8_t *stop;
+ char *stop;
if( ( stop = MacroSearch( src, endif, MVLC_ELSE, VLC_FALSE ) ) == NULL )
{
stop = MacroSearch( src, endif, MVLC_END, VLC_FALSE );
}
case MVLC_FOREACH:
{
- uint8_t *endfor = MacroSearch( src, end, MVLC_END, VLC_TRUE );
- uint8_t *start = src;
- uint8_t *stop = MacroSearch( src, end, MVLC_END, VLC_FALSE );
+ char *endfor = MacroSearch( src, end, MVLC_END, VLC_TRUE );
+ char *start = src;
+ char *stop = MacroSearch( src, end, MVLC_END, VLC_FALSE );
if( stop )
{
****************************************************************************/
static int HttpCallback( httpd_file_sys_t *p_args,
httpd_file_t *p_file,
- uint8_t *p_request,
- uint8_t **pp_data, int *pi_data )
+ uint8_t *_p_request,
+ uint8_t **_pp_data, int *pi_data )
{
+ char *p_request = (char *)_p_request;
+ char **pp_data = (char **)_pp_data;
int i_request = p_request ? strlen( p_request ) : 0;
char *p;
FILE *f;
else
{
int i_buffer;
- uint8_t *p_buffer;
- uint8_t *dst;
+ char *p_buffer;
+ char *dst;
vlc_value_t val;
char position[4]; /* percentage */
char time[12]; /* in seconds */
{
int i_mode; /* read or write */
int fd;
- uint8_t buffer_read[1000]; // 1000 byte per command should be sufficient
+ char buffer_read[1000]; // 1000 byte per command should be sufficient
char *buffer_write;
- uint8_t *p_buffer_read;
- uint8_t *p_buffer_write; // the position in the buffer
+ char *p_buffer_read;
+ char *p_buffer_write; // the position in the buffer
int i_buffer_write; // the number of byte we still have to send
int i_tel_cmd; // for specific telnet commands
switch( cl->i_tel_cmd )
{
case 0:
- switch( *cl->p_buffer_read )
+ switch( *(uint8_t *)cl->p_buffer_read )
{
case '\r':
break;
}
break;
case 1:
- switch( *cl->p_buffer_read )
+ switch( *(uint8_t *)cl->p_buffer_read )
{
case TEL_WILL: case TEL_WONT:
case TEL_DO: case TEL_DONT:
uint8_t *p_peek;
if( stream_Peek( p_demux->s, &p_peek, 12 ) < 12 ) return VLC_EGENERIC;
- if( strncmp( &p_peek[0], "FORM", 4 ) || strncmp( &p_peek[8], "AIFF", 4 ) )
+ if( strncmp( (char *)&p_peek[0], "FORM", 4 ) || strncmp( (char *)&p_peek[8], "AIFF", 4 ) )
{
return VLC_EGENERIC;
}
msg_Dbg( p_demux, "chunk fcc=%4.4s size=%d", p_peek, i_size );
- if( !strncmp( &p_peek[0], "COMM", 4 ) )
+ if( !strncmp( (char *)&p_peek[0], "COMM", 4 ) )
{
if( stream_Peek( p_demux->s, &p_peek, 18 + 8 ) < 18 + 8 )
{
msg_Dbg( p_demux, "COMM: channels=%d samples_frames=%d bits=%d rate=%d",
GetWBE( &p_peek[8] ), GetDWBE( &p_peek[10] ), GetWBE( &p_peek[14] ), GetF80BE( &p_peek[16] ) );
}
- else if( !strncmp( &p_peek[0], "SSND", 4 ) )
+ else if( !strncmp( (char *)&p_peek[0], "SSND", 4 ) )
{
if( stream_Peek( p_demux->s, &p_peek, 8 + 8 ) < 8 + 8 )
{
for( i_peeker = 0; i_peeker < 188; i_peeker++ )
{
- if( !strncmp( &p_peek[0], "RIFF", 4 ) &&
- !strncmp( &p_peek[8], "AVI ", 4 ) ) break;
+ if( !strncmp( (char *)&p_peek[0], "RIFF", 4 ) &&
+ !strncmp( (char *)&p_peek[8], "AVI ", 4 ) ) break;
p_peek++;
}
if( i_peeker == 188 )
/* We double check for file != m3u as some asx are just m3u file */
if( i_type != TYPE_M3U )
{
- uint8_t *p_peek;
- int i_size = stream_Peek( p_demux->s, &p_peek, MAX_LINE );
+ char *p_peek;
+ int i_size = stream_Peek( p_demux->s, (uint8_t *)&p_peek, MAX_LINE );
i_size -= sizeof("[Reference]") - 1;
if( i_size > 0 )
*p_header_size = -2;
return VLC_FALSE;
}
- if( strncmp( p_sys->p_peek, "--", 2 ) )
+ if( strncmp( (char *)p_sys->p_peek, "--", 2 ) )
{
*p_header_size = 0;
return VLC_FALSE;
}
}
}
- if( !strncmp( p_sys->psz_separator, p_sys->p_peek + i + 2,
+ if( !strncmp( p_sys->psz_separator, (char *)(p_sys->p_peek + i + 2),
strlen( p_sys->psz_separator ) ) )
{
b_done = VLC_TRUE;
msg_Err( p_demux, "cannot peek" );
return VLC_EGENERIC;
}
- if( !strncmp( p_peek, "ADIF", 4 ) )
+ if( !strncmp( (char *)p_peek, "ADIF", 4 ) )
{
msg_Err( p_demux, "ADIF file. Not yet supported. (Please report)" );
return VLC_EGENERIC;
i_skip = MPGA_MODE( header ) != 3 ? 21 : 13;
}
- if( i_skip + 8 < i_xing && !strncmp( &p_xing[i_skip], "Xing", 4 ) )
+ if( i_skip + 8 < i_xing && !strncmp( (char *)&p_xing[i_skip], "Xing", 4 ) )
{
unsigned int i_flags = GetDWBE( &p_xing[i_skip+4] );
uint8_t *p_peek;
- if( stream_Peek( p_demux->s, &p_peek, 8 ) < 8 ) return VLC_EGENERIC;
+ if( stream_Peek( p_demux->s, &p_peek, 8 ) < 8 )
+ return VLC_EGENERIC;
- if( strncmp( p_peek, "NSVf", 4 ) && strncmp( p_peek, "NSVs", 4 ))
+ if( strncmp( (char *)p_peek, "NSVf", 4 )
+ && strncmp( (char *)p_peek, "NSVs", 4 ))
{
/* In case we had force this demuxer we try to resynch */
if( strcmp( p_demux->psz_demux, "nsv" ) || ReSynch( p_demux ) )
return 0;
}
- if( !strncmp( p_peek, "NSVf", 4 ) )
+ if( !strncmp( (char *)p_peek, "NSVf", 4 ) )
{
if( ReadNSVf( p_demux ) )
{
return -1;
}
}
- else if( !strncmp( p_peek, "NSVs", 4 ) )
+ else if( !strncmp( (char *)p_peek, "NSVs", 4 ) )
{
if( ReadNSVs( p_demux ) )
{
*****************************************************************************/
static int ReSynch( demux_t *p_demux )
{
- uint8_t *p_peek;
+ uint8_t *p_peek;
int i_skip;
int i_peek;
while( i_skip < i_peek - 4 )
{
- if( !strncmp( p_peek, "NSVf", 4 ) || !strncmp( p_peek, "NSVs", 4 ) )
+ if( !strncmp( (char *)p_peek, "NSVf", 4 )
+ || !strncmp( (char *)p_peek, "NSVs", 4 ) )
{
if( i_skip > 0 )
{
/* Check id */
if( stream_Peek( p_demux->s, &p_peek, 12 ) != 12 ||
- ( strncmp( p_peek, "MythTVVideo", 11 ) &&
- strncmp( p_peek, "NuppelVideo", 11 ) ) )
+ ( strncmp( (char *)p_peek, "MythTVVideo", 11 ) &&
+ strncmp( (char *)p_peek, "NuppelVideo", 11 ) ) )
return VLC_EGENERIC;
p_sys = malloc( sizeof( demux_sys_t ) );
}
psz_ext = strrchr ( p_demux->psz_path, '.' );
- if( !strncmp( p_peek, "#EXTM3U", 7 ) )
+ if( !strncmp( (char *)p_peek, "#EXTM3U", 7 ) )
{
;
}
if( stream_Peek( p_demux->s, &p_peek, 31 ) < 31 ) return VLC_EGENERIC;
- if( strncmp( p_peek, PLAYLIST_FILE_HEADER , 31 ) ) return VLC_EGENERIC;
+ if( strncmp( (char *)p_peek, PLAYLIST_FILE_HEADER , 31 ) ) return VLC_EGENERIC;
msg_Dbg( p_demux, "found valid old playlist file");
if( stream_Peek( p_demux->s , &p_peek, 7 ) < 7 ) return VLC_EGENERIC;
psz_ext = strrchr ( p_demux->psz_path, '.' );
- if( !strncasecmp( p_peek, "[playlist]", 10 ) )
+ if( !strncasecmp( (char *)p_peek, "[playlist]", 10 ) )
{
;
}
uint8_t *p_peek;
if( stream_Peek( p_demux->s, &p_peek, 10 ) < 10 ) return VLC_EGENERIC;
- if( strncmp( p_peek, ".RMF", 4 ) ) return VLC_EGENERIC;
+ if( strncmp( (char *)p_peek, ".RMF", 4 ) ) return VLC_EGENERIC;
/* Fill p_demux field */
p_demux->pf_demux = Demux;
{
return 0;
}
- if( strncmp( header, "DATA", 4 ) )
+ if( strncmp( (char *)header, "DATA", 4 ) )
{
return 0;
}
msg_Dbg( p_demux, " - specific data len=%d", i_len );
if( stream_Peek( p_demux->s, &p_peek, 34 ) >= 34 )
{
- if( !strncmp( &p_peek[4], "VIDO", 4 ) )
+ if( !strncmp( (char *)&p_peek[4], "VIDO", 4 ) )
{
es_format_Init( &fmt, VIDEO_ES,
VLC_FOURCC( p_peek[8], p_peek[9], p_peek[10], p_peek[11] ) );
TAB_APPEND( p_sys->i_track, p_sys->track, tk );
}
- else if( !strncmp( p_peek, ".ra\xfd", 4 ) )
+ else if( !strncmp( (char *)p_peek, ".ra\xfd", 4 ) )
{
int i_version = GetWBE( &p_peek[4] );
uint8_t *p_extra = NULL;
}
#else
/* Align destination at BLOCK_SIZE boundary */
- for(; ((int)to & (BLOCK_SIZE-1)) && i>0; i--)
+ for(; ((ptrdiff_t)to & (BLOCK_SIZE-1)) && i>0; i--)
{
__asm__ __volatile__ (
#ifndef HAVE_MMX1
to = (void *) (((unsigned char *)to)+64);
}
-/* printf(" %d %d\n", (int)from&1023, (int)to&1023); */
+/* printf(" %p %p\n", (ptrdiff_t)from&1023, (ptrdiff_t)to&1023); */
/* Pure Assembly cuz gcc is a bit unpredictable ;) */
# if 0
if(i>=BLOCK_SIZE/64)
const uint8_t *p_s1 = (const uint8_t *)_p_s1;
const uint8_t *p_s2 = (const uint8_t *)_p_s2;
uint8_t* p_end;
- while( (int)p_s1 % 16 )
+ while( (ptrdiff_t)p_s1 % 16 )
{
*p_dest++ = ( (uint16_t)(*p_s1++) + (uint16_t)(*p_s2++) ) >> 1;
}