Fixes: #151879, #151881, #151882, #151883, #151884, #151886, #151887, #152102, #152247.
authorDavid Schleef <ds@schleef.org>
Sun, 12 Sep 2004 22:57:27 +0000 (22:57 +0000)
committerDavid Schleef <ds@schleef.org>
Sun, 12 Sep 2004 22:57:27 +0000 (22:57 +0000)
Original commit message from CVS:
Fixes: #151879, #151881, #151882, #151883, #151884, #151886,
#151887, #152102, #152247.
* examples/indexing/indexmpeg.c: 64-bit warning fixes.
* examples/seeking/cdparanoia.c: same
* examples/seeking/cdplayer.c: same
* examples/seeking/seek.c: same
* examples/seeking/spider_seek.c: same
* examples/seeking/vorbisfile.c: same
* examples/stats/mp2ogg.c: same
* ext/esd/esdsink.c: (gst_esdsink_class_init),
(gst_esdsink_dispose): Dispose of element properly.
* ext/ivorbis/vorbisfile.c: (gst_ivorbisfile_seek): 64-bit warning
fixes.
* ext/nas/nassink.c: (gst_nassink_class_init),
(gst_nassink_dispose): Dispose of element correctly.
* gst/wavenc/gstwavenc.c: (gst_wavenc_chain): Fix leak.
* sys/ximage/ximagesink.c: (gst_ximagesink_check_xshm_calls),
(gst_ximagesink_ximage_new), (gst_ximagesink_ximage_destroy):
Fix 64-bit warning.
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_check_xshm_calls),
(gst_xvimagesink_xvimage_new), (gst_xvimagesink_xvimage_destroy):
Fix 64-bit warning.

19 files changed:
ChangeLog
examples/indexing/indexmpeg.c
examples/seeking/cdparanoia.c
examples/seeking/cdplayer.c
examples/seeking/seek.c
examples/seeking/spider_seek.c
examples/seeking/vorbisfile.c
examples/stats/mp2ogg.c
sys/ximage/ximagesink.c
sys/xvimage/xvimagesink.c
tests/examples/seek/seek.c
tests/examples/seek/spider_seek.c
tests/examples/seek/vorbisfile.c
tests/old/examples/indexing/indexmpeg.c
tests/old/examples/seek/cdparanoia.c
tests/old/examples/seek/cdplayer.c
tests/old/examples/seek/spider_seek.c
tests/old/examples/seek/vorbisfile.c
tests/old/examples/stats/mp2ogg.c

index e10e666..bab800c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2004-09-12  David Schleef  <ds@schleef.org>
+
+       Fixes: #151879, #151881, #151882, #151883, #151884, #151886,
+       #151887, #152102, #152247.
+       * examples/indexing/indexmpeg.c: 64-bit warning fixes.
+       * examples/seeking/cdparanoia.c: same
+       * examples/seeking/cdplayer.c: same
+       * examples/seeking/seek.c: same
+       * examples/seeking/spider_seek.c: same
+       * examples/seeking/vorbisfile.c: same
+       * examples/stats/mp2ogg.c: same
+       * ext/esd/esdsink.c: (gst_esdsink_class_init),
+       (gst_esdsink_dispose): Dispose of element properly.
+       * ext/ivorbis/vorbisfile.c: (gst_ivorbisfile_seek): 64-bit warning
+       fixes.
+       * ext/nas/nassink.c: (gst_nassink_class_init),
+       (gst_nassink_dispose): Dispose of element correctly.
+       * gst/wavenc/gstwavenc.c: (gst_wavenc_chain): Fix leak.
+       * sys/ximage/ximagesink.c: (gst_ximagesink_check_xshm_calls),
+       (gst_ximagesink_ximage_new), (gst_ximagesink_ximage_destroy):
+       Fix 64-bit warning.
+       * sys/xvimage/xvimagesink.c: (gst_xvimagesink_check_xshm_calls),
+       (gst_xvimagesink_xvimage_new), (gst_xvimagesink_xvimage_destroy):
+       Fix 64-bit warning.
+
 2004-09-12  Stephane Loeuillet  <stephane.loeuillet@tiscali.fr>
 
        * configure.ac : change speex detection as 1.1.6 now uses
