Commit d1d3dc1d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

Remove I64C as well

parent 1379ab26
......@@ -862,9 +862,6 @@ VLC_EXPORT( char *, vlc_strcasestr, ( const char *s1, const char *s2 ) );
# define telldir vlc_telldir
#endif
/* 64 bits integer constant suffix */
#define I64C(x) INT64_C(x)
#if defined(WIN32) || defined(UNDER_CE)
/* win32, cl and icl support */
# if defined( _MSC_VER ) || !defined( __MINGW32__ )
......
......@@ -547,7 +547,7 @@ static void GetCDDBInfo( access_t *p_access, int i_titles, int *p_sectors )
cddb_disc_add_track( p_access->p_sys->p_disc, t );
i_size = ( p_sectors[i+1] - p_sectors[i] ) *
(int64_t)CDDA_DATA_SIZE;
i_length += I64C(1000000) * i_size / 44100 / 4 ;
i_length += INT64_C(1000000) * i_size / 44100 / 4 ;
}
cddb_disc_set_length( p_access->p_sys->p_disc, (int)(i_length/1000000) );
......
......@@ -907,7 +907,7 @@ CDDAFixupPlaylist( access_t *p_access, cdda_data_t *p_cdda,
asprintf( &t->psz_name, _("Track %i"), i_track );
t->i_size = i_track_frames * (int64_t) CDIO_CD_FRAMESIZE_RAW;
t->i_length = I64C(1000000) * t->i_size / CDDA_FREQUENCY_SAMPLE / 4;
t->i_length = INT64_C(1000000) * t->i_size / CDDA_FREQUENCY_SAMPLE / 4;
if( p_item )
{
......@@ -939,7 +939,7 @@ CDDAFixupPlaylist( access_t *p_access, cdda_data_t *p_cdda,
asprintf( &t->psz_name, _("Track %i"), i_track );
t->i_size = i_track_frames * (int64_t) CDIO_CD_FRAMESIZE_RAW;
t->i_length = I64C(1000000) * t->i_size
t->i_length = INT64_C(1000000) * t->i_size
/ CDDA_FREQUENCY_SAMPLE / 4;
if ( ! p_cdda->b_nav_mode ) {
......
......@@ -750,7 +750,7 @@ static block_t *GrabAudio( demux_t *p_demux )
i_correct += buf_info.bytes;
p_block->i_pts = p_block->i_dts =
mdate() - I64C(1000000) * (mtime_t)i_correct /
mdate() - INT64_C(1000000) * (mtime_t)i_correct /
2 / p_sys->channels / p_sys->i_sample_rate;
return p_block;
}
......
......@@ -255,7 +255,7 @@ static int HttpCallback( httpd_file_sys_t *p_args,
vlc_mutex_lock( &p_sys->httpd_mutex );
p_sys->i_httpd_timeout = mdate() + I64C(3000000); /* 3 s */
p_sys->i_httpd_timeout = mdate() + INT64_C(3000000); /* 3 s */
p_sys->psz_request = psz_request;
p_sys->b_request_frontend_info = true;
if ( p_sys->i_ca_handle )
......
......@@ -353,7 +353,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = var_GetInteger( p_access, "file-caching" ) * I64C(1000);
*pi_64 = var_GetInteger( p_access, "file-caching" ) * INT64_C(1000);
break;
/* */
......
......@@ -549,7 +549,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
var_Get( p_access, "ftp-caching", &val );
*pi_64 = (int64_t)var_GetInteger( p_access, "ftp-caching" ) * I64C(1000);
*pi_64 = (int64_t)var_GetInteger( p_access, "ftp-caching" ) * INT64_C(1000);
break;
/* */
......
......@@ -403,7 +403,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = var_GetInteger( p_access,
"gnomevfs-caching" ) * I64C(1000);
"gnomevfs-caching" ) * INT64_C(1000);
break;
/* */
......
......@@ -271,7 +271,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = (int64_t)var_GetInteger( p_access, "mms-caching" ) * I64C(1000);
*pi_64 = (int64_t)var_GetInteger( p_access, "mms-caching" ) * INT64_C(1000);
break;
case ACCESS_GET_PRIVATE_ID_STATE:
......
......@@ -260,7 +260,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
var_Get( p_access, "mms-caching", &val );
*pi_64 = (int64_t)var_GetInteger( p_access, "mms-caching" ) * I64C(1000);
*pi_64 = (int64_t)var_GetInteger( p_access, "mms-caching" ) * INT64_C(1000);
break;
case ACCESS_GET_PRIVATE_ID_STATE:
......
......@@ -467,7 +467,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = var_GetInteger( p_access, "rtmp-caching" ) * I64C(1000);
*pi_64 = var_GetInteger( p_access, "rtmp-caching" ) * INT64_C(1000);
break;
/* */
......
......@@ -188,7 +188,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = (int64_t)var_GetInteger( p_access, "tcp-caching" ) * I64C(1000);
*pi_64 = (int64_t)var_GetInteger( p_access, "tcp-caching" ) * INT64_C(1000);
break;
/* */
......
......@@ -1415,7 +1415,7 @@ static block_t *GrabAudio( demux_t *p_demux )
}
p_block->i_pts = p_block->i_dts =
mdate() - I64C(1000000) * (mtime_t)i_correct /
mdate() - INT64_C(1000000) * (mtime_t)i_correct /
2 / ( p_sys->b_stereo ? 2 : 1) / p_sys->i_sample_rate;
return p_block;
......
......@@ -1646,7 +1646,7 @@ static block_t* GrabAudio( demux_t *p_demux )
/* Timestamp */
p_block->i_pts = p_block->i_dts =
mdate() - I64C(1000000) * (mtime_t)i_correct /
mdate() - INT64_C(1000000) * (mtime_t)i_correct /
2 / ( p_sys->b_stereo ? 2 : 1) / p_sys->i_sample_rate;
return p_block;
......
......@@ -1043,7 +1043,7 @@ static void DirectSoundThread( notification_thread_t *p_notif )
/* Detect underruns */
if( l_queued && mtime - last_time >
I64C(1000000) * l_queued / p_aout->output.output.i_rate )
INT64_C(1000000) * l_queued / p_aout->output.output.i_rate )
{
msg_Dbg( p_aout, "detected underrun!" );
}
......@@ -1058,7 +1058,7 @@ static void DirectSoundThread( notification_thread_t *p_notif )
for( i = 0; i < l_free_slots; i++ )
{
aout_buffer_t *p_buffer = aout_OutputNextBuffer( p_aout,
mtime + I64C(1000000) * (i * FRAME_SIZE + l_queued) /
mtime + INT64_C(1000000) * (i * FRAME_SIZE + l_queued) /
p_aout->output.output.i_rate, b_sleek );
/* If there is no audio data available and we have some buffered
......@@ -1071,7 +1071,7 @@ static void DirectSoundThread( notification_thread_t *p_notif )
/* Sleep a reasonable amount of time */
l_queued += (i * FRAME_SIZE);
msleep( I64C(1000000) * l_queued / p_aout->output.output.i_rate / 2 );
msleep( INT64_C(1000000) * l_queued / p_aout->output.output.i_rate / 2 );
}
/* make sure the buffer isn't playing */
......
......@@ -1058,7 +1058,7 @@ static int EncoderSetVideoType( encoder_t *p_enc, IMediaObject *p_dmo )
vih.rcSource.bottom = p_enc->fmt_in.video.i_height;
vih.rcTarget = vih.rcSource;
vih.AvgTimePerFrame = I64C(10000000) / 25; //FIXME
vih.AvgTimePerFrame = INT64_C(10000000) / 25; //FIXME
dmo_type.majortype = MEDIATYPE_Video;
//dmo_type.subtype = MEDIASUBTYPE_RGB24;
......
......@@ -908,7 +908,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
memcpy( p_block->p_buffer, p_sys->p_buffer_out, i_out );
/* FIXME, 3-2 pulldown is not handled correctly */
p_block->i_length = I64C(1000000) *
p_block->i_length = INT64_C(1000000) *
p_enc->fmt_in.video.i_frame_rate_base /
p_enc->fmt_in.video.i_frame_rate;
......
......@@ -363,14 +363,14 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input )
if( p_data->i_pts > 0 )
pkt.pts = p_data->i_pts * p_stream->time_base.den /
I64C(1000000) / p_stream->time_base.num;
INT64_C(1000000) / p_stream->time_base.num;
if( p_data->i_dts > 0 )
pkt.dts = p_data->i_dts * p_stream->time_base.den /
I64C(1000000) / p_stream->time_base.num;
INT64_C(1000000) / p_stream->time_base.num;
/* this is another hack to prevent libavformat from triggering the "non monotone timestamps" check in avformat/utils.c */
p_stream->cur_dts = ( p_data->i_dts * p_stream->time_base.den /
I64C(1000000) / p_stream->time_base.num ) - 1;
INT64_C(1000000) / p_stream->time_base.num ) - 1;
if( av_write_frame( p_sys->oc, &pkt ) < 0 )
{
......
......@@ -464,7 +464,7 @@ picture_t *E_(DecodeVideo)( decoder_t *p_dec, block_t **pp_block )
}
if( !p_dec->b_pace_control && (p_sys->i_late_frames > 0) &&
(mdate() - p_sys->i_late_frames_start > I64C(5000000)) )
(mdate() - p_sys->i_late_frames_start > INT64_C(5000000)) )
{
if( p_sys->i_pts )
{
......@@ -676,7 +676,7 @@ picture_t *E_(DecodeVideo)( decoder_t *p_dec, block_t **pp_block )
if( p_dec->fmt_in.video.i_frame_rate > 0 &&
p_dec->fmt_in.video.i_frame_rate_base > 0 )
{
p_sys->i_pts += I64C(1000000) *
p_sys->i_pts += INT64_C(1000000) *
(2 + p_sys->p_ff_pic->repeat_pict) *
p_dec->fmt_in.video.i_frame_rate_base *
p_block->i_rate / INPUT_RATE_DEFAULT /
......@@ -684,7 +684,7 @@ picture_t *E_(DecodeVideo)( decoder_t *p_dec, block_t **pp_block )
}
else if( p_sys->p_context->time_base.den > 0 )
{
p_sys->i_pts += I64C(1000000) *
p_sys->i_pts += INT64_C(1000000) *
(2 + p_sys->p_ff_pic->repeat_pict) *
p_sys->p_context->time_base.num *
p_block->i_rate / INPUT_RATE_DEFAULT /
......
......@@ -1015,12 +1015,12 @@ static int SyncInfo( decoder_t *p_dec, uint8_t *p_buf,
if( i_blocksize_hint && b_variable_blocksize )
{
i_sample_number = read_utf8( &p_buf[i_header++], &i_read );
if( i_sample_number == I64C(0xffffffffffffffff) ) return 0;
if( i_sample_number == INT64_C(0xffffffffffffffff) ) return 0;
}
else
{
i_sample_number = read_utf8( &p_buf[i_header++], &i_read );
if( i_sample_number == I64C(0xffffffffffffffff) ) return 0;
if( i_sample_number == INT64_C(0xffffffffffffffff) ) return 0;
if( p_sys->b_stream_info )
i_sample_number *= p_sys->stream_info.min_blocksize;
......@@ -1105,14 +1105,14 @@ static uint64_t read_utf8( const uint8_t *p_buf, int *pi_read )
i = 6;
}
else {
return I64C(0xffffffffffffffff);
return INT64_C(0xffffffffffffffff);
}
for( j = 1; j <= i; j++ )
{
if( !(p_buf[j] & 0x80) || (p_buf[j] & 0x40) ) /* 10xxxxxx */
{
return I64C(0xffffffffffffffff);
return INT64_C(0xffffffffffffffff);
}
i_result <<= 6;
i_result |= (p_buf[j] & 0x3F);
......
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