diff options
author | David Schleef <ds@schleef.org> | 2010-06-02 12:16:56 -0700 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2010-06-02 12:16:56 -0700 |
commit | 9564562fe8a9dd2df4ac1db0df46edf8d6e088b5 (patch) | |
tree | 5956688c255c0600da2d2e14fd6805a4dbdbfe05 /gst-libs | |
parent | 772a6a4abd86a9e3c8b4d257645a0023ffa7cd9d (diff) |
basevideo: make printf formats portable
Diffstat (limited to 'gst-libs')
-rw-r--r-- | gst-libs/gst/video/gstbasevideocodec.c | 5 | ||||
-rw-r--r-- | gst-libs/gst/video/gstbasevideodecoder.c | 38 | ||||
-rw-r--r-- | gst-libs/gst/video/gstbasevideoencoder.c | 3 | ||||
-rw-r--r-- | gst-libs/gst/video/gstbasevideoparse.c | 12 |
4 files changed, 33 insertions, 25 deletions
diff --git a/gst-libs/gst/video/gstbasevideocodec.c b/gst-libs/gst/video/gstbasevideocodec.c index 75d0381e1..ff7fc3954 100644 --- a/gst-libs/gst/video/gstbasevideocodec.c +++ b/gst-libs/gst/video/gstbasevideocodec.c @@ -263,7 +263,7 @@ gst_base_video_codec_src_query (GstPad * pad, GstQuery * query) time = gst_util_uint64_scale (base_codec->system_frame_number, base_codec->state.fps_n, base_codec->state.fps_d); time += base_codec->state.segment.time; - GST_DEBUG ("query position %lld", time); + GST_DEBUG ("query position %" GST_TIME_FORMAT, GST_TIME_ARGS (time)); res = gst_base_video_encoded_video_convert (&base_codec->state, GST_FORMAT_TIME, time, &format, &value); if (!res) @@ -462,7 +462,8 @@ gst_base_video_codec_sink_event (GstPad * pad, GstEvent * event) if (rate <= 0.0) goto newseg_wrong_rate; - GST_DEBUG ("newsegment %lld %lld", start, time); + GST_DEBUG ("newsegment %" GST_TIME_FORMAT " %" GST_TIME_FORMAT, + GST_TIME_ARGS (start), GST_TIME_ARGS (time)); gst_segment_set_newsegment (&base_video_codec->state.segment, update, rate, format, start, stop, time); diff --git a/gst-libs/gst/video/gstbasevideodecoder.c b/gst-libs/gst/video/gstbasevideodecoder.c index f00a2621e..312b4cffd 100644 --- a/gst-libs/gst/video/gstbasevideodecoder.c +++ b/gst-libs/gst/video/gstbasevideodecoder.c @@ -661,8 +661,8 @@ gst_base_video_decoder_add_timestamp (GstBaseVideoDecoder * base_video_decoder, ts = g_malloc (sizeof (Timestamp)); - GST_DEBUG ("adding timestamp %lld %" GST_TIME_FORMAT, - base_video_decoder->input_offset, + GST_DEBUG ("adding timestamp %" GST_TIME_FORMAT " %" GST_TIME_FORMAT, + GST_TIME_ARGS (base_video_decoder->input_offset), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer))); ts->offset = base_video_decoder->input_offset; @@ -699,8 +699,8 @@ gst_base_video_decoder_get_timestamp_at_offset (GstBaseVideoDecoder * } } - GST_DEBUG ("got timestamp %lld %" GST_TIME_FORMAT, - offset, GST_TIME_ARGS (*timestamp)); + GST_DEBUG ("got timestamp %" GST_TIME_FORMAT " %" GST_TIME_FORMAT, + GST_TIME_ARGS (offset), GST_TIME_ARGS (*timestamp)); } static void @@ -814,7 +814,8 @@ gst_base_video_decoder_chain (GstPad * pad, GstBuffer * buf) #if 0 if (base_video_decoder->timestamp_offset == GST_CLOCK_TIME_NONE && GST_BUFFER_TIMESTAMP (buf) != GST_CLOCK_TIME_NONE) { - GST_DEBUG ("got new offset %lld", GST_BUFFER_TIMESTAMP (buf)); + GST_DEBUG ("got new offset %" GST_TIME_FORMAT, + GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf))); base_video_decoder->timestamp_offset = GST_BUFFER_TIMESTAMP (buf); } #endif @@ -951,14 +952,15 @@ gst_base_video_decoder_finish_frame (GstBaseVideoDecoder * base_video_decoder, base_video_decoder_class = GST_BASE_VIDEO_DECODER_GET_CLASS (base_video_decoder); - GST_DEBUG ("finish frame sync=%d pts=%lld", frame->is_sync_point, - frame->presentation_timestamp); + GST_DEBUG ("finish frame sync=%d pts=%" GST_TIME_FORMAT, frame->is_sync_point, + GST_TIME_ARGS (frame->presentation_timestamp)); if (GST_CLOCK_TIME_IS_VALID (frame->presentation_timestamp)) { if (frame->presentation_timestamp != base_video_decoder->timestamp_offset) { - GST_DEBUG ("sync timestamp %lld diff %lld", - frame->presentation_timestamp, - frame->presentation_timestamp - base_video_decoder->segment.start); + GST_DEBUG ("sync timestamp %" GST_TIME_FORMAT " diff %" GST_TIME_FORMAT, + GST_TIME_ARGS (frame->presentation_timestamp), + GST_TIME_ARGS (frame->presentation_timestamp - + base_video_decoder->segment.start)); base_video_decoder->timestamp_offset = frame->presentation_timestamp; base_video_decoder->field_index = 0; } else { @@ -999,8 +1001,9 @@ gst_base_video_decoder_finish_frame (GstBaseVideoDecoder * base_video_decoder, if (GST_CLOCK_TIME_IS_VALID (base_video_decoder->last_timestamp)) { if (frame->presentation_timestamp < base_video_decoder->last_timestamp) { - GST_WARNING ("decreasing timestamp (%lld < %lld)", - frame->presentation_timestamp, base_video_decoder->last_timestamp); + GST_WARNING ("decreasing timestamp (%" GST_TIME_FORMAT " < %" + GST_TIME_FORMAT ")", GST_TIME_ARGS (frame->presentation_timestamp), + GST_TIME_ARGS (base_video_decoder->last_timestamp)); } } base_video_decoder->last_timestamp = frame->presentation_timestamp; @@ -1107,14 +1110,15 @@ gst_base_video_decoder_skip_frame (GstBaseVideoDecoder * base_video_decoder, base_video_decoder_class = GST_BASE_VIDEO_DECODER_GET_CLASS (base_video_decoder); - GST_DEBUG ("finish frame sync=%d pts=%lld", frame->is_sync_point, - frame->presentation_timestamp); + GST_DEBUG ("finish frame sync=%d pts=%" GST_TIME_FORMAT, frame->is_sync_point, + GST_TIME_ARGS (frame->presentation_timestamp)); if (GST_CLOCK_TIME_IS_VALID (frame->presentation_timestamp)) { if (frame->presentation_timestamp != base_video_decoder->timestamp_offset) { - GST_DEBUG ("sync timestamp %lld diff %lld", - frame->presentation_timestamp, - frame->presentation_timestamp - base_video_decoder->segment.start); + GST_DEBUG ("sync timestamp %" GST_TIME_FORMAT " diff %" GST_TIME_FORMAT, + GST_TIME_ARGS (frame->presentation_timestamp), + GST_TIME_ARGS (frame->presentation_timestamp - + base_video_decoder->segment.start)); base_video_decoder->timestamp_offset = frame->presentation_timestamp; base_video_decoder->field_index = 0; } else { diff --git a/gst-libs/gst/video/gstbasevideoencoder.c b/gst-libs/gst/video/gstbasevideoencoder.c index 4d68c9ba4..01688146c 100644 --- a/gst-libs/gst/video/gstbasevideoencoder.c +++ b/gst-libs/gst/video/gstbasevideoencoder.c @@ -181,7 +181,8 @@ gst_base_video_encoder_sink_event (GstPad * pad, GstEvent * event) if (format != GST_FORMAT_TIME) goto newseg_wrong_format; - GST_DEBUG ("new segment %lld %lld", start, position); + GST_DEBUG ("new segment %" GST_TIME_FORMAT " %" GST_TIME_FORMAT, + GST_TIME_ARGS (start), GST_TIME_ARGS (position)); gst_segment_set_newsegment_full (&base_video_encoder->segment, update, rate, applied_rate, format, start, stop, position); diff --git a/gst-libs/gst/video/gstbasevideoparse.c b/gst-libs/gst/video/gstbasevideoparse.c index 468ee6872..44fcfe2d8 100644 --- a/gst-libs/gst/video/gstbasevideoparse.c +++ b/gst-libs/gst/video/gstbasevideoparse.c @@ -279,7 +279,7 @@ gst_base_video_parse_src_query (GstPad * pad, GstQuery * query) time = gst_util_uint64_scale (base_parse->presentation_frame_number, base_parse->state.fps_n, base_parse->state.fps_d); time += base_parse->segment.time; - GST_DEBUG ("query position %lld", time); + GST_DEBUG ("query position %" GST_TIME_FORMAT, GST_TIME_ARGS (time)); res = gst_base_video_encoded_video_convert (&base_parse->state, GST_FORMAT_TIME, time, &format, &value); if (!res) @@ -484,7 +484,8 @@ gst_base_video_parse_sink_event (GstPad * pad, GstEvent * event) if (rate <= 0.0) goto newseg_wrong_rate; - GST_DEBUG ("newsegment %lld %lld", start, time); + GST_DEBUG ("newsegment %" GST_TIME_FORMAT " %" GST_TIME_FORMAT, + GST_TIME_ARGS (start), GST_TIME_ARGS (time)); gst_segment_set_newsegment (&base_video_parse->segment, update, rate, format, start, stop, time); @@ -847,9 +848,10 @@ gst_base_video_parse_push (GstBaseVideoParse * base_video_parse, } gst_buffer_set_caps (buffer, base_video_parse->caps); - GST_DEBUG ("pushing ts=%lld dur=%lld off=%lld off_end=%lld", - GST_BUFFER_TIMESTAMP (buffer), - GST_BUFFER_DURATION (buffer), + GST_DEBUG ("pushing ts=%" GST_TIME_FORMAT " dur=%" GST_TIME_FORMAT + " off=%" G_GUINT64_FORMAT " off_end=%" G_GUINT64_FORMAT, + GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)), + GST_TIME_ARGS (GST_BUFFER_DURATION (buffer)), GST_BUFFER_OFFSET (buffer), GST_BUFFER_OFFSET_END (buffer)); if (base_video_parse->discont) { |