Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
d1d3dc1d
Commit
d1d3dc1d
authored
May 01, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove I64C as well
parent
1379ab26
Changes
60
Hide whitespace changes
Inline
Side-by-side
Showing
60 changed files
with
128 additions
and
131 deletions
+128
-131
include/vlc_common.h
include/vlc_common.h
+0
-3
modules/access/cdda.c
modules/access/cdda.c
+1
-1
modules/access/cdda/info.c
modules/access/cdda/info.c
+2
-2
modules/access/dc1394.c
modules/access/dc1394.c
+1
-1
modules/access/dvb/http.c
modules/access/dvb/http.c
+1
-1
modules/access/file.c
modules/access/file.c
+1
-1
modules/access/ftp.c
modules/access/ftp.c
+1
-1
modules/access/gnomevfs.c
modules/access/gnomevfs.c
+1
-1
modules/access/mms/mmsh.c
modules/access/mms/mmsh.c
+1
-1
modules/access/mms/mmstu.c
modules/access/mms/mmstu.c
+1
-1
modules/access/rtmp/access.c
modules/access/rtmp/access.c
+1
-1
modules/access/tcp.c
modules/access/tcp.c
+1
-1
modules/access/v4l.c
modules/access/v4l.c
+1
-1
modules/access/v4l2/v4l2.c
modules/access/v4l2/v4l2.c
+1
-1
modules/audio_output/directx.c
modules/audio_output/directx.c
+3
-3
modules/codec/dmo/dmo.c
modules/codec/dmo/dmo.c
+1
-1
modules/codec/ffmpeg/encoder.c
modules/codec/ffmpeg/encoder.c
+1
-1
modules/codec/ffmpeg/mux.c
modules/codec/ffmpeg/mux.c
+3
-3
modules/codec/ffmpeg/video.c
modules/codec/ffmpeg/video.c
+3
-3
modules/codec/flac.c
modules/codec/flac.c
+4
-4
modules/codec/rawvideo.c
modules/codec/rawvideo.c
+1
-1
modules/codec/theora.c
modules/codec/theora.c
+1
-1
modules/codec/x264.c
modules/codec/x264.c
+1
-1
modules/control/http/http.c
modules/control/http/http.c
+2
-2
modules/demux/a52.c
modules/demux/a52.c
+1
-1
modules/demux/dts.c
modules/demux/dts.c
+1
-1
modules/demux/flac.c
modules/demux/flac.c
+4
-4
modules/demux/live555.cpp
modules/demux/live555.cpp
+1
-1
modules/demux/mkv.cpp
modules/demux/mkv.cpp
+3
-3
modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.c
+1
-1
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+5
-5
modules/demux/mpc.c
modules/demux/mpc.c
+3
-3
modules/demux/mpeg/m4a.c
modules/demux/mpeg/m4a.c
+3
-3
modules/demux/mpeg/mpga.c
modules/demux/mpeg/mpga.c
+2
-2
modules/demux/ogg.c
modules/demux/ogg.c
+4
-4
modules/demux/playlist/m3u.c
modules/demux/playlist/m3u.c
+1
-1
modules/demux/rawdv.c
modules/demux/rawdv.c
+1
-1
modules/demux/rawvid.c
modules/demux/rawvid.c
+1
-1
modules/demux/ts.c
modules/demux/ts.c
+3
-3
modules/demux/tta.c
modules/demux/tta.c
+3
-3
modules/demux/vc1.c
modules/demux/vc1.c
+2
-2
modules/gui/pda/pda.c
modules/gui/pda/pda.c
+1
-1
modules/gui/wince/interface.cpp
modules/gui/wince/interface.cpp
+2
-2
modules/mux/mp4.c
modules/mux/mp4.c
+9
-9
modules/mux/mpeg/ts.c
modules/mux/mpeg/ts.c
+3
-3
modules/mux/ogg.c
modules/mux/ogg.c
+6
-6
modules/packetizer/mpeg4video.c
modules/packetizer/mpeg4video.c
+2
-2
modules/packetizer/vc1.c
modules/packetizer/vc1.c
+1
-1
modules/stream_out/rtp.c
modules/stream_out/rtp.c
+1
-1
modules/video_filter/atmo/AtmoExternalCaptureInput.cpp
modules/video_filter/atmo/AtmoExternalCaptureInput.cpp
+1
-1
modules/video_filter/deinterlace.c
modules/video_filter/deinterlace.c
+1
-1
modules/video_filter/mosaic.c
modules/video_filter/mosaic.c
+1
-1
src/extras/libc.c
src/extras/libc.c
+1
-1
src/input/clock.c
src/input/clock.c
+1
-1
src/input/demux.c
src/input/demux.c
+3
-3
src/input/input.c
src/input/input.c
+5
-5
src/input/stream.c
src/input/stream.c
+4
-4
src/misc/mtime.c
src/misc/mtime.c
+11
-11
src/network/httpd.c
src/network/httpd.c
+1
-1
src/stream_output/stream_output.c
src/stream_output/stream_output.c
+1
-1
No files found.
include/vlc_common.h
View file @
d1d3dc1d
...
...
@@ -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__ )
...
...
modules/access/cdda.c
View file @
d1d3dc1d
...
...
@@ -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
+=
I
NT
64
_
C
(
1000000
)
*
i_size
/
44100
/
4
;
}
cddb_disc_set_length
(
p_access
->
p_sys
->
p_disc
,
(
int
)(
i_length
/
1000000
)
);
...
...
modules/access/cdda/info.c
View file @
d1d3dc1d
...
...
@@ -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
=
I
NT
64
_
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
=
I
NT
64
_
C
(
1000000
)
*
t
->
i_size
/
CDDA_FREQUENCY_SAMPLE
/
4
;
if
(
!
p_cdda
->
b_nav_mode
)
{
...
...
modules/access/dc1394.c
View file @
d1d3dc1d
...
...
@@ -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
()
-
I
NT
64
_
C
(
1000000
)
*
(
mtime_t
)
i_correct
/
2
/
p_sys
->
channels
/
p_sys
->
i_sample_rate
;
return
p_block
;
}
...
...
modules/access/dvb/http.c
View file @
d1d3dc1d
...
...
@@ -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
()
+
I
NT
64
_
C
(
3000000
);
/* 3 s */
p_sys
->
psz_request
=
psz_request
;
p_sys
->
b_request_frontend_info
=
true
;
if
(
p_sys
->
i_ca_handle
)
...
...
modules/access/file.c
View file @
d1d3dc1d
...
...
@@ -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"
)
*
I
NT
64
_
C
(
1000
);
break
;
/* */
...
...
modules/access/ftp.c
View file @
d1d3dc1d
...
...
@@ -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"
)
*
I
NT
64
_
C
(
1000
);
break
;
/* */
...
...
modules/access/gnomevfs.c
View file @
d1d3dc1d
...
...
@@ -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"
)
*
I
NT
64
_
C
(
1000
);
break
;
/* */
...
...
modules/access/mms/mmsh.c
View file @
d1d3dc1d
...
...
@@ -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"
)
*
I
NT
64
_
C
(
1000
);
break
;
case
ACCESS_GET_PRIVATE_ID_STATE
:
...
...
modules/access/mms/mmstu.c
View file @
d1d3dc1d
...
...
@@ -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"
)
*
I
NT
64
_
C
(
1000
);
break
;
case
ACCESS_GET_PRIVATE_ID_STATE
:
...
...
modules/access/rtmp/access.c
View file @
d1d3dc1d
...
...
@@ -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"
)
*
I
NT
64
_
C
(
1000
);
break
;
/* */
...
...
modules/access/tcp.c
View file @
d1d3dc1d
...
...
@@ -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"
)
*
I
NT
64
_
C
(
1000
);
break
;
/* */
...
...
modules/access/v4l.c
View file @
d1d3dc1d
...
...
@@ -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
()
-
I
NT
64
_
C
(
1000000
)
*
(
mtime_t
)
i_correct
/
2
/
(
p_sys
->
b_stereo
?
2
:
1
)
/
p_sys
->
i_sample_rate
;
return
p_block
;
...
...
modules/access/v4l2/v4l2.c
View file @
d1d3dc1d
...
...
@@ -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
()
-
I
NT
64
_
C
(
1000000
)
*
(
mtime_t
)
i_correct
/
2
/
(
p_sys
->
b_stereo
?
2
:
1
)
/
p_sys
->
i_sample_rate
;
return
p_block
;
...
...
modules/audio_output/directx.c
View file @
d1d3dc1d
...
...
@@ -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
)
I
NT
64
_
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
+
I
NT
64
_
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
(
I
NT
64
_
C
(
1000000
)
*
l_queued
/
p_aout
->
output
.
output
.
i_rate
/
2
);
}
/* make sure the buffer isn't playing */
...
...
modules/codec/dmo/dmo.c
View file @
d1d3dc1d
...
...
@@ -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
=
I
NT
64
_
C
(
10000000
)
/
25
;
//FIXME
dmo_type
.
majortype
=
MEDIATYPE_Video
;
//dmo_type.subtype = MEDIASUBTYPE_RGB24;
...
...
modules/codec/ffmpeg/encoder.c
View file @
d1d3dc1d
...
...
@@ -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
=
I
NT
64
_
C
(
1000000
)
*
p_enc
->
fmt_in
.
video
.
i_frame_rate_base
/
p_enc
->
fmt_in
.
video
.
i_frame_rate
;
...
...
modules/codec/ffmpeg/mux.c
View file @
d1d3dc1d
...
...
@@ -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
;
I
NT
64
_
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
;
I
NT
64
_
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
;
I
NT
64
_
C
(
1000000
)
/
p_stream
->
time_base
.
num
)
-
1
;
if
(
av_write_frame
(
p_sys
->
oc
,
&
pkt
)
<
0
)
{
...
...
modules/codec/ffmpeg/video.c
View file @
d1d3dc1d
...
...
@@ -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
>
I
NT
64
_
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
+=
I
NT
64
_
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
+=
I
NT
64
_
C
(
1000000
)
*
(
2
+
p_sys
->
p_ff_pic
->
repeat_pict
)
*
p_sys
->
p_context
->
time_base
.
num
*
p_block
->
i_rate
/
INPUT_RATE_DEFAULT
/
...
...
modules/codec/flac.c
View file @
d1d3dc1d
...
...
@@ -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
==
I
NT
64
_
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
==
I
NT
64
_
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
I
NT
64
_
C
(
0xffffffffffffffff
);
}
for
(
j
=
1
;
j
<=
i
;
j
++
)
{
if
(
!
(
p_buf
[
j
]
&
0x80
)
||
(
p_buf
[
j
]
&
0x40
)
)
/* 10xxxxxx */
{
return
I64C
(
0xffffffffffffffff
);
return
I
NT
64
_
C
(
0xffffffffffffffff
);
}
i_result
<<=
6
;
i_result
|=
(
p_buf
[
j
]
&
0x3F
);
...
...
modules/codec/rawvideo.c
View file @
d1d3dc1d
...
...
@@ -248,7 +248,7 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
}
/* Date management: 1 frame per packet */
p_sys
->
i_pts
+=
(
I64C
(
1000000
)
*
1
.
0
/
25
/*FIXME*/
);
p_sys
->
i_pts
+=
(
I
NT
64
_
C
(
1000000
)
*
1
.
0
/
25
/*FIXME*/
);
*
pp_block
=
NULL
;
return
p_buf
;
...
...
modules/codec/theora.c
View file @
d1d3dc1d
...
...
@@ -443,7 +443,7 @@ static void *ProcessPacket( decoder_t *p_dec, ogg_packet *p_oggpacket,
}
/* Date management */
p_sys
->
i_pts
+=
(
I64C
(
1000000
)
*
p_sys
->
ti
.
fps_denominator
/
p_sys
->
i_pts
+=
(
I
NT
64
_
C
(
1000000
)
*
p_sys
->
ti
.
fps_denominator
/
p_sys
->
ti
.
fps_numerator
);
/* 1 frame per packet */
return
p_buf
;
...
...
modules/codec/x264.c
View file @
d1d3dc1d
...
...
@@ -1337,7 +1337,7 @@ static block_t *Encode( encoder_t *p_enc, picture_t *p_pict )
p_block
->
i_flags
|=
BLOCK_FLAG_TYPE_B
;
/* This isn't really valid for streams with B-frames */
p_block
->
i_length
=
I64C
(
1000000
)
*
p_block
->
i_length
=
I
NT
64
_
C
(
1000000
)
*
p_enc
->
fmt_in
.
video
.
i_frame_rate_base
/
p_enc
->
fmt_in
.
video
.
i_frame_rate
;
...
...
modules/control/http/http.c
View file @
d1d3dc1d
...
...
@@ -442,9 +442,9 @@ static void ParseExecute( httpd_file_sys_t *p_args, char *p_buffer,
var_Get
(
p_sys
->
p_input
,
"position"
,
&
val
);
sprintf
(
position
,
"%d"
,
(
int
)((
val
.
f_float
)
*
100
.
0
));
var_Get
(
p_sys
->
p_input
,
"time"
,
&
val
);
sprintf
(
time
,
"%"
PRIi64
,
(
int64_t
)
val
.
i_time
/
I64C
(
1000000
)
);
sprintf
(
time
,
"%"
PRIi64
,
(
int64_t
)
val
.
i_time
/
I
NT
64
_
C
(
1000000
)
);
var_Get
(
p_sys
->
p_input
,
"length"
,
&
val
);
sprintf
(
length
,
"%"
PRIi64
,
(
int64_t
)
val
.
i_time
/
I64C
(
1000000
)
);
sprintf
(
length
,
"%"
PRIi64
,
(
int64_t
)
val
.
i_time
/
I
NT
64
_
C
(
1000000
)
);
var_Get
(
p_sys
->
p_input
,
"state"
,
&
val
);
if
(
val
.
i_int
==
PLAYING_S
)
...
...
modules/demux/a52.c
View file @
d1d3dc1d
...
...
@@ -227,7 +227,7 @@ static int Demux( demux_t *p_demux )
if
(
p_block_out
->
i_length
)
{
p_sys
->
i_mux_rate
=
p_block_out
->
i_buffer
*
I64C
(
1000000
)
/
p_block_out
->
i_length
;
p_block_out
->
i_buffer
*
I
NT
64
_
C
(
1000000
)
/
p_block_out
->
i_length
;
}
/* set PCR */
...
...
modules/demux/dts.c
View file @
d1d3dc1d
...
...
@@ -208,7 +208,7 @@ static int Demux( demux_t *p_demux )
if
(
p_block_out
->
i_length
)
{
p_sys
->
i_mux_rate
=
p_block_out
->
i_buffer
*
I64C
(
1000000
)
/
p_block_out
->
i_length
;
p_block_out
->
i_buffer
*
I
NT
64
_
C
(
1000000
)
/
p_block_out
->
i_length
;
}
/* set PCR */
...
...
modules/demux/flac.c
View file @
d1d3dc1d
...
...
@@ -316,7 +316,7 @@ static int ControlSetTime( demux_t *p_demux, int64_t i_time )
(
p_sys
->
seekpoint
[
i
+
1
]
->
i_time_offset
-
p_sys
->
seekpoint
[
i
]
->
i_time_offset
);
/* XXX We do exact seek if it's not too far away(45s) */
if
(
i_delta_time
<
45
*
I64C
(
1000000
)
)
if
(
i_delta_time
<
45
*
I
NT
64
_
C
(
1000000
)
)
{
if
(
stream_Seek
(
p_demux
->
s
,
p_sys
->
seekpoint
[
i
]
->
i_byte_offset
+
p_sys
->
i_data_pos
)
)
return
VLC_EGENERIC
;
...
...
@@ -462,7 +462,7 @@ static int ReadMeta( demux_t *p_demux, uint8_t **pp_streaminfo, int *pi_streami
/* */
ParseStreamInfo
(
p_demux
,
&
i_sample_rate
,
&
i_sample_count
,
*
pp_streaminfo
,
*
pi_streaminfo
);
if
(
i_sample_rate
>
0
)
p_sys
->
i_length
=
i_sample_count
*
I64C
(
1000000
)
/
i_sample_rate
;
p_sys
->
i_length
=
i_sample_count
*
I
NT
64
_
C
(
1000000
)
/
i_sample_rate
;
/* Be sure we have seekpoint 0 */
s
=
vlc_seekpoint_New
();
...
...
@@ -516,7 +516,7 @@ static void ParseStreamInfo( demux_t *p_demux, int *pi_rate, int64_t *pi_count,
const
int
i_skip
=
4
+
4
;
*
pi_rate
=
GetDWBE
(
&
p_data
[
i_skip
+
4
+
6
])
>>
12
;
*
pi_count
=
GetQWBE
(
&
p_data
[
i_skip
+
4
+
6
])
&
((
I64C
(
1
)
<<
36
)
-
1
);
*
pi_count
=
GetQWBE
(
&
p_data
[
i_skip
+
4
+
6
])
&
((
I
NT
64
_
C
(
1
)
<<
36
)
-
1
);
}
static
void
ParseSeekTable
(
demux_t
*
p_demux
,
const
uint8_t
*
p_data
,
int
i_data
,
...
...
@@ -539,7 +539,7 @@ static void ParseSeekTable( demux_t *p_demux, const uint8_t *p_data, int i_data,
continue
;
s
=
vlc_seekpoint_New
();
s
->
i_time_offset
=
i_sample
*
I64C
(
1000000
)
/
i_sample_rate
;
s
->
i_time_offset
=
i_sample
*
I
NT
64
_
C
(
1000000
)
/
i_sample_rate
;
s
->
i_byte_offset
=
GetQWBE
(
&
p_data
[
4
+
18
*
i
+
8
]
);
/* Check for duplicate entry */
...
...
modules/demux/live555.cpp
View file @
d1d3dc1d
...
...
@@ -1382,7 +1382,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case
DEMUX_SET_PAUSE_STATE
:
{
double
d_npt
=
(
double
)
p_sys
->
i_npt
/
I64C
(
1000000
);
double
d_npt
=
(
double
)
p_sys
->
i_npt
/
I
NT
64
_
C
(
1000000
);
int
i
;
b_bool
=
(
bool
)
va_arg
(
args
,
int
);
...
...
modules/demux/mkv.cpp
View file @
d1d3dc1d
...
...
@@ -4868,14 +4868,14 @@ void matroska_segment_c::ParseChapterAtom( int i_level, KaxChapterAtom *ca, chap
else
if
(
MKV_IS_ID
(
l
,
KaxChapterTimeStart
)
)
{
KaxChapterTimeStart
&
start
=*
(
KaxChapterTimeStart
*
)
l
;
chapters
.
i_start_time
=
uint64
(
start
)
/
I64C
(
1000
);
chapters
.
i_start_time
=
uint64
(
start
)
/
I
NT
64
_
C
(
1000
);
msg_Dbg
(
&
sys
.
demuxer
,
"| | | | + ChapterTimeStart: %lld"
,
chapters
.
i_start_time
);
}
else
if
(
MKV_IS_ID
(
l
,
KaxChapterTimeEnd
)
)
{
KaxChapterTimeEnd
&
end
=*
(
KaxChapterTimeEnd
*
)
l
;
chapters
.
i_end_time
=
uint64
(
end
)
/
I64C
(
1000
);
chapters
.
i_end_time
=
uint64
(
end
)
/
I
NT
64
_
C
(
1000
);
msg_Dbg
(
&
sys
.
demuxer
,
"| | | | + ChapterTimeEnd: %lld"
,
chapters
.
i_end_time
);
}
...
...
@@ -5080,7 +5080,7 @@ void matroska_segment_c::ParseChapters( KaxChapters *chapters )
if
(
stored_editions
.
size
()
!=
0
&&
stored_editions
[
i_default_edition
]
->
b_ordered
)
{
/* update the duration of the segment according to the sum of all sub chapters */
i_dur
=
stored_editions
[
i_default_edition
]
->
Duration
()
/
I64C
(
1000
);
i_dur
=
stored_editions
[
i_default_edition
]
->
Duration
()
/
I
NT
64
_
C
(
1000
);
if
(
i_dur
>
0
)
i_duration
=
i_dur
;
}
...
...
modules/demux/mp4/libmp4.c
View file @
d1d3dc1d
...
...
@@ -154,7 +154,7 @@ static void MP4_ConvertDate2Str( char *psz, uint64_t i_date )
int
i_sec
;
/* date begin at 1 jan 1904 */
i_date
+=
((
I64C
(
1904
)
*
365
)
+
17
)
*
24
*
60
*
60
;
i_date
+=
((
I
NT
64
_
C
(
1904
)
*
365
)
+
17
)
*
24
*
60
*
60
;
i_day
=
i_date
/
(
60
*
60
*
24
);
i_hour
=
(
i_date
/
(
60
*
60
)
)
%
60
;
...
...
modules/demux/mp4/mp4.c
View file @
d1d3dc1d
...
...
@@ -229,7 +229,7 @@ static inline int64_t MP4_TrackGetDTS( demux_t *p_demux, mp4_track_t *p_track )
if
(
i_dts
<
0
)
i_dts
=
0
;
}
return
I64C
(
1000000
)
*
i_dts
/
p_track
->
i_timescale
;
return
I
NT
64
_
C
(
1000000
)
*
i_dts
/
p_track
->
i_timescale
;
}
static
inline
int64_t
MP4_TrackGetPTSDelta
(
demux_t
*
p_demux
,
mp4_track_t
*
p_track
)
...
...
@@ -244,7 +244,7 @@ static inline int64_t MP4_TrackGetPTSDelta( demux_t *p_demux, mp4_track_t *p_tra
for
(
i_index
=
0
;;
i_index
++
)
{
if
(
i_sample
<
ck
->
p_sample_count_pts
[
i_index
]
)
return
ck
->
p_sample_offset_pts
[
i_index
]
*
I64C
(
1000000
)
/
return
ck
->
p_sample_offset_pts
[
i_index
]
*
I
NT
64
_
C
(
1000000
)
/
(
int64_t
)
p_track
->
i_timescale
;
i_sample
-=
ck
->
p_sample_count_pts
[
i_index
];
...
...
@@ -253,7 +253,7 @@ static inline int64_t MP4_TrackGetPTSDelta( demux_t *p_demux, mp4_track_t *p_tra
static
inline
int64_t
MP4_GetMoviePTS
(
demux_sys_t
*
p_sys
)
{
return
I64C
(
1000000
)
*
p_sys
->
i_time
/
p_sys
->
i_timescale
;
return
I
NT
64
_
C
(
1000000
)
*
p_sys
->
i_time
/
p_sys
->
i_timescale
;
}
/* Function to lookup the currently playing item */
...
...
@@ -1754,7 +1754,7 @@ static int TrackTimeToSampleChunk( demux_t *p_demux, mp4_track_t *p_track,
/* now calculate i_start for this elst */
/* offset */
i_start
-=
p_track
->
i_elst_time
*
I64C
(
1000000
)
/
p_sys
->
i_timescale
;
i_start
-=
p_track
->
i_elst_time
*
I
NT
64
_
C
(
1000000
)
/
p_sys
->
i_timescale
;
if
(
i_start
<
0
)
{
*
pi_chunk
=
0
;
...
...
@@ -2052,7 +2052,7 @@ static void MP4_TrackCreate( demux_t *p_demux, mp4_track_t *p_track,
elst
->
i_segment_duration
[
i
]
*
1000
/
p_sys
->
i_timescale
,
elst
->
i_media_time
[
i
]
>=
0
?
(
int64_t
)(
elst
->
i_media_time
[
i
]
*
1000
/
p_track
->
i_timescale
)
:
I64C
(
-
1
),
I
NT
64
_
C
(
-
1
),
elst
->
i_media_rate_integer
[
i
],
elst
->
i_media_rate_fraction
[
i
]
);
}
...
...
modules/demux/mpc.c
View file @
d1d3dc1d
...
...
@@ -226,7 +226,7 @@ static int Demux( demux_t *p_demux )
/* */
p_data
->
i_buffer
=
i_ret
*
sizeof
(
MPC_SAMPLE_FORMAT
)
*
p_sys
->
info
.
channels
;
p_data
->
i_dts
=
p_data
->
i_pts
=
1
+
I64C
(
1000000
)
*
p_sys
->
i_position
/
p_sys
->
info
.
sample_freq
;
1
+
I
NT
64
_
C
(
1000000
)
*
p_sys
->
i_position
/
p_sys
->
info
.
sample_freq
;
es_out_Control
(
p_demux
->
out
,
ES_OUT_SET_PCR
,
p_data
->
i_dts
);
...
...
@@ -257,7 +257,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case
DEMUX_GET_LENGTH
:
pi64
=
(
int64_t
*
)
va_arg
(
args
,
int64_t
*
);
*
pi64
=
I64C
(
1000000
)
*
p_sys
->
info
.
pcm_samples
/
*
pi64
=
I
NT
64
_
C
(
1000000
)
*
p_sys
->
info
.
pcm_samples
/
p_sys
->
info
.
sample_freq
;
return
VLC_SUCCESS
;
...
...
@@ -272,7 +272,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case
DEMUX_GET_TIME
:
pi64
=
(
int64_t
*
)
va_arg
(
args
,
int64_t
*
);
*
pi64
=
I64C
(
1000000
)
*
p_sys
->
i_position
/
*
pi64
=
I
NT
64
_
C
(
1000000
)
*
p_sys
->
i_position
/
p_sys
->
info
.
sample_freq
;
return
VLC_SUCCESS
;
...
...
modules/demux/mpeg/m4a.c
View file @
d1d3dc1d
...
...
@@ -164,9 +164,9 @@ static int Demux( demux_t *p_demux)
p_block_out
->
p_next
=
NULL
;
p_sys
->
i_pts
=
p_block_out
->
i_pts
;
if
(
p_sys
->
i_pts
>
M4A_PTS_START
+
I64C
(
500000
)
)
if
(
p_sys
->
i_pts
>
M4A_PTS_START
+
I
NT
64
_
C
(
500000
)
)
p_sys
->
i_bitrate_avg
=
8
*
I64C
(
1000000
)
*
p_sys
->
i_bytes
/
(
p_sys
->
i_pts
-
M4A_PTS_START
);
8
*
I
NT
64
_
C
(
1000000
)
*
p_sys
->
i_bytes
/
(
p_sys
->
i_pts
-
M4A_PTS_START
);
p_sys
->
i_bytes
+=
p_block_out
->
i_buffer
;
es_out_Send
(
p_demux
->
out
,
p_sys
->
p_es
,
p_block_out
);
...
...
@@ -207,7 +207,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
if
(
(
i_query
==
DEMUX_SET_POSITION
||
i_query
==
DEMUX_SET_TIME
)
&&
i_ret
==
VLC_SUCCESS
&&
p_sys
->
i_bitrate_avg
>
0
)
{
int64_t
i_time
=
I64C
(
8000000
)
*
stream_Tell
(
p_demux
->
s
)
/
int64_t
i_time
=
I
NT
64
_
C
(
8000000
)
*
stream_Tell
(
p_demux
->
s
)
/
p_sys
->
i_bitrate_avg
;
if
(
i_time
>=
0
)
...
...
modules/demux/mpeg/mpga.c
View file @
d1d3dc1d
...
...
@@ -244,7 +244,7 @@ static int Open( vlc_object_t * p_this )
if
(
p_sys
->
i_xing_bytes
&&
p_sys
->
i_xing_frames
&&
p_sys
->
i_xing_frame_samples
)
{
p_sys
->
i_bitrate_avg
=
p_sys
->
i_xing_bytes
*
I64C
(
8
)
*
p_sys
->
i_bitrate_avg
=
p_sys
->
i_xing_bytes
*
I
NT
64
_
C
(
8
)
*
p_sys
->
p_packetizer
->
fmt_out
.
audio
.
i_rate
/
p_sys
->
i_xing_frames
/
p_sys
->
i_xing_frame_samples
;
}
...
...
@@ -389,7 +389,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
if
(
!
i_ret
&&
p_sys
->
i_bitrate_avg
>
0
&&
(
i_query
==
DEMUX_SET_POSITION
||
i_query
==
DEMUX_SET_TIME
)
)
{
int64_t
i_time
=
I64C
(
8000000
)
*
stream_Tell
(
p_demux
->
s
)
/
int64_t
i_time
=
I
NT
64
_
C
(
8000000
)
*
stream_Tell
(
p_demux
->
s
)
/
p_sys
->
i_bitrate_avg
;
/* Fix time_offset */
...
...
modules/demux/ogg.c
View file @
d1d3dc1d
...
...
@@ -445,7 +445,7 @@ static void Ogg_UpdatePCR( logical_stream_t *p_stream,
{
if
(
p_stream
->
fmt
.
i_codec
!=
VLC_FOURCC
(
't'
,
'h'
,
'e'
,
'o'
)
)
{
p_stream
->
i_pcr
=
p_oggpacket
->
granulepos
*
I64C
(
1000000
)
p_stream
->
i_pcr
=
p_oggpacket
->
granulepos
*
I
NT
64
_
C
(
1000000
)
/
p_stream
->
f_rate
;
}
else
...
...
@@ -455,7 +455,7 @@ static void Ogg_UpdatePCR( logical_stream_t *p_stream,
ogg_int64_t
pframe
=
p_oggpacket
->
granulepos
-
(
iframe
<<
p_stream
->
i_theora_keyframe_granule_shift
);
p_stream
->
i_pcr
=
(
iframe
+
pframe
)
*
I64C
(
1000000
)
p_stream
->
i_pcr
=
(
iframe
+
pframe
)
*
I
NT
64
_
C
(
1000000
)
/
p_stream
->
f_rate
;
}
...
...
@@ -469,10 +469,10 @@ static void Ogg_UpdatePCR( logical_stream_t *p_stream,
* If we can't then don't touch the old value. */
if
(
p_stream
->
fmt
.
i_cat
==
VIDEO_ES
)
/* 1 frame per packet */
p_stream
->
i_interpolated_pcr
+=
(
I64C
(
1000000
)
/
p_stream
->
f_rate
);
p_stream
->
i_interpolated_pcr
+=
(
I
NT
64
_
C
(
1000000
)
/
p_stream
->
f_rate
);
else
if
(
p_stream
->
fmt
.
i_bitrate
)
p_stream
->
i_interpolated_pcr
+=
(
p_oggpacket
->
bytes
*
I64C
(
1000000
)
/
(
p_oggpacket
->
bytes
*
I
NT
64
_
C
(
1000000
)
/
p_stream
->
fmt
.
i_bitrate
/
8
);
}
}
...
...
modules/demux/playlist/m3u.c
View file @
d1d3dc1d
...
...
@@ -143,7 +143,7 @@ static int Demux( demux_t *p_demux )
psz_parse
+=
sizeof
(
"EXTINF:"
)
-
1
;
parseEXTINF
(
psz_parse
,
&
psz_artist
,
&
psz_name
,
&
i_parsed_duration
);
if
(
i_parsed_duration
>=
0
)
i_duration
=
i_parsed_duration
*
I64C
(
1000000
);
i_duration
=
i_parsed_duration
*
I
NT
64
_
C
(
1000000
);
if
(
psz_name
)
psz_name
=
strdup
(
psz_name
);
if
(
psz_artist
)
...
...
modules/demux/rawdv.c
View file @
d1d3dc1d
...
...
@@ -327,7 +327,7 @@ static int Demux( demux_t *p_demux )
if
(
!
p_sys
->
b_hurry_up
)
{
p_sys
->
i_pcr
+=
(
I64C
(
1000000
)
/
p_sys
->
f_rate
);
p_sys
->
i_pcr
+=
(
I
NT
64
_
C
(
1000000
)
/
p_sys
->
f_rate
);
}
return
1
;
...
...
modules/demux/rawvid.c
View file @
d1d3dc1d
...
...<