[MPlayer-dev-eng] Better 64bit format strings
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Wed Oct 12 14:54:46 CEST 2005
Hi,
the attached patch makes MPlayer use the (in inttypes.h defined) PRI?64
format strings instead of the less portable ll? ones.
Also simplifies the code by removing some #ifdef _LARGEFILE_SOURCE.
Tested (though not thoroughly) on linux 32bit, linux 64bit and MinGW. Please test!
Greetings,
Reimar Döffinger
-------------- next part --------------
Index: m_option.c
===================================================================
RCS file: /cvsroot/mplayer/main/m_option.c,v
retrieving revision 1.40
diff -u -r1.40 m_option.c
--- m_option.c 7 Sep 2005 00:19:04 -0000 1.40
+++ m_option.c 12 Oct 2005 12:38:03 -0000
@@ -289,7 +289,7 @@
if (param == NULL)
return M_OPT_MISSING_PARAM;
if (sscanf(param, sizeof(off_t) == sizeof(int) ?
- "%d%c" : "%lld%c", &tmp_off, &dummy) != 1) {
+ "%d%c" : "%"PRId64"%c", &tmp_off, &dummy) != 1) {
mp_msg(MSGT_CFGPARSER, MSGL_ERR, "The %s option must be an integer: %s\n",opt->name,param);
return M_OPT_INVALID;
}
@@ -297,20 +297,16 @@
if (opt->flags & M_OPT_MIN)
if (tmp_off < opt->min) {
mp_msg(MSGT_CFGPARSER, MSGL_ERR,
- (sizeof(off_t) == sizeof(int) ?
- "The %s option must be >= %d: %s\n" :
- "The %s option must be >= %lld: %s\n"),
- name, (off_t) opt->min, param);
+ "The %s option must be >= %"PRId64": %s\n",
+ name, (int64_t) opt->min, param);
return M_OPT_OUT_OF_RANGE;
}
if (opt->flags & M_OPT_MAX)
if (tmp_off > opt->max) {
mp_msg(MSGT_CFGPARSER, MSGL_ERR,
- (sizeof(off_t) == sizeof(int) ?
- "The %s option must be <= %d: %s\n" :
- "The %s option must be <= %lld: %s\n"),
- name, (off_t) opt->max, param);
+ "The %s option must be <= %"PRId64": %s\n",
+ name, (int64_t) opt->max, param);
return M_OPT_OUT_OF_RANGE;
}
@@ -320,7 +316,7 @@
}
static char* print_position(m_option_t* opt, void* val) {
- return dup_printf(sizeof(off_t) == sizeof(int) ? "%d" : "%lld",VAL(val));
+ return dup_printf("%"PRId64,(int64_t)VAL(val));
}
m_option_type_t m_option_type_position = {
Index: libmpdemux/aviprint.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/aviprint.c,v
retrieving revision 1.19
diff -u -r1.19 aviprint.c
--- libmpdemux/aviprint.c 28 Apr 2004 10:18:33 -0000 1.19
+++ libmpdemux/aviprint.c 12 Oct 2005 12:38:59 -0000
@@ -157,7 +157,7 @@
mp_msg (MSGT_HEADER, MSGL_V, " FCC (%.4s) dwSize (%d) wLongsPerEntry(%d)\n", h->fcc, h->dwSize, h->wLongsPerEntry);
mp_msg (MSGT_HEADER, MSGL_V, " bIndexSubType (%d) bIndexType (%d)\n", h->bIndexSubType, h->bIndexType);
mp_msg (MSGT_HEADER, MSGL_V, " nEntriesInUse (%d) dwChunkId (%.4s)\n", h->nEntriesInUse, h->dwChunkId);
- mp_msg (MSGT_HEADER, MSGL_V, " qwBaseOffset (0x%llX) dwReserved3 (%d)\n", h->qwBaseOffset, h->dwReserved3);
+ mp_msg (MSGT_HEADER, MSGL_V, " qwBaseOffset (0x%"PRIX64") dwReserved3 (%d)\n", h->qwBaseOffset, h->dwReserved3);
mp_msg (MSGT_HEADER, MSGL_V, "===========================\n");
}
void print_avisuperindex_chunk(avisuperindex_chunk *h){
Index: libmpdemux/cache2.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/cache2.c,v
retrieving revision 1.27
diff -u -r1.27 cache2.c
--- libmpdemux/cache2.c 31 Jul 2005 00:26:07 -0000 1.27
+++ libmpdemux/cache2.c 12 Oct 2005 12:39:01 -0000
@@ -362,11 +362,7 @@
// stream->buf_pos=stream->buf_len=0;
// return 1;
-#ifdef _LARGEFILE_SOURCE
- mp_msg(MSGT_CACHE,MSGL_V,"cache_stream_seek: WARNING! Can't seek to 0x%llX !\n",(long long)(pos+newpos));
-#else
- mp_msg(MSGT_CACHE,MSGL_V,"cache_stream_seek: WARNING! Can't seek to 0x%X !\n",(pos+newpos));
-#endif
+ mp_msg(MSGT_CACHE,MSGL_V,"cache_stream_seek: WARNING! Can't seek to 0x%"PRIX64" !\n",(int64_t)(pos+newpos));
return 0;
}
Index: libmpdemux/demux_aac.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_aac.c,v
retrieving revision 1.4
diff -u -r1.4 demux_aac.c
--- libmpdemux/demux_aac.c 5 Aug 2005 19:57:46 -0000 1.4
+++ libmpdemux/demux_aac.c 12 Oct 2005 12:39:02 -0000
@@ -121,7 +121,7 @@
if(cnt < 8)
goto fail;
- mp_msg(MSGT_DEMUX, MSGL_V, "demux_aac_probe, INIT: %llu, PROBED: %llu, cnt: %d\n", init, probed, cnt);
+ mp_msg(MSGT_DEMUX, MSGL_V, "demux_aac_probe, INIT: %"PRIu64", PROBED: %"PRIu64", cnt: %d\n", init, probed, cnt);
return DEMUXER_TYPE_AAC;
fail:
Index: libmpdemux/demux_mkv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_mkv.c,v
retrieving revision 1.48
diff -u -r1.48 demux_mkv.c
--- libmpdemux/demux_mkv.c 2 Sep 2005 08:32:32 -0000 1.48
+++ libmpdemux/demux_mkv.c 12 Oct 2005 12:39:16 -0000
@@ -636,7 +636,7 @@
if (num == EBML_UINT_INVALID)
return 1;
mkv_d->tc_scale = num;
- mp_msg (MSGT_DEMUX, MSGL_V, "[mkv] | + timecode scale: %llu\n",
+ mp_msg (MSGT_DEMUX, MSGL_V, "[mkv] | + timecode scale: %"PRIu64"\n",
mkv_d->tc_scale);
break;
}
@@ -1262,7 +1262,7 @@
mkv_d->indexes[mkv_d->num_indexes].timecode = time;
mkv_d->indexes[mkv_d->num_indexes].filepos =mkv_d->segment_start+pos;
mp_msg (MSGT_DEMUX, MSGL_DBG2, "[mkv] |+ found cue point "
- "for track %llu: timecode %llu, filepos: %llu\n",
+ "for track %"PRIu64": timecode %"PRIu64", filepos: %"PRIu64"\n",
track, time, mkv_d->segment_start + pos);
mkv_d->num_indexes++;
}
Index: libmpdemux/demux_ogg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_ogg.c,v
retrieving revision 1.79
diff -u -r1.79 demux_ogg.c
--- libmpdemux/demux_ogg.c 26 Sep 2005 20:13:10 -0000 1.79
+++ libmpdemux/demux_ogg.c 12 Oct 2005 12:39:23 -0000
@@ -665,7 +665,7 @@
if(index_mode == 2) mp_msg(MSGT_DEMUX,MSGL_INFO,"\n");
if(index_mode == 2) mp_msg(MSGT_DEMUX,MSGL_V,"Ogg syncpoints table builed: %d syncpoints\n",ogg_d->num_syncpoint);
- mp_msg(MSGT_DEMUX,MSGL_V,"Ogg stream length (granulepos): %lld\n",ogg_d->final_granulepos);
+ mp_msg(MSGT_DEMUX,MSGL_V,"Ogg stream length (granulepos): %"PRId64"\n",ogg_d->final_granulepos);
stream_reset(s);
stream_seek(s,demuxer->movi_start);
Index: libmpdemux/demux_ts.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_ts.c,v
retrieving revision 1.35
diff -u -r1.35 demux_ts.c
--- libmpdemux/demux_ts.c 23 Aug 2005 08:23:53 -0000 1.35
+++ libmpdemux/demux_ts.c 12 Oct 2005 12:39:33 -0000
@@ -322,7 +322,7 @@
}
}
- mp_msg(MSGT_DEMUX, MSGL_V, "TRIED UP TO POSITION %llu, FOUND %x, packet_size= %d, SEEMS A TS? %d\n", (uint64_t) pos, c, size, is_ts);
+ mp_msg(MSGT_DEMUX, MSGL_V, "TRIED UP TO POSITION %"PRIu64", FOUND %x, packet_size= %d, SEEMS A TS? %d\n", (uint64_t) pos, c, size, is_ts);
stream_seek(demuxer->stream, pos);
if(! is_ts)
@@ -547,7 +547,7 @@
has_tables = 0;
memset(pes_priv1, 0, sizeof(pes_priv1));
init_pos = stream_tell(demuxer->stream);
- mp_msg(MSGT_DEMUXER, MSGL_INFO, "PROBING UP TO %llu, PROG: %d\n", (uint64_t) param->probe, param->prog);
+ mp_msg(MSGT_DEMUXER, MSGL_INFO, "PROBING UP TO %"PRIu64", PROG: %d\n", (uint64_t) param->probe, param->prog);
while((pos <= init_pos + param->probe) && (! demuxer->stream->eof))
{
pos = stream_tell(demuxer->stream);
@@ -952,7 +952,7 @@
}
- mp_msg(MSGT_DEMUXER,MSGL_INFO, "Opened TS demuxer, audio: %x(pid %d), video: %x(pid %d)...POS=%llu\n", params.atype, demuxer->audio->id, params.vtype, demuxer->video->id, (uint64_t) start_pos);
+ mp_msg(MSGT_DEMUXER,MSGL_INFO, "Opened TS demuxer, audio: %x(pid %d), video: %x(pid %d)...POS=%"PRIu64"\n", params.atype, demuxer->audio->id, params.vtype, demuxer->video->id, (uint64_t) start_pos);
start_pos = (start_pos <= priv->ts.packet_size ? 0 : start_pos - priv->ts.packet_size);
@@ -1154,7 +1154,7 @@
}
pes_es->pts = (float) v / (float) sl->ts_resolution;
- mp_msg(MSGT_DEMUXER,MSGL_DBG2, "CTS: %d bits, value: %llu/%d = %.3f\n", sl->ts_len, v, sl->ts_resolution, pes_es->pts);
+ mp_msg(MSGT_DEMUXER,MSGL_DBG2, "CTS: %d bits, value: %"PRIu64"/%d = %.3f\n", sl->ts_len, v, sl->ts_resolution, pes_es->pts);
}
@@ -1755,7 +1755,7 @@
else //no support for fixed durations atm
sl->timescale = sl->au_duration = sl->cts_duration = 0;
- mp_msg(MSGT_DEMUX, MSGL_V, "MP4SLCONFIG(len=0x%x), predef: %d, flags: %x, use_ts: %d, tslen: %d, timescale: %d, dts: %llu, cts: %llu\n",
+ mp_msg(MSGT_DEMUX, MSGL_V, "MP4SLCONFIG(len=0x%x), predef: %d, flags: %x, use_ts: %d, tslen: %d, timescale: %d, dts: %"PRIu64", cts: %"PRIu64"\n",
len, buf[0], sl->flags, sl->use_ts, sl->ts_len, sl->timescale, (uint64_t) sl->dts, (uint64_t) sl->cts);
return len;
Index: libmpdemux/demux_ty.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_ty.c,v
retrieving revision 1.8
diff -u -r1.8 demux_ty.c
--- libmpdemux/demux_ty.c 2 Sep 2005 08:32:32 -0000 1.8
+++ libmpdemux/demux_ty.c 12 Oct 2005 12:39:38 -0000
@@ -240,13 +240,13 @@
mp_msg
(
MSGT_DEMUX, MSGL_DBG3,
- "tmf_filetoparts(): size %lld\n",
+ "tmf_filetoparts(): size %"PRId64"\n",
tivo->tmfparts[ parts ].fileSize
);
mp_msg
(
MSGT_DEMUX, MSGL_DBG3,
- "tmf_filetoparts(): startOffset %lld\n",
+ "tmf_filetoparts(): startOffset %"PRId64"\n",
tivo->tmfparts[ parts ].startOffset
);
parts++;
@@ -283,7 +283,7 @@
tivo->tmf_totalchunks += ( tivo->tmfparts[ index ].fileSize / CHUNKSIZE );
}
mp_msg( MSGT_DEMUX, MSGL_DBG3,
- "tmf_filetoparts():total size %lld\n", tivo->tmf_totalsize );
+ "tmf_filetoparts():total size %"PRId64"\n", tivo->tmf_totalsize );
mp_msg( MSGT_DEMUX, MSGL_DBG3,
"tmf_filetoparts():total chunks %d\n", tivo->tmf_totalchunks );
@@ -317,7 +317,7 @@
mp_msg
(
MSGT_DEMUX, MSGL_DBG3,
- "tmf_filetooffset() offset %llx\n", *offset
+ "tmf_filetooffset() offset %"PRIx64"\n", *offset
);
}
@@ -728,7 +728,7 @@
tivo->size = numberParts * TIVO_PART_LENGTH;
tivo->size += size;
mp_msg( MSGT_DEMUX, MSGL_DBG3,
- "ty:Header Calc Stream Size %lld\n", tivo->size );
+ "ty:Header Calc Stream Size %"PRId64"\n", tivo->size );
}
}
}
@@ -754,13 +754,13 @@
// Give a clue as to where we are in the stream
// ======================================================================
mp_msg( MSGT_DEMUX, MSGL_DBG3,
- "ty:ty header size %llx\n", tivo->size );
+ "ty:ty header size %"PRIx64"\n", tivo->size );
mp_msg( MSGT_DEMUX, MSGL_DBG3,
- "ty:ty which Chunk %llx\n", tivo->whichChunk );
+ "ty:ty which Chunk %"PRIx64"\n", tivo->whichChunk );
mp_msg( MSGT_DEMUX, MSGL_DBG3,
- "ty:file end_pos %llx\n", demux->stream->end_pos );
+ "ty:file end_pos %"PRIx64"\n", demux->stream->end_pos );
mp_msg( MSGT_DEMUX, MSGL_DBG3,
- "\nty:wanted current offset %llx\n", stream_tell( demux->stream ) );
+ "\nty:wanted current offset %"PRIx64"\n", stream_tell( demux->stream ) );
if ( tivo->size > 0 )
{
@@ -826,7 +826,7 @@
}
}
mp_msg( MSGT_DEMUX, MSGL_DBG3,
- "\nty:actual current offset %llx\n", ( stream_tell( demux->stream ) -
+ "\nty:actual current offset %"PRIx64"\n", ( stream_tell( demux->stream ) -
0x20000 ) );
Index: libmpdemux/demux_vqf.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_vqf.c,v
retrieving revision 1.3
diff -u -r1.3 demux_vqf.c
--- libmpdemux/demux_vqf.c 5 Aug 2005 19:57:47 -0000 1.3
+++ libmpdemux/demux_vqf.c 12 Oct 2005 12:39:39 -0000
@@ -143,7 +143,7 @@
{
demuxer->movi_start=stream_tell(s);
demuxer->movi_end=demuxer->movi_start+chunk_size-8;
- mp_msg(MSGT_DEMUX, MSGL_V, "Found data at %llX size %llu\n",demuxer->movi_start,demuxer->movi_end);
+ mp_msg(MSGT_DEMUX, MSGL_V, "Found data at %"PRIX64" size %"PRIu64"\n",demuxer->movi_start,demuxer->movi_end);
/* Done! play it */
break;
}
Index: libmpdemux/muxer_lavf.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/muxer_lavf.c,v
retrieving revision 1.10
diff -u -r1.10 muxer_lavf.c
--- libmpdemux/muxer_lavf.c 11 Aug 2005 20:54:09 -0000 1.10
+++ libmpdemux/muxer_lavf.c 12 Oct 2005 12:39:43 -0000
@@ -69,7 +69,7 @@
static offset_t mp_seek(URLContext *h, offset_t pos, int whence)
{
muxer_t *muxer = (muxer_t*)h->priv_data;
- fprintf(stderr, "SEEK %llu\n", pos);
+ fprintf(stderr, "SEEK %"PRIu64"\n", (int64_t)pos);
return fseeko(muxer->file, pos, whence);
}
Index: libmpdemux/muxer_mpeg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/muxer_mpeg.c,v
retrieving revision 1.20
diff -u -r1.20 muxer_mpeg.c
--- libmpdemux/muxer_mpeg.c 10 Aug 2005 01:42:06 -0000 1.20
+++ libmpdemux/muxer_mpeg.c 12 Oct 2005 12:39:54 -0000
@@ -863,7 +863,7 @@
{
spriv = (muxer_headers_t *) s->priv;
- mp_msg(MSGT_MUXER, MSGL_DBG2, "\nwrite_mpeg_pack(MUX=%d, len=%u, rate=%u, id=%X, pts: %llu, dts: %llu, scr: %llu, PACK_size:%u\n",
+ mp_msg(MSGT_MUXER, MSGL_DBG2, "\nwrite_mpeg_pack(MUX=%d, len=%u, rate=%u, id=%X, pts: %"PRIu64", dts: %"PRIu64", scr: %"PRIu64", PACK_size:%u\n",
priv->mux, len, muxer->sysrate, s->ckid, spriv->pts, spriv->dts, priv->scr, priv->packet_size);
//stflen is the count of stuffing bytes in the pes header itself,
@@ -1154,7 +1154,7 @@
next_pts = apriv->last_pts;
apriv->last_dts = apriv->pts;
apriv->pts = next_pts;
- mp_msg(MSGT_MUXER, MSGL_DBG2, "\nAUDIO: tot=%llu, sz=%u bytes, FRAMES: %llu * %u, REST: %u, DELTA_PTS: %u\n",
+ mp_msg(MSGT_MUXER, MSGL_DBG2, "\nAUDIO: tot=%"PRIu64", sz=%u bytes, FRAMES: %"PRIu64" * %u, REST: %u, DELTA_PTS: %u\n",
apriv->size, sz, num_frames, (uint32_t) apriv->frame_size, (uint32_t) rest, (uint32_t) ((num_frames * apriv->delta_pts) >> 10));
if(((priv->scr + (63000*1024)) < next_pts) && (priv->scr < apriv->pts) && (! force))
@@ -1239,11 +1239,11 @@
mp_msg(MSGT_MUXER, MSGL_ERR, "\nWARNING: SCR: << APTS, DELTA=%.3lf secs, COMPENSATE=%d, BR: %d\n",
(((double) tmp)/92160000.0), apriv->compensate, apriv->bitrate);
else if(apriv->pts < priv->scr)
- mp_msg(MSGT_MUXER, MSGL_ERR, "\nERROR: SCR: %llu, APTS: %llu, DELTA=-%.3lf secs, COMPENSATE=%d, BR: %d, lens: %d/%d, frames: %d\n",
+ mp_msg(MSGT_MUXER, MSGL_ERR, "\nERROR: SCR: %"PRIu64", APTS: %"PRIu64", DELTA=-%.3lf secs, COMPENSATE=%d, BR: %d, lens: %d/%d, frames: %d\n",
priv->scr, apriv->pts, (double) ((priv->scr - apriv->pts)/92160000.0), apriv->compensate, apriv->bitrate, tlen, len, n);
}
- mp_msg(MSGT_MUXER, MSGL_DBG2, "\nWRITTEN AUDIO: %u bytes, TIMER: %.3lf, FRAMES: %llu * %u, DELTA_PTS: %.3lf\n",
+ mp_msg(MSGT_MUXER, MSGL_DBG2, "\nWRITTEN AUDIO: %u bytes, TIMER: %.3lf, FRAMES: %"PRIu64" * %u, DELTA_PTS: %.3lf\n",
len, (double) (apriv->pts/92160000), num_frames, (uint32_t) apriv->frame_size, delta_pts);
return len;
@@ -1263,7 +1263,7 @@
else
size1 = (div) * apriv->frame_size;
- mp_msg(MSGT_MUXER, MSGL_V, "SIZE1: %llu, LEN: %llu\n", size1, (uint64_t)as->b_buffer_len);
+ mp_msg(MSGT_MUXER, MSGL_V, "SIZE1: %"PRIu64", LEN: %"PRIu64"\n", size1, (uint64_t)as->b_buffer_len);
size1 = min(size1, as->b_buffer_len);
memmove(as->b_buffer, &(as->b_buffer[size]), as->b_buffer_len - size1);
as->b_buffer_len -= size1;
@@ -1272,7 +1272,7 @@
rest_pts = (double) rest / (double) apriv->bitrate;
apriv->pts += (int64_t) (92160000.0 * rest_pts);
apriv->last_pts += (int64_t) (92160000.0 * rest_pts);
- mp_msg(MSGT_MUXER, MSGL_DBG2, "DROPPED: %lld bytes, REST= %lld, REST_PTS: %.3lf, AUDIO_PTS%.3lf\n", size1, rest, rest_pts, (double) (apriv->pts/92160000.0));
+ mp_msg(MSGT_MUXER, MSGL_DBG2, "DROPPED: %"PRId64" bytes, REST= %"PRId64", REST_PTS: %.3lf, AUDIO_PTS%.3lf\n", size1, rest, rest_pts, (double) (apriv->pts/92160000.0));
}
@@ -1283,20 +1283,20 @@
uint64_t init_pts, last_pts; //initial value
init_pts = apriv->pts;
- mp_msg(MSGT_MUXER, MSGL_DBG2, "DUR: %llu, DIFF: %llu\n", dur, apriv->pts - init_pts);
+ mp_msg(MSGT_MUXER, MSGL_DBG2, "DUR: %"PRIu64", DIFF: %"PRIu64"\n", dur, apriv->pts - init_pts);
while(dur > apriv->pts - init_pts)
{
priv->scr = (92160000 * apriv->size) / apriv->bitrate;
last_pts = apriv->pts;
dump_audio(muxer, as, as->b_buffer_len, 0);
- mp_msg(MSGT_MUXER, MSGL_DBG2, "DUR: %llu, DIFF: %llu, SCR: %llu\n", dur, apriv->pts - init_pts, priv->scr);
+ mp_msg(MSGT_MUXER, MSGL_DBG2, "DUR: %"PRIu64", DIFF: %"PRIu64", SCR: %"PRIu64"\n", dur, apriv->pts - init_pts, priv->scr);
}
//priv->init_delay_pts = last_pts;
priv->init_delay_pts = (90 * 1024 * abs(conf_init_adelay)) + apriv->init_pts - (90 * 1024 * abs(conf_init_vpts));
if(priv->init_delay_pts <= priv->scr)
priv->init_delay_pts = last_pts;
- mp_msg(MSGT_MUXER, MSGL_INFO, "INIT_VPTS: %llu (%.3lf)\n", priv->init_delay_pts, (double) (priv->init_delay_pts/92160000.0));
+ mp_msg(MSGT_MUXER, MSGL_INFO, "INIT_VPTS: %"PRIu64" (%.3lf)\n", priv->init_delay_pts, (double) (priv->init_delay_pts/92160000.0));
}
@@ -1310,7 +1310,7 @@
delta_scr = (uint64_t) (mult * perc);
priv->scr += delta_scr;
- mp_msg(MSGT_MUXER, MSGL_DBG2, "UPDATE SCR TO %llu (%.3lf): mult is %.3lf, perc: %.3lf, %u/%u, delta: %llu\n",
+ mp_msg(MSGT_MUXER, MSGL_DBG2, "UPDATE SCR TO %"PRIu64" (%.3lf): mult is %.3lf, perc: %.3lf, %u/%u, delta: %"PRIu64"\n",
priv->scr, (double) (priv->scr/92160000.0), mult, perc, len, totlen, delta_scr);
}
@@ -2088,7 +2088,7 @@
mn = mx = vpriv->framebuf[0].pts;
for(i = 0; i < 3; i++)
{
- mp_msg(MSGT_DECVIDEO,MSGL_DBG2, "PTS: %llu\n", vpriv->framebuf[i].pts);
+ mp_msg(MSGT_DECVIDEO,MSGL_DBG2, "PTS: %"PRIu64"\n", vpriv->framebuf[i].pts);
if(vpriv->framebuf[i].pts < mn)
mn = vpriv->framebuf[i].pts;
if(vpriv->framebuf[i].pts > mx)
@@ -2100,7 +2100,7 @@
if((vpriv->framebuf[i].pts > mn) && (vpriv->framebuf[i].pts < mx))
md = vpriv->framebuf[i].pts;
}
- mp_msg(MSGT_DECVIDEO,MSGL_DBG2, "MIN: %llu, mid: %llu, max: %llu\n", mn, md, mx);
+ mp_msg(MSGT_DECVIDEO,MSGL_DBG2, "MIN: %"PRIu64", mid: %"PRIu64", max: %"PRIu64"\n", mn, md, mx);
if(mx - md > md - mn)
diff = md - mn;
@@ -2166,7 +2166,7 @@
delta_pts = (92160000 * (int64_t) delta) / vpriv->picture.timeinc_resolution;
pt = vpriv->picture.picture_type + 1;
- mp_msg(MSGT_MUXER, MSGL_DBG2, "\nTYPE: %c, RESOLUTION: %d, TEMP: %d, delta: %d, delta_pts: %lld = %.3lf, delta2: %.3lf\n",
+ mp_msg(MSGT_MUXER, MSGL_DBG2, "\nTYPE: %c, RESOLUTION: %d, TEMP: %d, delta: %d, delta_pts: %"PRId64" = %.3lf, delta2: %.3lf\n",
FTYPE(pt), vpriv->picture.timeinc_resolution, vpriv->picture.timeinc_unit, delta, delta_pts, (double) (delta_pts/92160000.0),
(double) delta / (double) vpriv->picture.timeinc_resolution);
@@ -2199,7 +2199,7 @@
vpriv->last_pts += vpriv->frame_duration;
vpriv->last_dts = vpriv->framebuf[vpriv->framebuf_used-1].dts;
vpriv->delta_clock = ((double) vpriv->frame_duration)/92160000.0;
- mp_msg(MSGT_MUXER, MSGL_INFO, "FRAME DURATION: %llu %.3lf\n",
+ mp_msg(MSGT_MUXER, MSGL_INFO, "FRAME DURATION: %"PRIu64" %.3lf\n",
vpriv->frame_duration, (double) (vpriv->frame_duration/92160000.0));
}
}
@@ -2508,12 +2508,12 @@
{
if(priv->drop)
{
- mp_msg(MSGT_MUXER, MSGL_V, "\nDROPPING %llu AUDIO BYTES, DELAY: %.3lf, BR: %u\n", delay_len, priv->init_adelay, spriv->bitrate);
+ mp_msg(MSGT_MUXER, MSGL_V, "\nDROPPING %"PRIu64" AUDIO BYTES, DELAY: %.3lf, BR: %u\n", delay_len, priv->init_adelay, spriv->bitrate);
drop_delayed_audio(muxer, s, (int64_t) delay_len);
}
else
{
- mp_msg(MSGT_MUXER, MSGL_V, "\nWRITING %llu EARLY AUDIO BYTES, DELAY: %.3lf, BR: %u\n", delay_len, priv->init_adelay, spriv->bitrate);
+ mp_msg(MSGT_MUXER, MSGL_V, "\nWRITING %"PRIu64" EARLY AUDIO BYTES, DELAY: %.3lf, BR: %u\n", delay_len, priv->init_adelay, spriv->bitrate);
save_delayed_audio(muxer, s, (uint64_t) (92160000 * (-priv->init_adelay)));
}
priv->init_adelay = 0.0;
@@ -2569,7 +2569,7 @@
if(priv->is_genmpeg1 || priv->is_genmpeg2)
write_mpeg_pack(muxer, NULL, muxer->file, NULL, 0, 1); //insert fake Nav Packet
- mp_msg(MSGT_MUXER, MSGL_INFO, "\nOverhead: %.3lf%% (%llu / %llu)\n", 100.0 * (double)priv->headers_size / (double)priv->data_size, priv->headers_size, priv->data_size);
+ mp_msg(MSGT_MUXER, MSGL_INFO, "\nOverhead: %.3lf%% (%"PRIu64" / %"PRIu64")\n", 100.0 * (double)priv->headers_size / (double)priv->data_size, priv->headers_size, priv->data_size);
}
static void mpegfile_write_header(muxer_t *muxer)
Index: libmpdemux/network.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/network.c,v
retrieving revision 1.117
diff -u -r1.117 network.c
--- libmpdemux/network.c 6 Sep 2005 21:14:55 -0000 1.117
+++ libmpdemux/network.c 12 Oct 2005 12:39:57 -0000
@@ -408,11 +408,7 @@
if(pos>0) {
// Extend http_send_request with possibility to do partial content retrieval
-#ifdef __MINGW32__
- snprintf(str, 256, "Range: bytes=%I64d-", (int64_t)pos);
-#else
- snprintf(str, 256, "Range: bytes=%lld-", (long long)pos);
-#endif
+ snprintf(str, 256, "Range: bytes=%"PRId64"-", (int64_t)pos);
http_set_field(http_hdr, str);
}
Index: libmpdemux/stream.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/stream.c,v
retrieving revision 1.79
diff -u -r1.79 stream.c
--- libmpdemux/stream.c 23 Sep 2005 22:35:04 -0000 1.79
+++ libmpdemux/stream.c 12 Oct 2005 12:39:59 -0000
@@ -268,13 +268,8 @@
}
if(verbose>=3){
-#ifdef _LARGEFILE_SOURCE
- printf("s->pos=%llX newpos=%llX new_bufpos=%llX buflen=%X \n",
- (long long)s->pos,(long long)newpos,(long long)pos,s->buf_len);
-#else
- printf("s->pos=%X newpos=%X new_bufpos=%X buflen=%X \n",
- (unsigned int)s->pos,newpos,pos,s->buf_len);
-#endif
+ printf("s->pos=%"PRIX64" newpos=%"PRIX64" new_bufpos=%"PRIX64" buflen=%X \n",
+ (int64_t)s->pos,(int64_t)newpos,(int64_t)pos,s->buf_len);
}
pos-=newpos;
@@ -333,11 +328,7 @@
// if(pos==s->buf_len) printf("XXX Seek to last byte of file -> EOF\n");
-#ifdef _LARGEFILE_SOURCE
- mp_msg(MSGT_STREAM,MSGL_V,"stream_seek: WARNING! Can't seek to 0x%llX !\n",(long long)(pos+newpos));
-#else
- mp_msg(MSGT_STREAM,MSGL_V,"stream_seek: WARNING! Can't seek to 0x%X !\n",(pos+newpos));
-#endif
+ mp_msg(MSGT_STREAM,MSGL_V,"stream_seek: WARNING! Can't seek to 0x%"PRIX64" !\n",(int64_t)(pos+newpos));
return 0;
}
Index: libmpdemux/stream_file.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/stream_file.c,v
retrieving revision 1.8
diff -u -r1.8 stream_file.c
--- libmpdemux/stream_file.c 14 May 2005 12:50:59 -0000 1.8
+++ libmpdemux/stream_file.c 12 Oct 2005 12:40:05 -0000
@@ -139,11 +139,7 @@
stream->type = STREAMTYPE_FILE;
}
-#ifdef _LARGEFILE_SOURCE
- mp_msg(MSGT_OPEN,MSGL_V,"[file] File size is %lld bytes\n", (long long)len);
-#else
- mp_msg(MSGT_OPEN,MSGL_V,"[file] File size is %u bytes\n", (unsigned int)len);
-#endif
+ mp_msg(MSGT_OPEN,MSGL_V,"[file] File size is %"PRId64" bytes\n", (int64_t)len);
stream->fd = f;
stream->fill_buffer = fill_buffer;
Index: libmpdemux/stream_ftp.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/stream_ftp.c,v
retrieving revision 1.5
diff -u -r1.5 stream_ftp.c
--- libmpdemux/stream_ftp.c 10 Oct 2005 12:56:17 -0000 1.5
+++ libmpdemux/stream_ftp.c 12 Oct 2005 12:40:07 -0000
@@ -307,11 +307,7 @@
if(!s->fd) return 0;
if(newpos > 0) {
-#ifdef _LARGEFILE_SOURCE
- snprintf(str,255,"REST %lld\r\n",newpos);
-#else
- snprintf(str,255,"REST %u\r\n",newpos);
-#endif
+ snprintf(str,255,"REST %"PRId64"\r\n", (int64_t)newpos);
resp = FtpSendCmd(str,p,rsp_txt);
if(resp != 3) {
More information about the MPlayer-dev-eng
mailing list