From 48300827a18b9145bc5d57afee0520c3b226d50f Mon Sep 17 00:00:00 2001 From: David Schleef Date: Sun, 2 Feb 2003 05:26:29 +0000 Subject: [PATCH] Change %lld, %llu to G_G[U]INT64_FORMAT globally. Fix bad pointer->integer conversion. Original commit message from CVS: Change %lld, %llu to G_G[U]INT64_FORMAT globally. Fix bad pointer->integer conversion. --- ext/artsd/gstartsdsink.c | 2 +- ext/audiofile/gstafparse.c | 2 +- ext/sdl/sdlvideosink.c | 6 +++--- gst-libs/gst/media-info/media-info.c | 7 ++++--- gst-libs/gst/play/play.old.c | 2 +- gst/chart/gstchart.c | 2 +- gst/mpeg1sys/buffer.c | 16 ++++++++-------- gst/mpeg1sys/gstmpeg1systemencode.c | 4 ++-- gst/mpeg1videoparse/gstmp1videoparse.c | 4 ++-- gst/mpeg2sub/gstmpeg2subt.c | 2 +- gst/qtdemux/qtdemux.c | 2 +- 11 files changed, 25 insertions(+), 24 deletions(-) diff --git a/ext/artsd/gstartsdsink.c b/ext/artsd/gstartsdsink.c index cbe6b904c2..a7d1f7f3b7 100644 --- a/ext/artsd/gstartsdsink.c +++ b/ext/artsd/gstartsdsink.c @@ -228,7 +228,7 @@ gst_artsdsink_chain (GstPad *pad, GstBuffer *buf) artsdsink = GST_ARTSDSINK (gst_pad_get_parent (pad)); if (GST_BUFFER_DATA (buf) != NULL) { - gst_trace_add_entry(NULL, 0, buf, "artsdsink: writing to server"); + gst_trace_add_entry(NULL, 0, GPOINTER_TO_INT(buf), "artsdsink: writing to server"); if (!artsdsink->mute && artsdsink->connected) { int bytes; void * bufptr = GST_BUFFER_DATA (buf); diff --git a/ext/audiofile/gstafparse.c b/ext/audiofile/gstafparse.c index 853a52e524..d8840ea5f4 100644 --- a/ext/audiofile/gstafparse.c +++ b/ext/audiofile/gstafparse.c @@ -529,7 +529,7 @@ gst_afparse_vf_tell (AFvirtualfile *vfile) guint64 offset; offset = gst_bytestream_tell(bs); - g_print("doing tell: %llu\n", offset); + g_print("doing tell: %" G_GUINT64_FORMAT "\n", offset); return offset; } diff --git a/ext/sdl/sdlvideosink.c b/ext/sdl/sdlvideosink.c index 67e1ea6129..931d35e2e6 100644 --- a/ext/sdl/sdlvideosink.c +++ b/ext/sdl/sdlvideosink.c @@ -434,8 +434,8 @@ gst_sdlvideosink_chain (GstPad *pad, GstBuffer *buf) switch (GST_EVENT_TYPE (event)) { case GST_EVENT_DISCONTINUOUS: offset = GST_EVENT_DISCONT_OFFSET (event, 0).value; - g_print ("sdl discont %lld\n", offset); - //gst_clock_handle_discont (sdlvideosink->clock, (guint64) GST_EVENT_DISCONT_OFFSET (event, 0).value); + g_print ("sdl discont %" G_GINT64_FORMAT "\n", offset); + /*gst_clock_handle_discont (sdlvideosink->clock, (guint64) GST_EVENT_DISCONT_OFFSET (event, 0).value);*/ break; default: gst_pad_event_default (pad, event); @@ -445,7 +445,7 @@ gst_sdlvideosink_chain (GstPad *pad, GstBuffer *buf) return; } - GST_DEBUG (0,"videosink: clock wait: %llu", GST_BUFFER_TIMESTAMP(buf)); + GST_DEBUG (0,"videosink: clock wait: %" G_GUINT64_FORMAT, GST_BUFFER_TIMESTAMP(buf)); if (sdlvideosink->clock) { GstClockID id = gst_clock_new_single_shot_id (sdlvideosink->clock, GST_BUFFER_TIMESTAMP (buf)); diff --git a/gst-libs/gst/media-info/media-info.c b/gst-libs/gst/media-info/media-info.c index 4e8f56b36d..e2afd51b48 100644 --- a/gst-libs/gst/media-info/media-info.c +++ b/gst-libs/gst/media-info/media-info.c @@ -531,7 +531,7 @@ gst_media_info_get_stream (GstMediaInfo *info, GstMediaInfoStream *stream) { case GST_FORMAT_TIME: stream->length_time = value; - g_print (" total %s: %lld\n", definition->nick, value); + g_print (" total %s: %" G_GINT64_FORMAT "\n", definition->nick, value); break; default: /* separation is necessary because track_format doesn't resolve to @@ -539,7 +539,7 @@ gst_media_info_get_stream (GstMediaInfo *info, GstMediaInfoStream *stream) if (format == track_format) { stream->length_tracks = value; - g_print (" total %s: %lld\n", definition->nick, value); + g_print (" total %s: %" G_GINT64_FORMAT "\n", definition->nick, value); } else g_print ("warning: unhandled format %s\n", definition->nick); @@ -639,7 +639,8 @@ gst_media_info_find_streaminfo (GstMediaInfo *info) { GstPropsEntry *length; /* substract to get the length */ - GMI_DEBUG("DEBUG: start %lld, end %lld\n", value_start, value_end); + GMI_DEBUG("DEBUG: start %" G_GINT64_FORMAT ", end %" + G_GINT64_FORMAT "\n", value_start, value_end); value_end -= value_start; g_print ("DEBUG: length: %d\n", (int) value_end); length = gst_props_entry_new ("length", GST_PROPS_INT ((int) value_end)); diff --git a/gst-libs/gst/play/play.old.c b/gst-libs/gst/play/play.old.c index 4d3daecd35..560bed18cd 100644 --- a/gst-libs/gst/play/play.old.c +++ b/gst-libs/gst/play/play.old.c @@ -587,7 +587,7 @@ gst_play_get_length_callback (GstPlay *play) g_mutex_unlock(play->video_bin_mutex); } if (query_worked){ - g_print("got length %lld\n", value); + g_print("got length %" G_GINT64_FORMAT "\n", value); g_signal_emit (G_OBJECT (play), gst_play_signals [STREAM_LENGTH], 0, value); play->length_nanos = value; return FALSE; diff --git a/gst/chart/gstchart.c b/gst/chart/gstchart.c index da8954ecaf..0e6d9ed1a2 100644 --- a/gst/chart/gstchart.c +++ b/gst/chart/gstchart.c @@ -321,7 +321,7 @@ gst_chart_chain (GstPad *pad, GstBuffer *bufin) GST_DEBUG (0, "input buffer has %d samples", samples_in); if (chart->next_time <= GST_BUFFER_TIMESTAMP (bufin)) { chart->next_time = GST_BUFFER_TIMESTAMP (bufin); - GST_DEBUG (0, "in: %lld", GST_BUFFER_TIMESTAMP (bufin)); + GST_DEBUG (0, "in: %" G_GINT64_FORMAT, GST_BUFFER_TIMESTAMP (bufin)); } chart->samples_since_last_frame += samples_in; diff --git a/gst/mpeg1sys/buffer.c b/gst/mpeg1sys/buffer.c index badf674d00..be4d4f3f03 100644 --- a/gst/mpeg1sys/buffer.c +++ b/gst/mpeg1sys/buffer.c @@ -142,7 +142,7 @@ gulong mpeg1mux_buffer_update_queued(Mpeg1MuxBuffer *mb, guint64 scr) { Mpeg1MuxTimecode *tc; gulong total_queued = 0; - GST_DEBUG (0,"queued in buffer on SCR=%llu", scr); + GST_DEBUG (0,"queued in buffer on SCR=%" G_GUINT64_FORMAT, scr); queued_list = g_list_first(mb->queued_list); while (queued_list) { @@ -153,7 +153,7 @@ gulong mpeg1mux_buffer_update_queued(Mpeg1MuxBuffer *mb, guint64 scr) { queued_list = g_list_first(mb->queued_list); } else { - GST_DEBUG (0,"queued in buffer %ld, %llu", tc->original_length, tc->DTS); + GST_DEBUG (0,"queued in buffer %ld, %" G_GUINT64_FORMAT, tc->original_length, tc->DTS); total_queued += tc->original_length; queued_list = g_list_next(queued_list); } @@ -190,13 +190,13 @@ void mpeg1mux_buffer_shrink(Mpeg1MuxBuffer *mb, gulong size) { else { consumed += tc->length; while (size >= consumed) { - GST_DEBUG (0,"removing timecode: %llu %llu %lu %lu", tc->DTS, tc->PTS, tc->length, consumed); + GST_DEBUG (0,"removing timecode: %" G_GUINT64_FORMAT " %" G_GUINT64_FORMAT " %lu %lu", tc->DTS, tc->PTS, tc->length, consumed); mb->timecode_list = g_list_remove_link(mb->timecode_list, timecode_list); mb->queued_list = g_list_append(mb->queued_list, tc); timecode_list = g_list_first(mb->timecode_list); tc = (Mpeg1MuxTimecode *) timecode_list->data; consumed += tc->length; - GST_DEBUG (0,"next timecode: %llu %llu %lu %lu", tc->DTS, tc->PTS, tc->length, consumed); + GST_DEBUG (0,"next timecode: %" G_GUINT64_FORMAT " %" G_GUINT64_FORMAT " %lu %lu", tc->DTS, tc->PTS, tc->length, consumed); } mb->new_frame = TRUE; GST_DEBUG (0,"leftover frame size from %lu to %lu ", tc->length, consumed-size); @@ -212,7 +212,7 @@ void mpeg1mux_buffer_shrink(Mpeg1MuxBuffer *mb, gulong size) { mb->info.audio.PTS = tc->PTS; mb->next_frame_time = tc->PTS; } - GST_DEBUG (0,"next frame time timecode: %llu %lu", mb->next_frame_time, tc->length); + GST_DEBUG (0,"next frame time timecode: %" G_GUINT64_FORMAT " %lu", mb->next_frame_time, tc->length); /* check buffer consistency */ timecode_list = g_list_first(mb->timecode_list); @@ -301,7 +301,7 @@ static void mpeg1mux_buffer_update_video_info(Mpeg1MuxBuffer *mb) { /* skip the first access unit */ if (mb->info.video.decoding_order != 0) { Mpeg1MuxTimecode *tc; - GST_DEBUG (0,"mpeg1mux::update_video_info: PTS %llu, DTS %llu, length %lu", mb->info.video.current_PTS, + GST_DEBUG (0,"mpeg1mux::update_video_info: PTS %" G_GUINT64_FORMAT ", DTS %" G_GUINT64_FORMAT ", length %lu", mb->info.video.current_PTS, mb->info.video.current_DTS, offset - mb->current_start-3); tc = (Mpeg1MuxTimecode *) g_malloc(sizeof(Mpeg1MuxTimecode)); @@ -427,7 +427,7 @@ static void mpeg1mux_buffer_update_audio_info(Mpeg1MuxBuffer *mb) { mb->info.audio.current_PTS = mb->info.audio.decoding_order * samples [mb->info.audio.layer] / mb->info.audio.samples_per_second * 90. + startup_delay; - GST_DEBUG (0,"mpeg1mux::update_audio_info: PTS %llu, length %u", mb->info.audio.current_PTS, mb->info.audio.framesize); + GST_DEBUG (0,"mpeg1mux::update_audio_info: PTS %" G_GUINT64_FORMAT ", length %u", mb->info.audio.current_PTS, mb->info.audio.framesize); tc->PTS = mb->info.audio.current_PTS; tc->DTS = mb->info.audio.current_PTS; mb->timecode_list = g_list_append(mb->timecode_list, tc); @@ -474,7 +474,7 @@ static void mpeg1mux_buffer_update_audio_info(Mpeg1MuxBuffer *mb) { mb->info.audio.samples_per_second * 90. ; tc->DTS = tc->PTS = mb->info.audio.current_PTS; - GST_DEBUG (0,"mpeg1mux::update_audio_info: PTS %llu, %llu length %lu", mb->info.audio.current_PTS, tc->PTS, tc->length); + GST_DEBUG (0,"mpeg1mux::update_audio_info: PTS %" G_GUINT64_FORMAT ", %" G_GUINT64_FORMAT " length %lu", mb->info.audio.current_PTS, tc->PTS, tc->length); mb->timecode_list = g_list_append(mb->timecode_list, tc); mb->info.audio.decoding_order++; diff --git a/gst/mpeg1sys/gstmpeg1systemencode.c b/gst/mpeg1sys/gstmpeg1systemencode.c index 246a98d4fd..01f32198b9 100644 --- a/gst/mpeg1sys/gstmpeg1systemencode.c +++ b/gst/mpeg1sys/gstmpeg1systemencode.c @@ -217,7 +217,7 @@ gst_system_encode_pick_streams (GList *mta, GstMPEG1SystemEncode *system_encode) { guint64 lowest = ~1; - GST_DEBUG (0, "pick_streams: %lld, %lld", system_encode->video_buffer->next_frame_time, + GST_DEBUG (0, "pick_streams: %" G_GINT64_FORMAT ", %" G_GINT64_FORMAT, system_encode->video_buffer->next_frame_time, system_encode->audio_buffer->next_frame_time); if (system_encode->which_streams & STREAMS_VIDEO) { @@ -327,7 +327,7 @@ gst_system_setup_multiplex (GstMPEG1SystemEncode *system_encode) video_tc = MPEG1MUX_BUFFER_FIRST_TIMECODE(system_encode->video_buffer); audio_tc = MPEG1MUX_BUFFER_FIRST_TIMECODE(system_encode->audio_buffer); - GST_DEBUG (0,"system_encode::video tc %lld, audio tc %lld:", video_tc->DTS, audio_tc->DTS); + GST_DEBUG (0,"system_encode::video tc %" G_GINT64_FORMAT ", audio tc %" G_GINT64_FORMAT ":", video_tc->DTS, audio_tc->DTS); system_encode->delay = ((double)system_encode->sectors_delay + ceil((double)video_tc->length/(double)system_encode->min_packet_data) + diff --git a/gst/mpeg1videoparse/gstmp1videoparse.c b/gst/mpeg1videoparse/gstmp1videoparse.c index c73d6d1bf2..b1a2610f16 100644 --- a/gst/mpeg1videoparse/gstmp1videoparse.c +++ b/gst/mpeg1videoparse/gstmp1videoparse.c @@ -276,7 +276,7 @@ gst_mp1videoparse_real_chain (Mp1VideoParse *mp1videoparse, GstBuffer *buf, GstP data = GST_BUFFER_DATA(mp1videoparse->partialbuf); size = GST_BUFFER_SIZE(mp1videoparse->partialbuf); - GST_DEBUG (0,"mp1videoparse: received buffer of %ld bytes %lld",size, GST_BUFFER_TIMESTAMP(buf)); + GST_DEBUG (0,"mp1videoparse: received buffer of %ld bytes %" G_GINT64_FORMAT,size, GST_BUFFER_TIMESTAMP(buf)); head = GULONG_FROM_BE(*((gulong *)data)); @@ -359,7 +359,7 @@ gst_mp1videoparse_real_chain (Mp1VideoParse *mp1videoparse, GstBuffer *buf, GstP mp1videoparse->in_flush = FALSE; } - GST_DEBUG (0,"mp1videoparse: pushing %d bytes %llu", GST_BUFFER_SIZE(outbuf), GST_BUFFER_TIMESTAMP(outbuf)); + GST_DEBUG (0,"mp1videoparse: pushing %d bytes %" G_GUINT64_FORMAT, GST_BUFFER_SIZE(outbuf), GST_BUFFER_TIMESTAMP(outbuf)); gst_pad_push(outpad, outbuf); GST_DEBUG (0,"mp1videoparse: pushing done"); mp1videoparse->picture_in_buffer = 0; diff --git a/gst/mpeg2sub/gstmpeg2subt.c b/gst/mpeg2sub/gstmpeg2subt.c index c2675224f5..a857a10416 100644 --- a/gst/mpeg2sub/gstmpeg2subt.c +++ b/gst/mpeg2sub/gstmpeg2subt.c @@ -362,7 +362,7 @@ gst_mpeg2subt_chain_subtitle (GstPad *pad, GstBuffer *buf) mpeg2subt->have_title = FALSE; } - GST_DEBUG (0,"presentation time %llu", GST_BUFFER_TIMESTAMP(buf)); + GST_DEBUG (0,"presentation time %" G_GUINT64_FORMAT, GST_BUFFER_TIMESTAMP(buf)); /* deal with partial frame from previous buffer */ if (mpeg2subt->partialbuf) { diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c index 06aae97953..6faa6591b4 100644 --- a/gst/qtdemux/qtdemux.c +++ b/gst/qtdemux/qtdemux.c @@ -322,7 +322,7 @@ gst_qtdemux_loop (GstElement *element) } gst_qtp_read_bytes_atom_head(qtdemux,&atom); - GST_INFO (GST_CAT_PLUGIN_INFO,"gst_qtdemux_loop: atom(%c%c%c%c,%llu,%llu)\n",GST_FOURCC_TO_CHARSEQ(atom.type),atom.start,atom.size); + GST_INFO (GST_CAT_PLUGIN_INFO,"gst_qtdemux_loop: atom(%c%c%c%c,%" G_GUINT64_FORMAT ",%" G_GUINT64_FORMAT")\n",GST_FOURCC_TO_CHARSEQ(atom.type),atom.start,atom.size); atom_type = g_hash_table_lookup (gst_qtp_type_registry,&atom.type); if (!atom_type) {