[xiph-commits] r3811 - in liboggz/trunk/src: examples liboggz tests tools
conrad at svn.annodex.net
conrad at svn.annodex.net
Thu Dec 4 13:23:01 PST 2008
Author: conrad
Date: 2008-12-04 13:23:01 -0800 (Thu, 04 Dec 2008)
New Revision: 3811
Modified:
liboggz/trunk/src/examples/dump-comments.c
liboggz/trunk/src/examples/read-file.c
liboggz/trunk/src/examples/read-io.c
liboggz/trunk/src/liboggz/metric_internal.c
liboggz/trunk/src/liboggz/oggz_auto.c
liboggz/trunk/src/liboggz/oggz_write.c
liboggz/trunk/src/tests/io-count.c
liboggz/trunk/src/tests/io-read-single.c
liboggz/trunk/src/tests/io-read.c
liboggz/trunk/src/tests/io-run.c
liboggz/trunk/src/tests/io-seek.c
liboggz/trunk/src/tests/io-write-flush.c
liboggz/trunk/src/tests/io-write.c
liboggz/trunk/src/tests/read-generated.c
liboggz/trunk/src/tests/read-stop-err.c
liboggz/trunk/src/tests/read-stop-ok.c
liboggz/trunk/src/tools/oggz-basetime.c
liboggz/trunk/src/tools/oggz-comment.c
liboggz/trunk/src/tools/oggz-dump.c
liboggz/trunk/src/tools/oggz-info.c
liboggz/trunk/src/tools/oggz-merge.c
liboggz/trunk/src/tools/oggz-sort.c
liboggz/trunk/src/tools/oggz-validate.c
Log:
print serialno as unsigned throughout
Modified: liboggz/trunk/src/examples/dump-comments.c
===================================================================
--- liboggz/trunk/src/examples/dump-comments.c 2008-12-04 21:22:47 UTC (rev 3810)
+++ liboggz/trunk/src/examples/dump-comments.c 2008-12-04 21:23:01 UTC (rev 3811)
@@ -50,7 +50,7 @@
content_type = oggz_stream_get_content_type (oggz, serialno);
- printf ("%s: serial %010ld\n\n", content_type, serialno);
+ printf ("%s: serial %010lu\n\n", content_type, serialno);
vendor = oggz_comment_get_vendor (oggz, serialno);
if (vendor) printf (" Vendor: %s\r\n", vendor);
Modified: liboggz/trunk/src/examples/read-file.c
===================================================================
--- liboggz/trunk/src/examples/read-file.c 2008-12-04 21:22:47 UTC (rev 3810)
+++ liboggz/trunk/src/examples/read-file.c 2008-12-04 21:23:01 UTC (rev 3811)
@@ -66,7 +66,7 @@
granuleshift = oggz_get_granuleshift (oggz, serialno);
- printf ("%010ld: op->granulepos: ", serialno);
+ printf ("%010lu: op->granulepos: ", serialno);
print_granulepos (op->granulepos, granuleshift);
printf (" oggz_tell_granulepos(): ");
print_granulepos (oggz_tell_granulepos (oggz), granuleshift);
Modified: liboggz/trunk/src/examples/read-io.c
===================================================================
--- liboggz/trunk/src/examples/read-io.c 2008-12-04 21:22:47 UTC (rev 3810)
+++ liboggz/trunk/src/examples/read-io.c 2008-12-04 21:23:01 UTC (rev 3811)
@@ -49,18 +49,18 @@
{
#if 0
if (got_an_eos) {
- printf ("[%010ld]\t%ld bytes\tgranulepos %ld\n", serialno, op->bytes,
+ printf ("[%010lu]\t%ld bytes\tgranulepos %ld\n", serialno, op->bytes,
(long)op->granulepos);
}
#endif
if (op->b_o_s) {
- printf ("%010ld: [%" PRId64 "] BOS %8s\n", serialno, op->granulepos, op->packet);
+ printf ("%010lu: [%" PRId64 "] BOS %8s\n", serialno, op->granulepos, op->packet);
}
if (op->e_o_s) {
got_an_eos = 1;
- printf ("%010ld: [%" PRId64 "] EOS\n", serialno, op->granulepos);
+ printf ("%010lu: [%" PRId64 "] EOS\n", serialno, op->granulepos);
}
return 0;
Modified: liboggz/trunk/src/liboggz/metric_internal.c
===================================================================
--- liboggz/trunk/src/liboggz/metric_internal.c 2008-12-04 21:22:47 UTC (rev 3810)
+++ liboggz/trunk/src/liboggz/metric_internal.c 2008-12-04 21:23:01 UTC (rev 3811)
@@ -58,7 +58,7 @@
units = dt * stream->granulerate_d / stream->granulerate_n;
#ifdef DEBUG
- printf ("oggz_..._granuleshift: serialno %010ld Got frame or field %lld (%lld + %lld): %lld units\n",
+ printf ("oggz_..._granuleshift: serialno %010lu Got frame or field %lld (%lld + %lld): %lld units\n",
serialno, dt, iframe, pframe, units);
#endif
@@ -83,7 +83,7 @@
units = granulepos * stream->granulerate_d / stream->granulerate_n;
#ifdef DEBUG
- printf ("oggz_..._granuleshift: serialno %010ld Got frame %lld (%lld + %lld): %lld units\n",
+ printf ("oggz_..._granuleshift: serialno %010lu Got frame %lld (%lld + %lld): %lld units\n",
serialno, granulepos, iframe, pframe, units);
#endif
Modified: liboggz/trunk/src/liboggz/oggz_auto.c
===================================================================
--- liboggz/trunk/src/liboggz/oggz_auto.c 2008-12-04 21:22:47 UTC (rev 3810)
+++ liboggz/trunk/src/liboggz/oggz_auto.c 2008-12-04 21:23:01 UTC (rev 3811)
@@ -407,7 +407,7 @@
granuleshift = (int)header[48];
#ifdef DEBUG
- printf ("Got fisbone granulerate %lld/%lld, granuleshift %d for serialno %010ld\n",
+ printf ("Got fisbone granulerate %lld/%lld, granuleshift %d for serialno %010lu\n",
granule_rate_numerator, granule_rate_denominator, granuleshift,
fisbone_serialno);
#endif
Modified: liboggz/trunk/src/liboggz/oggz_write.c
===================================================================
--- liboggz/trunk/src/liboggz/oggz_write.c 2008-12-04 21:22:47 UTC (rev 3810)
+++ liboggz/trunk/src/liboggz/oggz_write.c 2008-12-04 21:23:01 UTC (rev 3811)
@@ -227,13 +227,13 @@
* ie. that it fits within 32 bits and does not equal the special value -1 */
if ((long)((ogg_int32_t)serialno) != serialno || serialno == -1) {
#ifdef DEBUG
- printf ("oggz_write_feed: serialno %010ld\n", serialno);
+ printf ("oggz_write_feed: serialno %010lu\n", serialno);
#endif
return OGGZ_ERR_BAD_SERIALNO;
}
#ifdef DEBUG
- printf ("oggz_write_feed: (%010ld) FLUSH: %d\n", serialno, flush);
+ printf ("oggz_write_feed: (%010lu) FLUSH: %d\n", serialno, flush);
#endif
/* Cache strict, prefix, suffix */
Modified: liboggz/trunk/src/tests/io-count.c
===================================================================
--- liboggz/trunk/src/tests/io-count.c 2008-12-04 21:22:47 UTC (rev 3810)
+++ liboggz/trunk/src/tests/io-count.c 2008-12-04 21:23:01 UTC (rev 3811)
@@ -104,7 +104,7 @@
if (iter > MAX_ITER) return 1;
#ifdef DEBUG
- printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, "
+ printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010lu, "
"granulepos %" PRId64 ", packetno %" PRId64,
oggz_tell (oggz), serialno, op->granulepos, op->packetno);
Modified: liboggz/trunk/src/tests/io-read-single.c
===================================================================
--- liboggz/trunk/src/tests/io-read-single.c 2008-12-04 21:22:47 UTC (rev 3810)
+++ liboggz/trunk/src/tests/io-read-single.c 2008-12-04 21:23:01 UTC (rev 3811)
@@ -86,7 +86,7 @@
static long e_o_s = 0;
#ifdef DEBUG
- printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, "
+ printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010lu, "
"granulepos %" PRId64 ", packetno %" PRId64,
oggz_tell (oggz), serialno, op->granulepos, op->packetno);
Modified: liboggz/trunk/src/tests/io-read.c
===================================================================
--- liboggz/trunk/src/tests/io-read.c 2008-12-04 21:22:47 UTC (rev 3810)
+++ liboggz/trunk/src/tests/io-read.c 2008-12-04 21:23:01 UTC (rev 3811)
@@ -84,7 +84,7 @@
static long e_o_s = 0;
#ifdef DEBUG
- printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, "
+ printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010lu, "
"granulepos %" PRId64 ", packetno %" PRId64,
oggz_tell (oggz), serialno, op->granulepos, op->packetno);
Modified: liboggz/trunk/src/tests/io-run.c
===================================================================
--- liboggz/trunk/src/tests/io-run.c 2008-12-04 21:22:47 UTC (rev 3810)
+++ liboggz/trunk/src/tests/io-run.c 2008-12-04 21:23:01 UTC (rev 3811)
@@ -113,7 +113,7 @@
static long e_o_s = 0;
#ifdef DEBUG
- printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, "
+ printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010lu, "
"granulepos %" PRId64 ", packetno %" PRId64,
oggz_tell (oggz), serialno, op->granulepos, op->packetno);
Modified: liboggz/trunk/src/tests/io-seek.c
===================================================================
--- liboggz/trunk/src/tests/io-seek.c 2008-12-04 21:22:47 UTC (rev 3810)
+++ liboggz/trunk/src/tests/io-seek.c 2008-12-04 21:23:01 UTC (rev 3811)
@@ -88,7 +88,7 @@
static long e_o_s = 0;
#ifdef DEBUG
- printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, "
+ printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010lu, "
"granulepos %" PRId64 ", packetno %" PRId64,
oggz_tell (oggz), serialno, op->granulepos, op->packetno);
Modified: liboggz/trunk/src/tests/io-write-flush.c
===================================================================
--- liboggz/trunk/src/tests/io-write-flush.c 2008-12-04 21:22:47 UTC (rev 3810)
+++ liboggz/trunk/src/tests/io-write-flush.c 2008-12-04 21:23:01 UTC (rev 3811)
@@ -102,7 +102,7 @@
newpage = 0;
#ifdef DEBUG
- printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, "
+ printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010lu, "
"granulepos %" PRId64 ", packetno %" PRId64,
oggz_tell (oggz), serialno, op->granulepos, op->packetno);
Modified: liboggz/trunk/src/tests/io-write.c
===================================================================
--- liboggz/trunk/src/tests/io-write.c 2008-12-04 21:22:47 UTC (rev 3810)
+++ liboggz/trunk/src/tests/io-write.c 2008-12-04 21:23:01 UTC (rev 3811)
@@ -84,7 +84,7 @@
static long e_o_s = 0;
#ifdef DEBUG
- printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, "
+ printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010lu, "
"granulepos %" PRId64 ", packetno %" PRId64,
oggz_tell (oggz), serialno, op->granulepos, op->packetno);
Modified: liboggz/trunk/src/tests/read-generated.c
===================================================================
--- liboggz/trunk/src/tests/read-generated.c 2008-12-04 21:22:47 UTC (rev 3810)
+++ liboggz/trunk/src/tests/read-generated.c 2008-12-04 21:23:01 UTC (rev 3811)
@@ -77,7 +77,7 @@
static long e_o_s = 0;
#ifdef DEBUG
- printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, "
+ printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010lu, "
"granulepos %" PRId64 ", packetno %" PRId64,
oggz_tell (oggz), serialno, op->granulepos, op->packetno);
Modified: liboggz/trunk/src/tests/read-stop-err.c
===================================================================
--- liboggz/trunk/src/tests/read-stop-err.c 2008-12-04 21:22:47 UTC (rev 3810)
+++ liboggz/trunk/src/tests/read-stop-err.c 2008-12-04 21:23:01 UTC (rev 3811)
@@ -86,7 +86,7 @@
static long e_o_s = 0;
#ifdef DEBUG
- printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, "
+ printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010lu, "
"granulepos %" PRId64 ", packetno %" PRId64,
oggz_tell (oggz), serialno, op->granulepos, op->packetno);
Modified: liboggz/trunk/src/tests/read-stop-ok.c
===================================================================
--- liboggz/trunk/src/tests/read-stop-ok.c 2008-12-04 21:22:47 UTC (rev 3810)
+++ liboggz/trunk/src/tests/read-stop-ok.c 2008-12-04 21:23:01 UTC (rev 3811)
@@ -84,7 +84,7 @@
static long e_o_s = 0;
#ifdef DEBUG
- printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, "
+ printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010lu, "
"granulepos %" PRId64 ", packetno %" PRId64,
oggz_tell (oggz), serialno, op->granulepos, op->packetno);
Modified: liboggz/trunk/src/tools/oggz-basetime.c
===================================================================
--- liboggz/trunk/src/tools/oggz-basetime.c 2008-12-04 21:22:47 UTC (rev 3810)
+++ liboggz/trunk/src/tools/oggz-basetime.c 2008-12-04 21:23:01 UTC (rev 3811)
@@ -207,7 +207,7 @@
oggz_get_granulerate (oggz, serialno, &gr_n, &gr_d);
ort->delta = (ord->base_units * gr_n) / (gr_d);
#ifdef DEBUG
- fprintf (stderr, "%010ld: DELTA %lld (gr: %lld/%lld)\n",
+ fprintf (stderr, "%010lu: DELTA %lld (gr: %lld/%lld)\n",
serialno, ort->delta, gr_n, gr_d);
#endif
}
@@ -220,7 +220,7 @@
ort->nr_packets += ogg_page_packets ((ogg_page *)og);
#ifdef DEBUG
- fprintf (stderr, "%010ld: %d packets, gp %lld\n",
+ fprintf (stderr, "%010lu: %d packets, gp %lld\n",
serialno, ort->nr_packets, ogg_page_granulepos ((ogg_page *)og));
#endif
Modified: liboggz/trunk/src/tools/oggz-comment.c
===================================================================
--- liboggz/trunk/src/tools/oggz-comment.c 2008-12-04 21:22:47 UTC (rev 3810)
+++ liboggz/trunk/src/tools/oggz-comment.c 2008-12-04 21:23:01 UTC (rev 3811)
@@ -189,7 +189,7 @@
* http://lists.xiph.org/pipermail/ogg-dev/2008-November/001277.html
*/
if (ocdata->do_all) {
- fprintf (stderr, "oggz-comment: Warning: Ignoring Dirac track, serialno %010ld\n",
+ fprintf (stderr, "oggz-comment: Warning: Ignoring Dirac track, serialno %010lu\n",
serialno);
} else {
fail_dirac (ocdata);
@@ -354,9 +354,9 @@
if (filter_stream_p (ocdata, serialno) && op->packetno == 1) {
codec_name = oggz_stream_get_content_type(oggz, serialno);
if (codec_name) {
- printf ("%s: serialno %010ld\n", codec_name, serialno);
+ printf ("%s: serialno %010lu\n", codec_name, serialno);
} else {
- printf ("???: serialno %010ld\n", serialno);
+ printf ("???: serialno %010lu\n", serialno);
}
printf("\tVendor: %s\n", oggz_comment_get_vendor(oggz, serialno));
Modified: liboggz/trunk/src/tools/oggz-dump.c
===================================================================
--- liboggz/trunk/src/tools/oggz-dump.c 2008-12-04 21:22:47 UTC (rev 3810)
+++ liboggz/trunk/src/tools/oggz-dump.c 2008-12-04 21:23:01 UTC (rev 3811)
@@ -253,7 +253,7 @@
}
}
- fprintf (outfile, ": serialno %010ld, ",
+ fprintf (outfile, ": serialno %010lu, ",
oddata->hide_serialno ? -1 : serialno);
if (oddata->hide_granulepos) {
@@ -340,7 +340,7 @@
int ret;
#ifdef DEBUG
- printf ("feeding packet (%010ld) %ld bytes %s, %s\n",
+ printf ("feeding packet (%010lu) %ld bytes %s, %s\n",
current_serialno, op->bytes,
op->b_o_s ? "bos" : "not bos",
op->e_o_s ? "eos" : "not eos");
Modified: liboggz/trunk/src/tools/oggz-info.c
===================================================================
--- liboggz/trunk/src/tools/oggz-info.c 2008-12-04 21:22:47 UTC (rev 3810)
+++ liboggz/trunk/src/tools/oggz-info.c 2008-12-04 21:23:01 UTC (rev 3811)
@@ -259,7 +259,7 @@
if (oit->has_fisbone) {
printf("\n\tExtra information from Ogg Skeleton track:\n");
- /*printf("\tserialno: %010d\n", oit->fbInfo.serial_no);*/
+ /*printf("\tserialno: %010u\n", oit->fbInfo.serial_no);*/
printf("\tNumber of header packets: %d\n", oit->fbInfo.nr_header_packet);
printf("\tGranule rate: %.2f\n", (double)oit->fbInfo.granule_rate_n/oit->fbInfo.granule_rate_d);
printf("\tGranule shift: %d\n", (int)oit->fbInfo.granule_shift);
@@ -288,9 +288,9 @@
oit_print (OI_Info * info, OI_TrackInfo * oit, long serialno)
{
if (oit->codec_name) {
- printf ("\n%s: serialno %010ld\n", oit->codec_name, serialno);
+ printf ("\n%s: serialno %010lu\n", oit->codec_name, serialno);
} else {
- printf ("\n???: serialno %010ld\n", serialno);
+ printf ("\n???: serialno %010lu\n", serialno);
}
printf ("\t%ld packets in %ld pages, %.1f packets/page, %.3f%% Ogg overhead\n",
oit->packets.count, oit->pages.count,
Modified: liboggz/trunk/src/tools/oggz-merge.c
===================================================================
--- liboggz/trunk/src/tools/oggz-merge.c 2008-12-04 21:22:47 UTC (rev 3810)
+++ liboggz/trunk/src/tools/oggz-merge.c 2008-12-04 21:23:01 UTC (rev 3811)
@@ -275,7 +275,7 @@
if (omdata->verbose) {
ot_fprint_time (stdout, (double)units/1000);
- printf (": Got index %d serialno %010d %" PRId64 " units: ",
+ printf (": Got index %d serialno %010u %" PRId64 " units: ",
i, ogg_page_serialno ((ogg_page *)input->og), units);
}
Modified: liboggz/trunk/src/tools/oggz-sort.c
===================================================================
--- liboggz/trunk/src/tools/oggz-sort.c 2008-12-04 21:22:47 UTC (rev 3810)
+++ liboggz/trunk/src/tools/oggz-sort.c 2008-12-04 21:23:01 UTC (rev 3811)
@@ -274,7 +274,7 @@
if (osdata->verbose) {
ot_fprint_time (stdout, (double)units/1000);
- printf (": Got index %d serialno %010d %lld units: ",
+ printf (": Got index %d serialno %010u %lld units: ",
i, ogg_page_serialno ((ogg_page *)input->og), (long long) units);
}
Modified: liboggz/trunk/src/tools/oggz-validate.c
===================================================================
--- liboggz/trunk/src/tools/oggz-validate.c 2008-12-04 21:22:47 UTC (rev 3810)
+++ liboggz/trunk/src/tools/oggz-validate.c 2008-12-04 21:23:01 UTC (rev 3811)
@@ -223,7 +223,7 @@
for (i = 0; i < nr_missing_eos; i++) {
log_error ();
oggz_table_nth (ovdata->missing_eos, i, &serialno);
- fprintf (stderr, "serialno %010ld: missing *** eos\n", serialno);
+ fprintf (stderr, "serialno %010lu: missing *** eos\n", serialno);
}
}
@@ -257,7 +257,7 @@
ovdata->theora_count++;
if (ovdata->audio_count > 0) {
log_error ();
- fprintf (stderr, "serialno %010ld: Theora video bos page after audio bos page\n", serialno);
+ fprintf (stderr, "serialno %010lu: Theora video bos page after audio bos page\n", serialno);
}
break;
case OGGZ_CONTENT_VORBIS:
@@ -279,7 +279,7 @@
if (!suffix) {
if (oggz_table_lookup (ovdata->missing_eos, serialno) == NULL) {
ret = log_error ();
- fprintf (stderr, "serialno %010ld: missing *** bos\n", serialno);
+ fprintf (stderr, "serialno %010lu: missing *** bos\n", serialno);
}
packetno = (int)oggz_table_lookup (ovdata->packetno, serialno);
@@ -290,16 +290,16 @@
oggz_table_insert (ovdata->packetno, serialno, (void *)packetno);
if (packetno == headers && gpos != 0) {
ret = log_error ();
- fprintf (stderr, "serialno %010ld: Terminal header page has non-zero granulepos\n", serialno);
+ fprintf (stderr, "serialno %010lu: Terminal header page has non-zero granulepos\n", serialno);
} else if (packetno > headers) {
ret = log_error ();
- fprintf (stderr, "serialno %010ld: Terminal header page contains non-header packet\n", serialno);
+ fprintf (stderr, "serialno %010lu: Terminal header page contains non-header packet\n", serialno);
}
} else if (packetno == headers) {
/* This is the next page after the page on which the last header finished */
if (ogg_page_continued (og)) {
ret = log_error ();
- fprintf (stderr, "serialno %010ld: Terminal header page contains non-header segment\n", serialno);
+ fprintf (stderr, "serialno %010lu: Terminal header page contains non-header segment\n", serialno);
}
/* Mark packetno as greater than headers to avoid these checks for this serialno */
@@ -313,13 +313,13 @@
int removed = oggz_table_remove (ovdata->missing_eos, serialno);
if (!suffix && removed == -1) {
ret = log_error ();
- fprintf (stderr, "serialno %010ld: *** eos marked but no bos\n",
+ fprintf (stderr, "serialno %010lu: *** eos marked but no bos\n",
serialno);
}
if (packets == 0) {
ret = log_error ();
- fprintf (stderr, "serialno %010ld: *** eos marked on page with no completed packets\n",
+ fprintf (stderr, "serialno %010lu: *** eos marked on page with no completed packets\n",
serialno);
}
@@ -331,7 +331,7 @@
if(gpos != -1 && packets == 0) {
ret = log_error ();
- fprintf (stderr, "serialno %010ld: granulepos %" PRId64 " on page with no completed packets, must be -1\n", serialno, gpos);
+ fprintf (stderr, "serialno %010lu: granulepos %" PRId64 " on page with no completed packets, must be -1\n", serialno, gpos);
}
return ret;
@@ -350,7 +350,7 @@
if (timestamp < current_timestamp) {
ret = log_error();
ot_fprint_time (stderr, (double)timestamp/SUBSECONDS);
- fprintf (stderr, ": serialno %010ld: Packet out of order (previous ",
+ fprintf (stderr, ": serialno %010lu: Packet out of order (previous ",
serialno);
ot_fprint_time (stderr, (double)current_timestamp/SUBSECONDS);
fprintf (stderr, ")\n");
@@ -371,7 +371,7 @@
} else {
ot_fprint_time (stderr, (double)timestamp/SUBSECONDS);
}
- fprintf (stderr, ": serialno %010ld: ", serialno);
+ fprintf (stderr, ": serialno %010lu: ", serialno);
for (i = 0; errors[i].error; i++) {
if (errors[i].error == feed_err) {
fprintf (stderr, "%s\n", errors[i].description);
More information about the commits
mailing list