index 5c12960..3b690af 100644 (file)
@@ -42,7 +42,7 @@ entry_added (GstIndex * index, GstIndexEntry * entry)
       g_print ("%p, %d: %08x ", entry, entry->id,
           GST_INDEX_ASSOC_FLAGS (entry));
       for (i = 0; i < GST_INDEX_NASSOCS (entry); i++) {
-        g_print ("%d %lld ", GST_INDEX_ASSOC_FORMAT (entry, i),
+        g_print ("%d %" G_GINT64_FORMAT " ", GST_INDEX_ASSOC_FORMAT (entry, i),
             GST_INDEX_ASSOC_VALUE (entry, i));
       }
       g_print ("\n");
index c4a58cf..fd41187 100644 (file)
@@ -28,10 +28,10 @@ get_position_info (GstElement * cdparanoia)
 
     if (format == GST_FORMAT_TIME) {
       position /= GST_SECOND;
-      g_print ("%s: %lld:%02lld", definition->nick, position / 60,
-          position % 60);
+      g_print ("%s: %" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT,
+          definition->nick, position / 60, position % 60);
     } else {
-      g_print ("%s: %lld", definition->nick, position);
+      g_print ("%s: %" G_GINT64_FORMAT, definition->nick, position);
     }
 
     formats++;
@@ -73,10 +73,10 @@ get_track_info (GstElement * cdparanoia)
     if (res) {
       if (format == GST_FORMAT_TIME) {
         total /= GST_SECOND;
-        g_print ("%s total: %lld:%02lld\n", definition->nick, total / 60,
-            total % 60);
+        g_print ("%s total: %" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT "\n",
+            definition->nick, total / 60, total % 60);
       } else
-        g_print ("%s total: %lld\n", definition->nick, total);
+        g_print ("%s total: %" G_GINT64_FORMAT "\n", definition->nick, total);
 
       if (format == track_format)
         total_tracks = total;
@@ -112,7 +112,9 @@ get_track_info (GstElement * cdparanoia)
       if (i > 0) {
         gint64 length = time - time_count;
 
-        g_print ("track %d: %lld:%02lld -> %lld:%02lld, length: %lld:%02lld\n",
+        g_print ("track %d: %" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT
+            " -> %" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT ", length: %"
+            G_GINT64_FORMAT ":%02" G_GINT64_FORMAT "\n",
             i - 1,
             time_count / 60, time_count % 60,
             time / 60, time % 60, length / 60, length % 60);
index d83c78e..afccaa8 100644 (file)
@@ -39,8 +39,8 @@ format_value (GtkScale * scale, gdouble value)
   seconds = (gint64) real / GST_SECOND;
   subseconds = (gint64) real / (GST_SECOND / 100);
 
-  return g_strdup_printf ("%02lld:%02lld:%02lld",
-      seconds / 60, seconds % 60, subseconds % 100);
+  return g_strdup_printf ("%02" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT ":%02"
+      G_GINT64_FORMAT, seconds / 60, seconds % 60, subseconds % 100);
 }
 
 typedef struct
@@ -77,7 +77,7 @@ query_durations ()
       format = seek_formats[i].format;
       res = gst_element_query (element, GST_QUERY_TOTAL, &format, &value);
       if (res) {
-        g_print ("%s %13lld | ", seek_formats[i].name, value);
+        g_print ("%s %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
       } else {
         g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
       }
@@ -106,7 +106,7 @@ query_positions ()
       format = seek_formats[i].format;
       res = gst_element_query (element, GST_QUERY_POSITION, &format, &value);
       if (res) {
-        g_print ("%s %13lld | ", seek_formats[i].name, value);
+        g_print ("%s %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
       } else {
         g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
       }
@@ -183,9 +183,11 @@ stop_seek (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
   while (walk) {
     GstElement *seekable = GST_ELEMENT (walk->data);
 
-    g_print ("seek to %lld on element %s\n", real, GST_ELEMENT_NAME (seekable));
-    s_event = gst_event_new_seek (GST_FORMAT_TIME |
-        GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH, real);
+    g_print ("seek to %" G_GINT64_FORMAT " on element %s\n", real,
+        GST_ELEMENT_NAME (seekable));
+    s_event =
+        gst_event_new_seek (GST_FORMAT_TIME | GST_SEEK_METHOD_SET |
+        GST_SEEK_FLAG_FLUSH, real);
 
     res = gst_element_send_event (seekable, s_event);
 
index a274c10..2d0216f 100644 (file)
@@ -580,8 +580,8 @@ format_value (GtkScale * scale, gdouble value)
   seconds = (gint64) real / GST_SECOND;
   subseconds = (gint64) real / (GST_SECOND / 100);
 
-  return g_strdup_printf ("%02lld:%02lld:%02lld",
-      seconds / 60, seconds % 60, subseconds % 100);
+  return g_strdup_printf ("%02" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT ":%02"
+      G_GINT64_FORMAT, seconds / 60, seconds % 60, subseconds % 100);
 }
 
 typedef struct
@@ -616,7 +616,7 @@ query_rates (void)
       format = seek_formats[i].format;
 
       if (gst_pad_convert (pad, GST_FORMAT_TIME, GST_SECOND, &format, &value)) {
-        g_print ("%s %13lld | ", seek_formats[i].name, value);
+        g_print ("%s %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
       } else {
         g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
       }
@@ -647,7 +647,7 @@ query_durations_elems ()
       format = seek_formats[i].format;
       res = gst_element_query (element, GST_QUERY_TOTAL, &format, &value);
       if (res) {
-        g_print ("%s %13lld | ", seek_formats[i].name, value);
+        g_print ("%s %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
       } else {
         g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
       }
@@ -677,7 +677,7 @@ query_durations_pads ()
       format = seek_formats[i].format;
       res = gst_pad_query (pad, GST_QUERY_TOTAL, &format, &value);
       if (res) {
-        g_print ("%s %13lld | ", seek_formats[i].name, value);
+        g_print ("%s %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
       } else {
         g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
       }
@@ -707,7 +707,7 @@ query_positions_elems ()
       format = seek_formats[i].format;
       res = gst_element_query (element, GST_QUERY_POSITION, &format, &value);
       if (res) {
-        g_print ("%s %13lld | ", seek_formats[i].name, value);
+        g_print ("%s %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
       } else {
         g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
       }
@@ -737,7 +737,7 @@ query_positions_pads ()
       format = seek_formats[i].format;
       res = gst_pad_query (pad, GST_QUERY_POSITION, &format, &value);
       if (res) {
-        g_print ("%s %13lld | ", seek_formats[i].name, value);
+        g_print ("%s %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
       } else {
         g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
       }
@@ -851,7 +851,7 @@ stop_seek (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
     while (walk) {
       GstPad *seekable = GST_PAD (walk->data);
 
-      g_print ("seek to %lld on pad %s:%s\n", real,
+      g_print ("seek to %" G_GINT64_FORMAT " on pad %s:%s\n", real,
           GST_DEBUG_PAD_NAME (seekable));
       s_event =
           gst_event_new_seek (GST_FORMAT_TIME | GST_SEEK_METHOD_SET |
@@ -867,7 +867,7 @@ stop_seek (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
     while (walk) {
       GstElement *seekable = GST_ELEMENT (walk->data);
 
-      g_print ("seek to %lld on element %s\n", real,
+      g_print ("seek to %" G_GINT64_FORMAT " on element %s\n", real,
           gst_element_get_name (seekable));
       s_event =
           gst_event_new_seek (GST_FORMAT_TIME | GST_SEEK_METHOD_SET |
index dc9ddfd..ec90b39 100644 (file)
@@ -83,8 +83,8 @@ format_value (GtkScale * scale, gdouble value)
   seconds = (gint64) real / GST_SECOND;
   subseconds = (gint64) real / (GST_SECOND / 100);
 
-  return g_strdup_printf ("%02lld:%02lld:%02lld",
-      seconds / 60, seconds % 60, subseconds % 100);
+  return g_strdup_printf ("%02" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT ":%02"
+      G_GINT64_FORMAT, seconds / 60, seconds % 60, subseconds % 100);
 }
 
 typedef struct
@@ -119,7 +119,7 @@ query_rates (void)
       format = seek_formats[i].format;
 
       if (gst_pad_convert (pad, GST_FORMAT_TIME, GST_SECOND, &format, &value)) {
-        g_print ("%s %13lld | ", seek_formats[i].name, value);
+        g_print ("%s %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
       } else {
         g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
       }
@@ -150,7 +150,7 @@ query_durations ()
       format = seek_formats[i].format;
       res = gst_element_query (element, GST_QUERY_TOTAL, &format, &value);
       if (res) {
-        g_print ("%s %13lld | ", seek_formats[i].name, value);
+        g_print ("%s %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
       } else {
         g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
       }
@@ -179,7 +179,7 @@ query_positions ()
       format = seek_formats[i].format;
       res = gst_element_query (element, GST_QUERY_POSITION, &format, &value);
       if (res) {
-        g_print ("%s %13lld | ", seek_formats[i].name, value);
+        g_print ("%s %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
       } else {
         g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
       }
@@ -254,9 +254,11 @@ stop_seek (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
   while (walk) {
     GstElement *seekable = GST_ELEMENT (walk->data);
 
-    g_print ("seek to %lld on element %s\n", real, GST_ELEMENT_NAME (seekable));
-    s_event = gst_event_new_seek (GST_FORMAT_TIME |
-        GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH, real);
+    g_print ("seek to %" G_GINT64_FORMAT " on element %s\n", real,
+        GST_ELEMENT_NAME (seekable));
+    s_event =
+        gst_event_new_seek (GST_FORMAT_TIME | GST_SEEK_METHOD_SET |
+        GST_SEEK_FLAG_FLUSH, real);
 
     res = gst_element_send_event (seekable, s_event);
 
index afb4ecc..d193642 100644 (file)
@@ -75,10 +75,11 @@ print_lbs_info (struct probe_context *context, gint stream)
 
       if (format == GST_FORMAT_TIME) {
         value_end /= (GST_SECOND / 100);
-        g_print ("    %s: %lld:%02lld.%02lld\n", definition->nick,
-            value_end / 6000, (value_end / 100) % 60, (value_end % 100));
+        g_print ("    %s: %" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT ".%02"
+            G_GINT64_FORMAT "\n", definition->nick, value_end / 6000,
+            (value_end / 100) % 60, (value_end % 100));
       } else {
-        g_print ("    %s: %lld\n", definition->nick, value_end);
+        g_print ("    %s: %" G_GINT64_FORMAT "\n", definition->nick, value_end);
       }
     } else
       g_print ("    could not get logical stream %s\n", definition->nick);
@@ -181,12 +182,13 @@ collect_stream_properties (struct probe_context *context)
     if (res) {
       if (format == GST_FORMAT_TIME) {
         value /= (GST_SECOND / 100);
-        g_print ("  total %s: %lld:%02lld.%02lld\n", definition->nick,
-            value / 6000, (value / 100) % 60, (value % 100));
+        g_print ("  total %s: %" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT ".%02"
+            G_GINT64_FORMAT "\n", definition->nick, value / 6000,
+            (value / 100) % 60, (value % 100));
       } else {
         if (format == context->ls_format)
           context->total_ls = value;
-        g_print ("  total %s: %lld\n", definition->nick, value);
+        g_print ("  total %s: %" G_GINT64_FORMAT "\n", definition->nick, value);
       }
     }
   }
index 3fb437f..f62fe5d 100644 (file)
@@ -86,12 +86,13 @@ main (gint argc, gchar * argv[])
         &format, &bitrate_dec);
 
     g_print ("[%2dm %.2ds] of [%2dm %.2ds], "
-        "src avg bitrate: %lld, dest avg birate: %lld, ratio [%02.2f]    \r",
+        "src avg bitrate: %" G_GINT64_FORMAT ", dest avg birate: %"
+        G_GINT64_FORMAT ", ratio [%02.2f]    \r",
         (gint) (position / (GST_SECOND * 60)),
         (gint) (position / (GST_SECOND)) % 60,
         (gint) (duration / (GST_SECOND * 60)),
-        (gint) (duration / (GST_SECOND)) % 60,
-        bitrate_dec, bitrate_enc, (gfloat) bitrate_dec / bitrate_enc);
+        (gint) (duration / (GST_SECOND)) % 60, bitrate_dec, bitrate_enc,
+        (gfloat) bitrate_dec / bitrate_enc);
   }
 
   g_print ("\n");
index 07f3d49..ae05a85 100644 (file)
@@ -137,7 +137,7 @@ gst_ximagesink_check_xshm_calls (GstXContext * xcontext)
   }
 
   ximage->SHMInfo.shmaddr = shmat (ximage->SHMInfo.shmid, 0, 0);
-  if ((int) ximage->SHMInfo.shmaddr == -1) {
+  if (ximage->SHMInfo.shmaddr == ((void *) -1)) {
     GST_WARNING ("Failed to shmat: %s", g_strerror (errno));
     goto beach;
   }
@@ -214,7 +214,7 @@ gst_ximagesink_ximage_new (GstXImageSink * ximagesink, gint width, gint height)
     }
 
     ximage->SHMInfo.shmaddr = shmat (ximage->SHMInfo.shmid, 0, 0);
-    if ((int) ximage->SHMInfo.shmaddr == -1) {
+    if (ximage->SHMInfo.shmaddr == ((void *) -1)) {
       GST_ELEMENT_ERROR (ximagesink, RESOURCE, WRITE, (NULL),
           ("Failed to shmat: %s", g_strerror (errno)));
       goto beach;
@@ -277,7 +277,7 @@ gst_ximagesink_ximage_destroy (GstXImageSink * ximagesink, GstXImage * ximage)
 
 #ifdef HAVE_XSHM
   if (ximagesink->xcontext->use_xshm) {
-    if ((int) ximage->SHMInfo.shmaddr != -1) {
+    if (ximage->SHMInfo.shmaddr != ((void *) -1)) {
       XShmDetach (ximagesink->xcontext->disp, &ximage->SHMInfo);
       shmdt (ximage->SHMInfo.shmaddr);
     }
index 389bd96..e22067a 100644 (file)
@@ -147,7 +147,7 @@ gst_xvimagesink_check_xshm_calls (GstXContext * xcontext)
   }
 
   xvimage->SHMInfo.shmaddr = shmat (xvimage->SHMInfo.shmid, 0, 0);
-  if ((int) xvimage->SHMInfo.shmaddr == -1) {
+  if (xvimage->SHMInfo.shmaddr == ((void *) -1)) {
     GST_WARNING ("Failed to shmat: %s", g_strerror (errno));
     goto beach;
   }
@@ -225,7 +225,7 @@ gst_xvimagesink_xvimage_new (GstXvImageSink * xvimagesink,
     }
 
     xvimage->SHMInfo.shmaddr = shmat (xvimage->SHMInfo.shmid, 0, 0);
-    if ((int) xvimage->SHMInfo.shmaddr == -1) {
+    if (xvimage->SHMInfo.shmaddr == ((void *) -1)) {
       GST_ELEMENT_ERROR (xvimagesink, RESOURCE, WRITE, (NULL),
           ("Failed to shmat: %s", g_strerror (errno)));
       goto beach;
@@ -287,7 +287,7 @@ gst_xvimagesink_xvimage_destroy (GstXvImageSink * xvimagesink,
 
 #ifdef HAVE_XSHM
   if (xvimagesink->xcontext->use_xshm) {
-    if ((int) xvimage->SHMInfo.shmaddr != -1) {
+    if (xvimage->SHMInfo.shmaddr != ((void *) -1)) {
       XShmDetach (xvimagesink->xcontext->disp, &xvimage->SHMInfo);
       shmdt (xvimage->SHMInfo.shmaddr);
     }
index a274c10..2d0216f 100644 (file)
@@ -580,8 +580,8 @@ format_value (GtkScale * scale, gdouble value)
   seconds = (gint64) real / GST_SECOND;
   subseconds = (gint64) real / (GST_SECOND / 100);
 
-  return g_strdup_printf ("%02lld:%02lld:%02lld",
-      seconds / 60, seconds % 60, subseconds % 100);
+  return g_strdup_printf ("%02" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT ":%02"
+      G_GINT64_FORMAT, seconds / 60, seconds % 60, subseconds % 100);
 }
 
 typedef struct
@@ -616,7 +616,7 @@ query_rates (void)
       format = seek_formats[i].format;
 
       if (gst_pad_convert (pad, GST_FORMAT_TIME, GST_SECOND, &format, &value)) {
-        g_print ("%s %13lld | ", seek_formats[i].name, value);
+        g_print ("%s %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
       } else {
         g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
       }
@@ -647,7 +647,7 @@ query_durations_elems ()
       format = seek_formats[i].format;
       res = gst_element_query (element, GST_QUERY_TOTAL, &format, &value);
       if (res) {
-        g_print ("%s %13lld | ", seek_formats[i].name, value);
+        g_print ("%s %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
       } else {
         g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
       }
@@ -677,7 +677,7 @@ query_durations_pads ()
       format = seek_formats[i].format;
       res = gst_pad_query (pad, GST_QUERY_TOTAL, &format, &value);
       if (res) {
-        g_print ("%s %13lld | ", seek_formats[i].name, value);
+        g_print ("%s %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
       } else {
         g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
       }
@@ -707,7 +707,7 @@ query_positions_elems ()
       format = seek_formats[i].format;
       res = gst_element_query (element, GST_QUERY_POSITION, &format, &value);
       if (res) {
-        g_print ("%s %13lld | ", seek_formats[i].name, value);
+        g_print ("%s %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
       } else {
         g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
       }
@@ -737,7 +737,7 @@ query_positions_pads ()
       format = seek_formats[i].format;
       res = gst_pad_query (pad, GST_QUERY_POSITION, &format, &value);
       if (res) {
-        g_print ("%s %13lld | ", seek_formats[i].name, value);
+        g_print ("%s %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
       } else {
         g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
       }
@@ -851,7 +851,7 @@ stop_seek (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
     while (walk) {
       GstPad *seekable = GST_PAD (walk->data);
 
-      g_print ("seek to %lld on pad %s:%s\n", real,
+      g_print ("seek to %" G_GINT64_FORMAT " on pad %s:%s\n", real,
           GST_DEBUG_PAD_NAME (seekable));
       s_event =
           gst_event_new_seek (GST_FORMAT_TIME | GST_SEEK_METHOD_SET |
@@ -867,7 +867,7 @@ stop_seek (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
     while (walk) {
       GstElement *seekable = GST_ELEMENT (walk->data);
 
-      g_print ("seek to %lld on element %s\n", real,
+      g_print ("seek to %" G_GINT64_FORMAT " on element %s\n", real,
           gst_element_get_name (seekable));
       s_event =
           gst_event_new_seek (GST_FORMAT_TIME | GST_SEEK_METHOD_SET |
index dc9ddfd..ec90b39 100644 (file)
@@ -83,8 +83,8 @@ format_value (GtkScale * scale, gdouble value)
   seconds = (gint64) real / GST_SECOND;
   subseconds = (gint64) real / (GST_SECOND / 100);
 
-  return g_strdup_printf ("%02lld:%02lld:%02lld",
-      seconds / 60, seconds % 60, subseconds % 100);
+  return g_strdup_printf ("%02" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT ":%02"
+      G_GINT64_FORMAT, seconds / 60, seconds % 60, subseconds % 100);
 }
 
 typedef struct
@@ -119,7 +119,7 @@ query_rates (void)
       format = seek_formats[i].format;
 
       if (gst_pad_convert (pad, GST_FORMAT_TIME, GST_SECOND, &format, &value)) {
-        g_print ("%s %13lld | ", seek_formats[i].name, value);
+        g_print ("%s %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
       } else {
         g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
       }
@@ -150,7 +150,7 @@ query_durations ()
       format = seek_formats[i].format;
       res = gst_element_query (element, GST_QUERY_TOTAL, &format, &value);
       if (res) {
-        g_print ("%s %13lld | ", seek_formats[i].name, value);
+        g_print ("%s %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
       } else {
         g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
       }
@@ -179,7 +179,7 @@ query_positions ()
       format = seek_formats[i].format;
       res = gst_element_query (element, GST_QUERY_POSITION, &format, &value);
       if (res) {
-        g_print ("%s %13lld | ", seek_formats[i].name, value);
+        g_print ("%s %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
       } else {
         g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
       }
@@ -254,9 +254,11 @@ stop_seek (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
   while (walk) {
     GstElement *seekable = GST_ELEMENT (walk->data);
 
-    g_print ("seek to %lld on element %s\n", real, GST_ELEMENT_NAME (seekable));
-    s_event = gst_event_new_seek (GST_FORMAT_TIME |
-        GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH, real);
+    g_print ("seek to %" G_GINT64_FORMAT " on element %s\n", real,
+        GST_ELEMENT_NAME (seekable));
+    s_event =
+        gst_event_new_seek (GST_FORMAT_TIME | GST_SEEK_METHOD_SET |
+        GST_SEEK_FLAG_FLUSH, real);
 
     res = gst_element_send_event (seekable, s_event);
 
index afb4ecc..d193642 100644 (file)
@@ -75,10 +75,11 @@ print_lbs_info (struct probe_context *context, gint stream)
 
       if (format == GST_FORMAT_TIME) {
         value_end /= (GST_SECOND / 100);
-        g_print ("    %s: %lld:%02lld.%02lld\n", definition->nick,
-            value_end / 6000, (value_end / 100) % 60, (value_end % 100));
+        g_print ("    %s: %" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT ".%02"
+            G_GINT64_FORMAT "\n", definition->nick, value_end / 6000,
+            (value_end / 100) % 60, (value_end % 100));
       } else {
-        g_print ("    %s: %lld\n", definition->nick, value_end);
+        g_print ("    %s: %" G_GINT64_FORMAT "\n", definition->nick, value_end);
       }
     } else
       g_print ("    could not get logical stream %s\n", definition->nick);
@@ -181,12 +182,13 @@ collect_stream_properties (struct probe_context *context)
     if (res) {
       if (format == GST_FORMAT_TIME) {
         value /= (GST_SECOND / 100);
-        g_print ("  total %s: %lld:%02lld.%02lld\n", definition->nick,
-            value / 6000, (value / 100) % 60, (value % 100));
+        g_print ("  total %s: %" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT ".%02"
+            G_GINT64_FORMAT "\n", definition->nick, value / 6000,
+            (value / 100) % 60, (value % 100));
       } else {
         if (format == context->ls_format)
           context->total_ls = value;
-        g_print ("  total %s: %lld\n", definition->nick, value);
+        g_print ("  total %s: %" G_GINT64_FORMAT "\n", definition->nick, value);
       }
     }
   }
index 5c12960..3b690af 100644 (file)
@@ -42,7 +42,7 @@ entry_added (GstIndex * index, GstIndexEntry * entry)
       g_print ("%p, %d: %08x ", entry, entry->id,
           GST_INDEX_ASSOC_FLAGS (entry));
       for (i = 0; i < GST_INDEX_NASSOCS (entry); i++) {
-        g_print ("%d %lld ", GST_INDEX_ASSOC_FORMAT (entry, i),
+        g_print ("%d %" G_GINT64_FORMAT " ", GST_INDEX_ASSOC_FORMAT (entry, i),
             GST_INDEX_ASSOC_VALUE (entry, i));
       }
       g_print ("\n");
index c4a58cf..fd41187 100644 (file)
@@ -28,10 +28,10 @@ get_position_info (GstElement * cdparanoia)
 
     if (format == GST_FORMAT_TIME) {
       position /= GST_SECOND;
-      g_print ("%s: %lld:%02lld", definition->nick, position / 60,
-          position % 60);
+      g_print ("%s: %" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT,
+          definition->nick, position / 60, position % 60);
     } else {
-      g_print ("%s: %lld", definition->nick, position);
+      g_print ("%s: %" G_GINT64_FORMAT, definition->nick, position);
     }
 
     formats++;
@@ -73,10 +73,10 @@ get_track_info (GstElement * cdparanoia)
     if (res) {
       if (format == GST_FORMAT_TIME) {
         total /= GST_SECOND;
-        g_print ("%s total: %lld:%02lld\n", definition->nick, total / 60,
-            total % 60);
+        g_print ("%s total: %" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT "\n",
+            definition->nick, total / 60, total % 60);
       } else
-        g_print ("%s total: %lld\n", definition->nick, total);
+        g_print ("%s total: %" G_GINT64_FORMAT "\n", definition->nick, total);
 
       if (format == track_format)
         total_tracks = total;
@@ -112,7 +112,9 @@ get_track_info (GstElement * cdparanoia)
       if (i > 0) {
         gint64 length = time - time_count;
 
-        g_print ("track %d: %lld:%02lld -> %lld:%02lld, length: %lld:%02lld\n",
+        g_print ("track %d: %" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT
+            " -> %" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT ", length: %"
+            G_GINT64_FORMAT ":%02" G_GINT64_FORMAT "\n",
             i - 1,
             time_count / 60, time_count % 60,
             time / 60, time % 60, length / 60, length % 60);
index d83c78e..afccaa8 100644 (file)
@@ -39,8 +39,8 @@ format_value (GtkScale * scale, gdouble value)
   seconds = (gint64) real / GST_SECOND;
   subseconds = (gint64) real / (GST_SECOND / 100);
 
-  return g_strdup_printf ("%02lld:%02lld:%02lld",
-      seconds / 60, seconds % 60, subseconds % 100);
+  return g_strdup_printf ("%02" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT ":%02"
+      G_GINT64_FORMAT, seconds / 60, seconds % 60, subseconds % 100);
 }
 
 typedef struct
@@ -77,7 +77,7 @@ query_durations ()
       format = seek_formats[i].format;
       res = gst_element_query (element, GST_QUERY_TOTAL, &format, &value);
       if (res) {
-        g_print ("%s %13lld | ", seek_formats[i].name, value);
+        g_print ("%s %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
       } else {
         g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
       }
@@ -106,7 +106,7 @@ query_positions ()
       format = seek_formats[i].format;
       res = gst_element_query (element, GST_QUERY_POSITION, &format, &value);
       if (res) {
-        g_print ("%s %13lld | ", seek_formats[i].name, value);
+        g_print ("%s %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
       } else {
         g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
       }
@@ -183,9 +183,11 @@ stop_seek (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
   while (walk) {
     GstElement *seekable = GST_ELEMENT (walk->data);
 
-    g_print ("seek to %lld on element %s\n", real, GST_ELEMENT_NAME (seekable));
-    s_event = gst_event_new_seek (GST_FORMAT_TIME |
-        GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH, real);
+    g_print ("seek to %" G_GINT64_FORMAT " on element %s\n", real,
+        GST_ELEMENT_NAME (seekable));
+    s_event =
+        gst_event_new_seek (GST_FORMAT_TIME | GST_SEEK_METHOD_SET |
+        GST_SEEK_FLAG_FLUSH, real);
 
     res = gst_element_send_event (seekable, s_event);
 
index dc9ddfd..ec90b39 100644 (file)
@@ -83,8 +83,8 @@ format_value (GtkScale * scale, gdouble value)
   seconds = (gint64) real / GST_SECOND;
   subseconds = (gint64) real / (GST_SECOND / 100);
 
-  return g_strdup_printf ("%02lld:%02lld:%02lld",
-      seconds / 60, seconds % 60, subseconds % 100);
+  return g_strdup_printf ("%02" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT ":%02"
+      G_GINT64_FORMAT, seconds / 60, seconds % 60, subseconds % 100);
 }
 
 typedef struct
@@ -119,7 +119,7 @@ query_rates (void)
       format = seek_formats[i].format;
 
       if (gst_pad_convert (pad, GST_FORMAT_TIME, GST_SECOND, &format, &value)) {
-        g_print ("%s %13lld | ", seek_formats[i].name, value);
+        g_print ("%s %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
       } else {
         g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
       }
@@ -150,7 +150,7 @@ query_durations ()
       format = seek_formats[i].format;
       res = gst_element_query (element, GST_QUERY_TOTAL, &format, &value);
       if (res) {
-        g_print ("%s %13lld | ", seek_formats[i].name, value);
+        g_print ("%s %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
       } else {
         g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
       }
@@ -179,7 +179,7 @@ query_positions ()
       format = seek_formats[i].format;
       res = gst_element_query (element, GST_QUERY_POSITION, &format, &value);
       if (res) {
-        g_print ("%s %13lld | ", seek_formats[i].name, value);
+        g_print ("%s %13" G_GINT64_FORMAT " | ", seek_formats[i].name, value);
       } else {
         g_print ("%s %13.13s | ", seek_formats[i].name, "*NA*");
       }
@@ -254,9 +254,11 @@ stop_seek (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
   while (walk) {
     GstElement *seekable = GST_ELEMENT (walk->data);
 
-    g_print ("seek to %lld on element %s\n", real, GST_ELEMENT_NAME (seekable));
-    s_event = gst_event_new_seek (GST_FORMAT_TIME |
-        GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH, real);
+    g_print ("seek to %" G_GINT64_FORMAT " on element %s\n", real,
+        GST_ELEMENT_NAME (seekable));
+    s_event =
+        gst_event_new_seek (GST_FORMAT_TIME | GST_SEEK_METHOD_SET |
+        GST_SEEK_FLAG_FLUSH, real);
 
     res = gst_element_send_event (seekable, s_event);
 
index afb4ecc..d193642 100644 (file)
@@ -75,10 +75,11 @@ print_lbs_info (struct probe_context *context, gint stream)
 
       if (format == GST_FORMAT_TIME) {
         value_end /= (GST_SECOND / 100);
-        g_print ("    %s: %lld:%02lld.%02lld\n", definition->nick,
-            value_end / 6000, (value_end / 100) % 60, (value_end % 100));
+        g_print ("    %s: %" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT ".%02"
+            G_GINT64_FORMAT "\n", definition->nick, value_end / 6000,
+            (value_end / 100) % 60, (value_end % 100));
       } else {
-        g_print ("    %s: %lld\n", definition->nick, value_end);
+        g_print ("    %s: %" G_GINT64_FORMAT "\n", definition->nick, value_end);
       }
     } else
       g_print ("    could not get logical stream %s\n", definition->nick);
@@ -181,12 +182,13 @@ collect_stream_properties (struct probe_context *context)
     if (res) {
       if (format == GST_FORMAT_TIME) {
         value /= (GST_SECOND / 100);
-        g_print ("  total %s: %lld:%02lld.%02lld\n", definition->nick,
-            value / 6000, (value / 100) % 60, (value % 100));
+        g_print ("  total %s: %" G_GINT64_FORMAT ":%02" G_GINT64_FORMAT ".%02"
+            G_GINT64_FORMAT "\n", definition->nick, value / 6000,
+            (value / 100) % 60, (value % 100));
       } else {
         if (format == context->ls_format)
           context->total_ls = value;
-        g_print ("  total %s: %lld\n", definition->nick, value);
+        g_print ("  total %s: %" G_GINT64_FORMAT "\n", definition->nick, value);
       }
     }
   }
index 3fb437f..f62fe5d 100644 (file)
@@ -86,12 +86,13 @@ main (gint argc, gchar * argv[])
         &format, &bitrate_dec);
 
     g_print ("[%2dm %.2ds] of [%2dm %.2ds], "
-        "src avg bitrate: %lld, dest avg birate: %lld, ratio [%02.2f]    \r",
+        "src avg bitrate: %" G_GINT64_FORMAT ", dest avg birate: %"
+        G_GINT64_FORMAT ", ratio [%02.2f]    \r",
         (gint) (position / (GST_SECOND * 60)),
         (gint) (position / (GST_SECOND)) % 60,
         (gint) (duration / (GST_SECOND * 60)),
-        (gint) (duration / (GST_SECOND)) % 60,
-        bitrate_dec, bitrate_enc, (gfloat) bitrate_dec / bitrate_enc);
+        (gint) (duration / (GST_SECOND)) % 60, bitrate_dec, bitrate_enc,
+        (gfloat) bitrate_dec / bitrate_enc);
   }
 
   g_print ("\n");