Convert %lld and %llu in printf formats to G_G[U]INT64_FORMAT. Fix pointer<->int conversion. Fixes warnings on alpha.

Original commit message from CVS:
Convert %lld and %llu in printf formats to G_G[U]INT64_FORMAT.  Fix
pointer<->int conversion.  Fixes warnings on alpha.
This commit is contained in:
David Schleef 2003-02-01 20:29:27 +00:00
parent 2c4d0a7e60
commit 393033c6fa
29 changed files with 98 additions and 60 deletions

View file

@ -45,7 +45,7 @@ property_change_callback (GObject *object, GstObject *orig, GParamSpec *pspec)
else if (G_IS_PARAM_SPEC_ENUM (pspec))
str = g_strdup_printf ("%d", g_value_get_enum (&value));
else if (G_IS_PARAM_SPEC_INT64 (pspec))
str = g_strdup_printf ("%lld", g_value_get_int64 (&value));
str = g_strdup_printf ("%" G_GINT64_FORMAT, g_value_get_int64 (&value));
else
str = g_strdup_value_contents (&value);

View file

@ -597,7 +597,8 @@ cothread_switch (cothread_state *cothread)
ctx->current, cothread->cothreadnum);
ctx->current = cothread->cothreadnum;
g_static_private_set (&_gst_debug_cothread_index, (void *)ctx->current, NULL);
g_static_private_set (&_gst_debug_cothread_index,
GINT_TO_POINTER(ctx->current), NULL);
/* save the current stack pointer, frame pointer, and pc */
#ifdef GST_ARCH_PRESETJMP

View file

@ -268,7 +268,8 @@ gst_aggregator_push (GstAggregator *aggregator, GstPad *pad, GstBuffer *buf, guc
if (!aggregator->silent) {
g_free (aggregator->last_message);
aggregator->last_message = g_strdup_printf ("%10.10s ******* (%s:%s)a (%d bytes, %llu)",
aggregator->last_message = g_strdup_printf ("%10.10s ******* (%s:%s)a (%d bytes, %"
G_GUINT64_FORMAT ")",
debug, GST_DEBUG_PAD_NAME (pad), GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf));
g_object_notify (G_OBJECT (aggregator), "last_message");

View file

@ -291,7 +291,8 @@ gst_fakesink_chain (GstPad *pad, GstBuffer *buf)
if (!fakesink->silent) {
g_free (fakesink->last_message);
fakesink->last_message = g_strdup_printf ("chain ******* (%s:%s)< (%d bytes, %lld, %d) %p",
fakesink->last_message = g_strdup_printf ("chain ******* (%s:%s)< (%d bytes, %"
G_GINT64_FORMAT ", %d) %p",
GST_DEBUG_PAD_NAME (pad), GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf),
GST_BUFFER_FLAGS (buf), buf);

View file

@ -763,7 +763,8 @@ gst_fakesrc_get(GstPad *pad)
if (!src->silent) {
g_free (src->last_message);
src->last_message = g_strdup_printf ("get ******* (%s:%s)> (%d bytes, %llu) %p",
src->last_message = g_strdup_printf ("get ******* (%s:%s)> (%d bytes, %"
G_GUINT64_FORMAT " ) %p",
GST_DEBUG_PAD_NAME (pad), GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf), buf);
g_object_notify (G_OBJECT (src), "last_message");

View file

@ -367,8 +367,11 @@ gst_filesrc_free_parent_mmap (GstBuffer *buf)
#endif
/* now unmap the memory */
munmap (GST_BUFFER_DATA (buf), GST_BUFFER_MAXSIZE (buf));
GST_DEBUG (0, "unmapped region %08llx+%08llx at %p",
GST_BUFFER_OFFSET (buf), GST_BUFFER_MAXSIZE (buf),
/* cast to unsigned long, since there's no gportable way to print
* guint64 as hex */
GST_DEBUG (0, "unmapped region %08lx+%08lx at %p",
(unsigned long) GST_BUFFER_OFFSET (buf),
(unsigned long) GST_BUFFER_MAXSIZE (buf),
GST_BUFFER_DATA (buf));
GST_BUFFER_DATA (buf) = NULL;
@ -397,8 +400,8 @@ gst_filesrc_map_region (GstFileSrc *src, off_t offset, size_t size)
size, src->fd, offset, strerror (errno));
return NULL;
}
GST_DEBUG (0, "mapped region %08llx+%08x from file into memory at %p",
offset, size, mmapregion);
GST_DEBUG (0, "mapped region %08lx+%08lx from file into memory at %p",
(unsigned long)offset, (unsigned long)size, mmapregion);
/* time to allocate a new mapbuf */
buf = gst_buffer_new ();
@ -514,7 +517,8 @@ gst_filesrc_get (GstPad *pad)
/* check for EOF */
if (src->curoffset == src->filelen) {
GST_DEBUG (0, "filesrc eos %lld %lld", src->curoffset, src->filelen);
GST_DEBUG (0, "filesrc eos %" G_GINT64_FORMAT
" %" G_GINT64_FORMAT, src->curoffset, src->filelen);
gst_element_set_eos (GST_ELEMENT (src));
return GST_BUFFER (gst_event_new (GST_EVENT_EOS));
}
@ -531,8 +535,9 @@ gst_filesrc_get (GstPad *pad)
readend = src->curoffset + readsize;
}
GST_DEBUG (0, "attempting to read %08x, %08llx, %08llx, %08llx",
readsize, readend, mapstart, mapend);
GST_DEBUG (0, "attempting to read %08lx, %08lx, %08lx, %08lx",
(unsigned long)readsize, (unsigned long)readend,
(unsigned long)mapstart, (unsigned long)mapend);
/* if the start is past the mapstart */
if (src->curoffset >= mapstart) {
@ -787,19 +792,19 @@ gst_filesrc_srcpad_event (GstPad *pad, GstEvent *event)
if (offset > src->filelen)
goto error;
src->curoffset = offset;
GST_DEBUG(0, "seek set pending to %lld", src->curoffset);
GST_DEBUG(0, "seek set pending to %" G_GINT64_FORMAT, src->curoffset);
break;
case GST_SEEK_METHOD_CUR:
if (offset + src->curoffset > src->filelen)
goto error;
src->curoffset += offset;
GST_DEBUG(0, "seek cur pending to %lld", src->curoffset);
GST_DEBUG(0, "seek cur pending to %" G_GINT64_FORMAT, src->curoffset);
break;
case GST_SEEK_METHOD_END:
if (ABS (offset) > src->filelen)
goto error;
src->curoffset = src->filelen - ABS (offset);
GST_DEBUG(0, "seek end pending to %lld", src->curoffset);
GST_DEBUG(0, "seek end pending to %" G_GINT64_FORMAT, src->curoffset);
break;
default:
goto error;

View file

@ -220,7 +220,8 @@ gst_identity_chain (GstPad *pad, GstBuffer *buf)
if (identity->last_message != NULL) {
g_free (identity->last_message);
}
identity->last_message = g_strdup_printf ("dropping ******* (%s:%s)i (%d bytes, %llu)",
identity->last_message = g_strdup_printf ("dropping ******* (%s:%s)i (%d bytes, %"
G_GINT64_FORMAT ")",
GST_DEBUG_PAD_NAME (identity->sinkpad), GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf));
g_object_notify (G_OBJECT (identity), "last-message");
gst_buffer_unref (buf);
@ -234,7 +235,8 @@ gst_identity_chain (GstPad *pad, GstBuffer *buf)
for (i = identity->duplicate; i; i--) {
if (!identity->silent) {
g_free (identity->last_message);
identity->last_message = g_strdup_printf ("chain ******* (%s:%s)i (%d bytes, %llu)",
identity->last_message = g_strdup_printf ("chain ******* (%s:%s)i (%d bytes, %"
G_GINT64_FORMAT ")",
GST_DEBUG_PAD_NAME (identity->sinkpad), GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf));
g_object_notify (G_OBJECT (identity), "last-message");
}

View file

@ -208,7 +208,9 @@ print_stats(gboolean first, const gchar *name, const gchar *type, stats *base, s
delta.bytes = final->bytes - base->bytes;
delta.events = final->events - base->events;
g_print("%s: (%s) %s: s:%g buffers:%lld bytes:%lld events:%lld\n",
g_print("%s: (%s) %s: s:%g buffers:%" G_GINT64_FORMAT
" bytes:%" G_GINT64_FORMAT
" events:%" G_GINT64_FORMAT "\n",
first ? header0 : headerN,
name, type, time,
final->buffers,

View file

@ -301,7 +301,8 @@ gst_tee_chain (GstPad *pad, GstBuffer *buf)
if (!tee->silent) {
g_free (tee->last_message);
tee->last_message = g_strdup_printf ("chain ******* (%s:%s)t (%d bytes, %llu) %p",
tee->last_message = g_strdup_printf ("chain ******* (%s:%s)t (%d bytes, %"
G_GUINT64_FORMAT ") %p",
GST_DEBUG_PAD_NAME (outpad), GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf), buf);
g_object_notify (G_OBJECT (tee), "last_message");
}

View file

@ -195,7 +195,7 @@ gst_default_debug_handler (gint category, gboolean incore,
gchar *empty = "";
gchar *elementname = empty,*location = empty;
int pid = getpid();
int cothread_id = (int) g_static_private_get(&_gst_debug_cothread_index);
int cothread_id = GPOINTER_TO_INT(g_static_private_get(&_gst_debug_cothread_index));
#ifdef GST_DEBUG_COLOR
int pid_color = pid%6 + 31;
int cothread_color = (cothread_id < 0) ? 37 : (cothread_id%6 + 31);
@ -307,7 +307,7 @@ gst_default_info_handler (gint category, gboolean incore,
gchar *empty = "";
gchar *elementname = empty,*location = empty;
int pid = getpid();
int cothread_id = (int) g_static_private_get(&_gst_debug_cothread_index);
int cothread_id = GPOINTER_TO_INT(g_static_private_get(&_gst_debug_cothread_index));
#ifdef GST_DEBUG_COLOR
int pid_color = pid%6 + 31;
int cothread_color = (cothread_id < 0) ? 37 : (cothread_id%6 + 31);

View file

@ -143,7 +143,8 @@ gst_system_clock_wait (GstClock *clock, GstClockEntry *entry)
diff = GST_CLOCK_ENTRY_TIME (entry) - current;
if (ABS (diff) > clock->max_diff) {
g_warning ("abnormal clock request diff: ABS(%lld) > %lld", diff, clock->max_diff);
g_warning ("abnormal clock request diff: ABS(%" G_GINT64_FORMAT
") > %" G_GINT64_FORMAT, diff, clock->max_diff);
return GST_CLOCK_ENTRY_EARLY;
}

View file

@ -118,7 +118,7 @@ gst_trace_text_flush (GstTrace * trace)
}
for (i = 0; i < trace->bufoffset; i++) {
snprintf (str, strsize, "%20lld %10d %10d %s\n",
snprintf (str, strsize, "%20" G_GINT64_FORMAT " %10d %10d %s\n",
trace->buf[i].timestamp,
trace->buf[i].sequence, trace->buf[i].data, trace->buf[i].message);
write (trace->fd, str, strlen (str));

View file

@ -184,7 +184,10 @@ gst_dparam_set_property (GObject *object, guint prop_id, const GValue *value, GP
break;
case ARG_VALUE_INT64:
GST_DEBUG(GST_CAT_PARAMS, "setting value from %lld to %lld", dparam->value_int64, g_value_get_int64 (value));
GST_DEBUG(GST_CAT_PARAMS, "setting value from %"
G_GINT64_FORMAT " to %"
G_GINT64_FORMAT,
dparam->value_int64, g_value_get_int64 (value));
dparam->value_int64 = g_value_get_int (value);
GST_DPARAM_NEXT_UPDATE_TIMESTAMP(dparam) = GST_DPARAM_LAST_UPDATE_TIMESTAMP(dparam);
GST_DPARAM_READY_FOR_UPDATE(dparam) = TRUE;

View file

@ -157,7 +157,9 @@ gst_dpsmooth_set_property (GObject *object, guint prop_id, const GValue *value,
case ARG_SLOPE_TIME:
dpsmooth->slope_time = g_value_get_int64 (value);
GST_DEBUG(GST_CAT_PARAMS, "dpsmooth->slope_time:%lld",dpsmooth->slope_time);
GST_DEBUG(GST_CAT_PARAMS, "dpsmooth->slope_time:%"
G_GINT64_FORMAT,
dpsmooth->slope_time);
GST_DPARAM_READY_FOR_UPDATE(dparam) = TRUE;
break;
@ -219,7 +221,8 @@ gst_dpsmooth_value_changed_float (GstDParam *dparam)
dpsmooth->need_interp_times = TRUE;
GST_DEBUG(GST_CAT_PARAMS, "%f to %f ratio:%f duration:%lld\n",
GST_DEBUG(GST_CAT_PARAMS, "%f to %f ratio:%f duration:%"
G_GINT64_FORMAT "\n",
dpsmooth->start_float, dparam->value_float, time_ratio, dpsmooth->duration_interp);
}
@ -246,7 +249,8 @@ gst_dpsmooth_do_update_float (GstDParam *dparam, gint64 timestamp, GValue *value
}
dpsmooth->current_float = dparam->value_float;
GST_DEBUG(GST_CAT_PARAMS, "interp finished at %lld", timestamp);
GST_DEBUG(GST_CAT_PARAMS, "interp finished at %"
G_GINT64_FORMAT, timestamp);
GST_DPARAM_LAST_UPDATE_TIMESTAMP(dparam) = timestamp;
GST_DPARAM_NEXT_UPDATE_TIMESTAMP(dparam) = timestamp;
@ -266,7 +270,7 @@ gst_dpsmooth_do_update_float (GstDParam *dparam, gint64 timestamp, GValue *value
GST_DPARAM_LAST_UPDATE_TIMESTAMP(dparam) = timestamp;
GST_DPARAM_NEXT_UPDATE_TIMESTAMP(dparam) = dpsmooth->start_interp + dpsmooth->update_period;
GST_DEBUG(GST_CAT_PARAMS, "interp started at %lld", timestamp);
GST_DEBUG(GST_CAT_PARAMS, "interp started at %" G_GINT64_FORMAT, timestamp);
GST_DPARAM_UNLOCK(dparam);
return;
@ -275,7 +279,7 @@ gst_dpsmooth_do_update_float (GstDParam *dparam, gint64 timestamp, GValue *value
time_ratio = (gfloat)(timestamp - dpsmooth->start_interp) / (gfloat)dpsmooth->duration_interp;
GST_DEBUG(GST_CAT_PARAMS, "start:%lld current:%lld end:%lld ratio%f", dpsmooth->start_interp, timestamp, dpsmooth->end_interp, time_ratio);
GST_DEBUG(GST_CAT_PARAMS, "start:%" G_GINT64_FORMAT " current:%" G_GINT64_FORMAT " end:%" G_GINT64_FORMAT " ratio%f", dpsmooth->start_interp, timestamp, dpsmooth->end_interp, time_ratio);
GST_DEBUG(GST_CAT_PARAMS, "pre start:%f current:%f target:%f", dpsmooth->start_float, dpsmooth->current_float, dparam->value_float);
dpsmooth->current_float = dpsmooth->start_float + (dpsmooth->diff_float * time_ratio);

View file

@ -810,7 +810,10 @@ gst_dpman_preprocess_asynchronous(GstDParamManager *dpman, guint frames, gint64
dpwrap->next_update_frame = (guint)(current_time - timestamp) / dpman->rate_ratio;
updates_pending = TRUE;
GST_DEBUG(GST_CAT_PARAMS, "timestamp start: %lld end: %lld current: %lld",
GST_DEBUG(GST_CAT_PARAMS, "timestamp start: %"
G_GINT64_FORMAT " end: %"
G_GINT64_FORMAT " current: %"
G_GINT64_FORMAT,
timestamp, dpman->time_buffer_ends, current_time);
}

View file

@ -268,7 +268,8 @@ gst_aggregator_push (GstAggregator *aggregator, GstPad *pad, GstBuffer *buf, guc
if (!aggregator->silent) {
g_free (aggregator->last_message);
aggregator->last_message = g_strdup_printf ("%10.10s ******* (%s:%s)a (%d bytes, %llu)",
aggregator->last_message = g_strdup_printf ("%10.10s ******* (%s:%s)a (%d bytes, %"
G_GUINT64_FORMAT ")",
debug, GST_DEBUG_PAD_NAME (pad), GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf));
g_object_notify (G_OBJECT (aggregator), "last_message");

View file

@ -291,7 +291,8 @@ gst_fakesink_chain (GstPad *pad, GstBuffer *buf)
if (!fakesink->silent) {
g_free (fakesink->last_message);
fakesink->last_message = g_strdup_printf ("chain ******* (%s:%s)< (%d bytes, %lld, %d) %p",
fakesink->last_message = g_strdup_printf ("chain ******* (%s:%s)< (%d bytes, %"
G_GINT64_FORMAT ", %d) %p",
GST_DEBUG_PAD_NAME (pad), GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf),
GST_BUFFER_FLAGS (buf), buf);

View file

@ -763,7 +763,8 @@ gst_fakesrc_get(GstPad *pad)
if (!src->silent) {
g_free (src->last_message);
src->last_message = g_strdup_printf ("get ******* (%s:%s)> (%d bytes, %llu) %p",
src->last_message = g_strdup_printf ("get ******* (%s:%s)> (%d bytes, %"
G_GUINT64_FORMAT " ) %p",
GST_DEBUG_PAD_NAME (pad), GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf), buf);
g_object_notify (G_OBJECT (src), "last_message");

View file

@ -367,8 +367,11 @@ gst_filesrc_free_parent_mmap (GstBuffer *buf)
#endif
/* now unmap the memory */
munmap (GST_BUFFER_DATA (buf), GST_BUFFER_MAXSIZE (buf));
GST_DEBUG (0, "unmapped region %08llx+%08llx at %p",
GST_BUFFER_OFFSET (buf), GST_BUFFER_MAXSIZE (buf),
/* cast to unsigned long, since there's no gportable way to print
* guint64 as hex */
GST_DEBUG (0, "unmapped region %08lx+%08lx at %p",
(unsigned long) GST_BUFFER_OFFSET (buf),
(unsigned long) GST_BUFFER_MAXSIZE (buf),
GST_BUFFER_DATA (buf));
GST_BUFFER_DATA (buf) = NULL;
@ -397,8 +400,8 @@ gst_filesrc_map_region (GstFileSrc *src, off_t offset, size_t size)
size, src->fd, offset, strerror (errno));
return NULL;
}
GST_DEBUG (0, "mapped region %08llx+%08x from file into memory at %p",
offset, size, mmapregion);
GST_DEBUG (0, "mapped region %08lx+%08lx from file into memory at %p",
(unsigned long)offset, (unsigned long)size, mmapregion);
/* time to allocate a new mapbuf */
buf = gst_buffer_new ();
@ -514,7 +517,8 @@ gst_filesrc_get (GstPad *pad)
/* check for EOF */
if (src->curoffset == src->filelen) {
GST_DEBUG (0, "filesrc eos %lld %lld", src->curoffset, src->filelen);
GST_DEBUG (0, "filesrc eos %" G_GINT64_FORMAT
" %" G_GINT64_FORMAT, src->curoffset, src->filelen);
gst_element_set_eos (GST_ELEMENT (src));
return GST_BUFFER (gst_event_new (GST_EVENT_EOS));
}
@ -531,8 +535,9 @@ gst_filesrc_get (GstPad *pad)
readend = src->curoffset + readsize;
}
GST_DEBUG (0, "attempting to read %08x, %08llx, %08llx, %08llx",
readsize, readend, mapstart, mapend);
GST_DEBUG (0, "attempting to read %08lx, %08lx, %08lx, %08lx",
(unsigned long)readsize, (unsigned long)readend,
(unsigned long)mapstart, (unsigned long)mapend);
/* if the start is past the mapstart */
if (src->curoffset >= mapstart) {
@ -787,19 +792,19 @@ gst_filesrc_srcpad_event (GstPad *pad, GstEvent *event)
if (offset > src->filelen)
goto error;
src->curoffset = offset;
GST_DEBUG(0, "seek set pending to %lld", src->curoffset);
GST_DEBUG(0, "seek set pending to %" G_GINT64_FORMAT, src->curoffset);
break;
case GST_SEEK_METHOD_CUR:
if (offset + src->curoffset > src->filelen)
goto error;
src->curoffset += offset;
GST_DEBUG(0, "seek cur pending to %lld", src->curoffset);
GST_DEBUG(0, "seek cur pending to %" G_GINT64_FORMAT, src->curoffset);
break;
case GST_SEEK_METHOD_END:
if (ABS (offset) > src->filelen)
goto error;
src->curoffset = src->filelen - ABS (offset);
GST_DEBUG(0, "seek end pending to %lld", src->curoffset);
GST_DEBUG(0, "seek end pending to %" G_GINT64_FORMAT, src->curoffset);
break;
default:
goto error;

View file

@ -220,7 +220,8 @@ gst_identity_chain (GstPad *pad, GstBuffer *buf)
if (identity->last_message != NULL) {
g_free (identity->last_message);
}
identity->last_message = g_strdup_printf ("dropping ******* (%s:%s)i (%d bytes, %llu)",
identity->last_message = g_strdup_printf ("dropping ******* (%s:%s)i (%d bytes, %"
G_GINT64_FORMAT ")",
GST_DEBUG_PAD_NAME (identity->sinkpad), GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf));
g_object_notify (G_OBJECT (identity), "last-message");
gst_buffer_unref (buf);
@ -234,7 +235,8 @@ gst_identity_chain (GstPad *pad, GstBuffer *buf)
for (i = identity->duplicate; i; i--) {
if (!identity->silent) {
g_free (identity->last_message);
identity->last_message = g_strdup_printf ("chain ******* (%s:%s)i (%d bytes, %llu)",
identity->last_message = g_strdup_printf ("chain ******* (%s:%s)i (%d bytes, %"
G_GINT64_FORMAT ")",
GST_DEBUG_PAD_NAME (identity->sinkpad), GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf));
g_object_notify (G_OBJECT (identity), "last-message");
}

View file

@ -208,7 +208,9 @@ print_stats(gboolean first, const gchar *name, const gchar *type, stats *base, s
delta.bytes = final->bytes - base->bytes;
delta.events = final->events - base->events;
g_print("%s: (%s) %s: s:%g buffers:%lld bytes:%lld events:%lld\n",
g_print("%s: (%s) %s: s:%g buffers:%" G_GINT64_FORMAT
" bytes:%" G_GINT64_FORMAT
" events:%" G_GINT64_FORMAT "\n",
first ? header0 : headerN,
name, type, time,
final->buffers,

View file

@ -301,7 +301,8 @@ gst_tee_chain (GstPad *pad, GstBuffer *buf)
if (!tee->silent) {
g_free (tee->last_message);
tee->last_message = g_strdup_printf ("chain ******* (%s:%s)t (%d bytes, %llu) %p",
tee->last_message = g_strdup_printf ("chain ******* (%s:%s)t (%d bytes, %"
G_GUINT64_FORMAT ") %p",
GST_DEBUG_PAD_NAME (outpad), GST_BUFFER_SIZE (buf), GST_BUFFER_TIMESTAMP (buf), buf);
g_object_notify (G_OBJECT (tee), "last_message");
}

View file

@ -28,7 +28,7 @@ void handoff_sink(GstElement *sink, GstBuffer *buf, gpointer user_data) {
avg_ns = (guint)(1000.0*(double)avg/(double)mhz);
if ((count % print_del) == 0) {
g_print("%07d:%08lld min:%08lld max:%08lld avg:%08lld avg-s:0.%09d\r",
g_print("%07d:%08" G_GUINT64_FORMAT " min:%08" G_GUINT64_FORMAT " max:%08" G_GUINT64_FORMAT " avg:%08" G_GUINT64_FORMAT " avg-s:0.%09d\r",
count, d, min, max, avg, avg_ns);
}
}

View file

@ -68,7 +68,7 @@ main (gint argc, gchar *argv[])
for(t=0; t < num_threads; t++) {
error = NULL;
threads[t] = g_thread_create (run_test, (void *)t, TRUE, &error);
threads[t] = g_thread_create (run_test, GINT_TO_POINTER(t), TRUE, &error);
if (error) {
printf ("ERROR: g_thread_create () is %s\n", error->message);
exit (-1);

View file

@ -63,7 +63,7 @@ main (gint argc, gchar *argv[])
for(t=0; t < num_threads; t++) {
error = NULL;
threads[t] = g_thread_create (run_test, (void *)t, TRUE, &error);
threads[t] = g_thread_create (run_test, GINT_TO_POINTER(t), TRUE, &error);
if (error) {
printf ("ERROR: g_thread_create() %s\n", error->message);
exit (-1);

View file

@ -5,7 +5,7 @@ gboolean playing = TRUE;
static void
handoff_signal (GstElement *element, GstBuffer *buf)
{
g_print ("handoff \"%s\" %llu\n", gst_element_get_name (element), GST_BUFFER_TIMESTAMP (buf));
g_print ("handoff \"%s\" %" G_GINT64_FORMAT "\n", gst_element_get_name (element), GST_BUFFER_TIMESTAMP (buf));
}
static void

View file

@ -60,9 +60,9 @@ main (gint argc, gchar *argv[])
format = GST_FORMAT_DEFAULT;
gst_pad_query (pad, GST_QUERY_START, &format, &value);
g_print ("configured for start %lld\n", value);
g_print ("configured for start %" G_GINT64_FORMAT "\n", value);
gst_pad_query (pad, GST_QUERY_SEGMENT_END, &format, &value);
g_print ("configured segment end %lld\n", value);
g_print ("configured segment end %" G_GINT64_FORMAT "\n", value);
gst_element_set_state (pipeline, GST_STATE_PLAYING);
@ -83,9 +83,9 @@ main (gint argc, gchar *argv[])
g_signal_connect (G_OBJECT (gst_element_get_pad (fakesink, "sink")), "event_received", G_CALLBACK (event_received), event);
gst_pad_query (pad, GST_QUERY_START, &format, &value);
g_print ("configured for start %lld\n", value);
g_print ("configured for start %" G_GINT64_FORMAT "\n", value);
gst_pad_query (pad, GST_QUERY_SEGMENT_END, &format, &value);
g_print ("configured segment end %lld\n", value);
g_print ("configured segment end %" G_GINT64_FORMAT "\n", value);
gst_element_set_state (pipeline, GST_STATE_PLAYING);

View file

@ -311,7 +311,7 @@ print_element_properties (GstElement *element)
{
GParamSpecUInt64 *puint64 = G_PARAM_SPEC_UINT64 (param);
g_print("%-23.23s Unsigned Integer64. ", "");
if (readable) g_print("Range: %llu - %llu (Default %llu)",
if (readable) g_print("Range: %" G_GUINT64_FORMAT " - %" G_GUINT64_FORMAT " (Default %" G_GUINT64_FORMAT ")",
puint64->minimum, puint64->maximum, g_value_get_uint64 (&value));
break;
}
@ -319,7 +319,7 @@ print_element_properties (GstElement *element)
{
GParamSpecInt64 *pint64 = G_PARAM_SPEC_INT64 (param);
g_print("%-23.23s Integer64. ", "");
if (readable) g_print("Range: %lld - %lld (Default %lld)",
if (readable) g_print("Range: %" G_GINT64_FORMAT " - %" G_GINT64_FORMAT " (Default %" G_GINT64_FORMAT ")",
pint64->minimum, pint64->maximum, g_value_get_int64 (&value));
break;
}
@ -680,7 +680,7 @@ print_element_info (GstElementFactory *factory)
switch (G_PARAM_SPEC_VALUE_TYPE (specs[x])) {
case G_TYPE_INT64:
g_print ("64 Bit Integer (Default %lld, Range %lld -> %lld)",
g_print ("64 Bit Integer (Default %" G_GINT64_FORMAT ", Range %" G_GINT64_FORMAT " -> %" G_GINT64_FORMAT ")",
((GParamSpecInt64 *) specs[x])->default_value,
((GParamSpecInt64 *) specs[x])->minimum,
((GParamSpecInt64 *) specs[x])->maximum);

View file

@ -18,7 +18,7 @@ idle_func (gpointer data)
GstClockTimeDiff diff;
if (s_clock) {
//g_print ("%lld\n", gst_clock_get_time (s_clock));
//g_print ("%" G_GINT64_FORMAT "\n", gst_clock_get_time (s_clock));
}
g_get_current_time (&tfthen);
@ -35,7 +35,7 @@ idle_func (gpointer data)
if (!busy) {
gst_main_quit ();
g_print ("execution ended after %llu iterations (sum %llu ns, average %llu ns, min %llu ns, max %llu ns)\n",
g_print ("execution ended after %" G_GUINT64_FORMAT " iterations (sum %" G_GUINT64_FORMAT " ns, average %" G_GUINT64_FORMAT " ns, min %" G_GUINT64_FORMAT " ns, max %" G_GUINT64_FORMAT " ns)\n",
iterations, sum, sum/iterations, min, max);
}