From af075a225edc056b6ad46cd164db927776e7bf33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Tue, 6 Aug 2024 10:59:32 +0200 Subject: [PATCH] va: replace %d for %u format for system_frame_number guint32 variable And also fixed the format for other less frequently printed variables. Part-of: --- .../gst-plugins-bad/sys/va/gstvaav1dec.c | 4 ++-- .../gst-plugins-bad/sys/va/gstvaav1enc.c | 14 +++++++------- .../gst-plugins-bad/sys/va/gstvabaseenc.c | 8 ++++---- .../gst-plugins-bad/sys/va/gstvah264enc.c | 12 ++++++------ .../gst-plugins-bad/sys/va/gstvah265enc.c | 12 ++++++------ .../gst-plugins-bad/sys/va/gstvavp8dec.c | 4 ++-- .../gst-plugins-bad/sys/va/gstvavp9enc.c | 18 +++++++++--------- 7 files changed, 36 insertions(+), 36 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/va/gstvaav1dec.c b/subprojects/gst-plugins-bad/sys/va/gstvaav1dec.c index 5730d2ac96..0952d8376b 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvaav1dec.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvaav1dec.c @@ -922,7 +922,7 @@ gst_va_av1_dec_end_picture (GstAV1Decoder * decoder, GstAV1Picture * picture) GstVaBaseDec *base = GST_VA_BASE_DEC (decoder); GstVaDecodePicture *va_pic; - GST_LOG_OBJECT (self, "end picture %p, (system_frame_number %d)", + GST_LOG_OBJECT (self, "end picture %p, (system_frame_number %u)", picture, GST_CODEC_PICTURE_FRAME_NUMBER (picture)); va_pic = gst_av1_picture_get_user_data (picture); @@ -949,7 +949,7 @@ gst_va_av1_dec_output_picture (GstAV1Decoder * decoder, picture->frame_hdr.show_existing_frame); GST_LOG_OBJECT (self, - "Outputting picture %p (system_frame_number %d)", + "Outputting picture %p (system_frame_number %u)", picture, codec_picture->system_frame_number); if (picture->frame_hdr.show_existing_frame) { diff --git a/subprojects/gst-plugins-bad/sys/va/gstvaav1enc.c b/subprojects/gst-plugins-bad/sys/va/gstvaav1enc.c index dc249b2fd6..ce6ec5da84 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvaav1enc.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvaav1enc.c @@ -1335,7 +1335,7 @@ gst_va_av1_enc_reorder_frame (GstVaBaseEnc * base, GstVideoCodecFrame * frame, va_frame->frame_num = self->gop.frame_num_since_kf; self->gop.frame_num_since_kf++; - GST_LOG_OBJECT (self, "push frame: system_frame_number %d, frame_num: %d", + GST_LOG_OBJECT (self, "push frame: system_frame_number %u, frame_num: %d", frame->system_frame_number, va_frame->frame_num); /* A new key frame force to finish the current GF group. */ @@ -1377,7 +1377,7 @@ gst_va_av1_enc_reorder_frame (GstVaBaseEnc * base, GstVideoCodecFrame * frame, if (!_av1_gf_group_push_frame (&self->gop.current_group, frame)) { GST_WARNING_OBJECT (base, "Failed to push the frame," - " system_frame_number %d.", frame->system_frame_number); + " system_frame_number %u.", frame->system_frame_number); goto error; } @@ -1391,7 +1391,7 @@ pop: finish: if (*out_frame) { va_frame = _enc_frame (*out_frame); - GST_LOG_OBJECT (self, "pop frame: system_frame_number %d," + GST_LOG_OBJECT (self, "pop frame: system_frame_number %u," " frame_num: %d, frame_type %s", (*out_frame)->system_frame_number, va_frame->frame_num, _av1_get_frame_type_name (va_frame->type)); } @@ -1401,7 +1401,7 @@ finish: error: if (frame) { GST_ERROR_OBJECT (base, "Failed to reorder the frame," - " system_frame_number %d.", frame->system_frame_number); + " system_frame_number %u.", frame->system_frame_number); } else { GST_ERROR_OBJECT (base, "error when poping frame."); } @@ -3864,7 +3864,7 @@ gst_va_av1_enc_encode_frame (GstVaBaseEnc * base, if (!_av1_assign_ref_index (self, gst_frame)) { GST_ERROR_OBJECT (self, "Failed to assign reference for frame:" - "system_frame_number %d, frame_num: %d, frame_type %s", + "system_frame_number %u, frame_num: %d, frame_type %s", gst_frame->system_frame_number, va_frame->frame_num, _av1_get_frame_type_name (va_frame->type)); return GST_FLOW_ERROR; @@ -3978,7 +3978,7 @@ _av1_create_tu_output_buffer (GstVaAV1Enc * self, frame_enc->base.picture, data + offset, total_sz - offset); if (frame_size <= 0) { GST_ERROR_OBJECT (self, "Fails to copy the output data of " - "system_frame_number %d, frame_num: %d", + "system_frame_number %u, frame_num: %d", self->frames_in_tu[num]->system_frame_number, frame_enc->frame_num); goto error; } @@ -3998,7 +3998,7 @@ _av1_create_tu_output_buffer (GstVaAV1Enc * self, frame_enc->base.picture, data + offset, total_sz - offset); if (frame_size <= 0) { GST_ERROR_OBJECT (self, "Fails to copy the output data of " - "system_frame_number %d, frame_num: %d", + "system_frame_number %u, frame_num: %d", last_frame->system_frame_number, frame_enc->frame_num); goto error; } diff --git a/subprojects/gst-plugins-bad/sys/va/gstvabaseenc.c b/subprojects/gst-plugins-bad/sys/va/gstvabaseenc.c index f6ddaf8204..7a4f2d67c0 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvabaseenc.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvabaseenc.c @@ -463,7 +463,7 @@ _push_buffer_to_downstream (GstVaBaseEnc * base, GstVideoCodecFrame * frame) } if (frame->output_buffer) - GST_LOG_OBJECT (base, "Push to downstream: frame system_frame_number: %d," + GST_LOG_OBJECT (base, "Push to downstream: frame system_frame_number: %u," " pts: %" GST_TIME_FORMAT ", dts: %" GST_TIME_FORMAT " duration: %" GST_TIME_FORMAT ", buffer size: %" G_GSIZE_FORMAT, frame->system_frame_number, GST_TIME_ARGS (frame->pts), @@ -503,7 +503,7 @@ _push_out_one_buffer (GstVaBaseEnc * base) if (ret != GST_FLOW_OK) { GST_DEBUG_OBJECT (base, "fails to push one buffer, system_frame_number " - "%d: %s", system_frame_number, gst_flow_get_name (ret)); + "%u: %s", system_frame_number, gst_flow_get_name (ret)); } return ret; @@ -527,7 +527,7 @@ _try_to_push_out_one_buffer (GstVaBaseEnc * base) ready = va_check_surface_has_status (base->display, surface, VASurfaceReady); - GST_LOG_OBJECT (base, "Output of system_frame_number %d is %s", + GST_LOG_OBJECT (base, "Output of system_frame_number %u is %s", frame_out->system_frame_number, ready ? "ready" : "not ready"); if (!ready) @@ -657,7 +657,7 @@ gst_va_base_enc_handle_frame (GstVideoEncoder * venc, GstVideoCodecFrame *frame_encode = NULL; GST_LOG_OBJECT (venc, - "handle frame id %d, dts %" GST_TIME_FORMAT ", pts %" GST_TIME_FORMAT, + "handle frame id %u, dts %" GST_TIME_FORMAT ", pts %" GST_TIME_FORMAT, frame->system_frame_number, GST_TIME_ARGS (GST_BUFFER_DTS (frame->input_buffer)), GST_TIME_ARGS (GST_BUFFER_PTS (frame->input_buffer))); diff --git a/subprojects/gst-plugins-bad/sys/va/gstvah264enc.c b/subprojects/gst-plugins-bad/sys/va/gstvah264enc.c index cb3636618e..b318b2589f 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvah264enc.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvah264enc.c @@ -1759,7 +1759,7 @@ _push_one_frame (GstVaBaseEnc * base, GstVideoCodecFrame * gst_frame, if (GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME (gst_frame) && !(self->gop.cur_frame_index == 0 || self->gop.cur_frame_index == self->gop.idr_period)) { - GST_DEBUG_OBJECT (base, "system_frame_number: %d is a force key " + GST_DEBUG_OBJECT (base, "system_frame_number: %u is a force key" "frame(IDR), begin a new GOP.", gst_frame->system_frame_number); frame->poc = 0; @@ -1797,7 +1797,7 @@ _push_one_frame (GstVaBaseEnc * base, GstVideoCodecFrame * gst_frame, /* TODO: move most this logic onto vabaseenc class */ if (self->gop.cur_frame_index == 0) { g_assert (frame->poc == 0); - GST_LOG_OBJECT (self, "system_frame_number: %d, an IDR frame, starts" + GST_LOG_OBJECT (self, "system_frame_number: %u, an IDR frame, starts" " a new GOP", gst_frame->system_frame_number); g_queue_clear_full (&base->ref_list, @@ -1806,7 +1806,7 @@ _push_one_frame (GstVaBaseEnc * base, GstVideoCodecFrame * gst_frame, frame_setup_from_gop (self, frame, self->gop.cur_frame_index); - GST_LOG_OBJECT (self, "Push frame, system_frame_number: %d, poc %d, " + GST_LOG_OBJECT (self, "Push frame, system_frame_number: %u, poc %d, " "frame type %s", gst_frame->system_frame_number, frame->poc, gst_h264_slice_type_to_string (frame->type)); @@ -2028,11 +2028,11 @@ get_one: if (self->gop.b_pyramid && vaframe->type == GST_H264_B_SLICE) { GST_LOG_OBJECT (self, "pop a pyramid B frame with system_frame_number:" - " %d, poc: %d, frame num: %d, is_ref: %s, level %d", + " %u, poc: %d, frame num: %d, is_ref: %s, level %u", frame->system_frame_number, vaframe->poc, vaframe->frame_num, vaframe->is_ref ? "true" : "false", vaframe->pyramid_level); } else { - GST_LOG_OBJECT (self, "pop a frame with system_frame_number: %d," + GST_LOG_OBJECT (self, "pop a frame with system_frame_number: %u," " frame type: %s, poc: %d, frame num: %d, is_ref: %s", frame->system_frame_number, gst_h264_slice_type_to_string (vaframe->type), @@ -2051,7 +2051,7 @@ gst_va_h264_enc_reorder_frame (GstVaBaseEnc * base, GstVideoCodecFrame * frame, { if (!_push_one_frame (base, frame, bump_all)) { GST_ERROR_OBJECT (base, "Failed to push the input frame" - " system_frame_number: %d into the reorder list", + " system_frame_number: %u into the reorder list", frame->system_frame_number); *out_frame = NULL; diff --git a/subprojects/gst-plugins-bad/sys/va/gstvah265enc.c b/subprojects/gst-plugins-bad/sys/va/gstvah265enc.c index 71ac07b77a..a54065ee8a 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvah265enc.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvah265enc.c @@ -2036,7 +2036,7 @@ _h265_push_one_frame (GstVaBaseEnc * base, GstVideoCodecFrame * gst_frame, if (GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME (gst_frame) && !(self->gop.cur_frame_index == 0 || self->gop.cur_frame_index == self->gop.idr_period)) { - GST_DEBUG_OBJECT (base, "system_frame_number: %d is a force key " + GST_DEBUG_OBJECT (base, "system_frame_number: %u is a force key " "frame(IDR), begin a new GOP.", gst_frame->system_frame_number); frame->poc = 0; @@ -2071,7 +2071,7 @@ _h265_push_one_frame (GstVaBaseEnc * base, GstVideoCodecFrame * gst_frame, if (self->gop.cur_frame_index == 0) { g_assert (frame->poc == 0); - GST_LOG_OBJECT (self, "system_frame_number: %d, an IDR frame, starts" + GST_LOG_OBJECT (self, "system_frame_number: %u, an IDR frame, starts" " a new GOP", gst_frame->system_frame_number); g_queue_clear_full (&base->ref_list, @@ -2080,7 +2080,7 @@ _h265_push_one_frame (GstVaBaseEnc * base, GstVideoCodecFrame * gst_frame, frame_setup_from_gop (self, frame, self->gop.cur_frame_index); - GST_LOG_OBJECT (self, "Push frame, system_frame_number: %d, poc %d, " + GST_LOG_OBJECT (self, "Push frame, system_frame_number: %u, poc %d, " "frame type %s", gst_frame->system_frame_number, frame->poc, gst_h265_slice_type_to_string (frame->type)); @@ -2294,11 +2294,11 @@ get_one: if (self->gop.b_pyramid && vaframe->type == GST_H265_B_SLICE) { GST_LOG_OBJECT (self, "pop a pyramid B frame with system_frame_number:" - " %d, poc: %d, is_ref: %s, level %d", + " %u, poc: %d, is_ref: %s, level %d", frame->system_frame_number, vaframe->poc, vaframe->is_ref ? "true" : "false", vaframe->pyramid_level); } else { - GST_LOG_OBJECT (self, "pop a frame with system_frame_number: %d," + GST_LOG_OBJECT (self, "pop a frame with system_frame_number: %u," " frame type: %s, poc: %d, is_ref: %s", frame->system_frame_number, gst_h265_slice_type_to_string (vaframe->type), @@ -2317,7 +2317,7 @@ gst_va_h265_enc_reorder_frame (GstVaBaseEnc * base, GstVideoCodecFrame * frame, { if (!_h265_push_one_frame (base, frame, bump_all)) { GST_ERROR_OBJECT (base, "Failed to push the input frame" - " system_frame_number: %d into the reorder list", + " system_frame_number: %u into the reorder list", frame->system_frame_number); *out_frame = NULL; diff --git a/subprojects/gst-plugins-bad/sys/va/gstvavp8dec.c b/subprojects/gst-plugins-bad/sys/va/gstvavp8dec.c index 46aed56125..9a472b9f68 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvavp8dec.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvavp8dec.c @@ -374,7 +374,7 @@ gst_va_vp8_dec_end_picture (GstVp8Decoder * decoder, GstVp8Picture * picture) GstVaBaseDec *base = GST_VA_BASE_DEC (decoder); GstVaDecodePicture *va_pic; - GST_LOG_OBJECT (base, "end picture %p, (system_frame_number %d)", + GST_LOG_OBJECT (base, "end picture %p, (system_frame_number %u)", picture, GST_CODEC_PICTURE (picture)->system_frame_number); va_pic = gst_vp8_picture_get_user_data (picture); @@ -396,7 +396,7 @@ gst_va_vp8_dec_output_picture (GstVp8Decoder * decoder, gboolean ret; GST_LOG_OBJECT (self, - "Outputting picture %p (system_frame_number %d)", + "Outputting picture %p (system_frame_number %u)", picture, codec_picture->system_frame_number); ret = gst_va_base_dec_process_output (base, frame, diff --git a/subprojects/gst-plugins-bad/sys/va/gstvavp9enc.c b/subprojects/gst-plugins-bad/sys/va/gstvavp9enc.c index 317b66638b..10dafa1f3e 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvavp9enc.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvavp9enc.c @@ -1091,7 +1091,7 @@ gst_va_vp9_enc_reorder_frame (GstVaBaseEnc * base, GstVideoCodecFrame * frame, va_frame->frame_num = self->gop.frame_num_since_kf; self->gop.frame_num_since_kf++; - GST_LOG_OBJECT (self, "push frame: system_frame_number %d, frame_num: %d", + GST_LOG_OBJECT (self, "push frame: system_frame_number %u, frame_num: %d", frame->system_frame_number, va_frame->frame_num); /* A new key frame force to finish the current GF group. */ @@ -1133,7 +1133,7 @@ gst_va_vp9_enc_reorder_frame (GstVaBaseEnc * base, GstVideoCodecFrame * frame, if (!_vp9_gf_group_push_frame (&self->gop.current_group, frame)) { GST_WARNING_OBJECT (base, "Failed to push the frame," - " system_frame_number %d.", frame->system_frame_number); + " system_frame_number %u.", frame->system_frame_number); goto error; } @@ -1147,7 +1147,7 @@ pop: finish: if (*out_frame) { va_frame = _enc_frame (*out_frame); - GST_LOG_OBJECT (self, "pop frame: system_frame_number %d," + GST_LOG_OBJECT (self, "pop frame: system_frame_number %u," " frame_num: %d, frame_type %s", (*out_frame)->system_frame_number, va_frame->frame_num, _vp9_get_frame_type_name (va_frame->type)); } @@ -1157,7 +1157,7 @@ finish: error: if (frame) { GST_ERROR_OBJECT (base, "Failed to reorder the frame," - " system_frame_number %d.", frame->system_frame_number); + " system_frame_number %u.", frame->system_frame_number); } else { GST_ERROR_OBJECT (base, "error when poping frame."); } @@ -2518,7 +2518,7 @@ gst_va_vp9_enc_encode_frame (GstVaBaseEnc * base, if (!_vp9_assign_ref_index (self, gst_frame)) { GST_ERROR_OBJECT (self, "Failed to assign reference for frame:" - "system_frame_number %d, frame_num: %d, frame_type %s", + "system_frame_number %u, frame_num: %d, frame_type %s", gst_frame->system_frame_number, va_frame->frame_num, _vp9_get_frame_type_name (va_frame->type)); return GST_FLOW_ERROR; @@ -2605,7 +2605,7 @@ _vp9_create_super_frame_output_buffer (GstVaVp9Enc * self, frame_enc->base.picture, data + offset, total_sz - offset); if (frame_size[num] <= 0) { GST_ERROR_OBJECT (self, "Fails to copy the output data of " - "system_frame_number %d, frame_num: %d", + "system_frame_number %u, frame_num: %d", self->frames_in_super[num]->system_frame_number, frame_enc->frame_num); goto error; @@ -2619,7 +2619,7 @@ _vp9_create_super_frame_output_buffer (GstVaVp9Enc * self, frame_enc->base.picture, data + offset, total_sz - offset); if (frame_size[num] <= 0) { GST_ERROR_OBJECT (self, "Fails to copy the output data of " - "system_frame_number %d, frame_num: %d", + "system_frame_number %u, frame_num: %d", last_frame->system_frame_number, frame_enc->frame_num); goto error; } @@ -2671,8 +2671,8 @@ gst_va_vp9_enc_prepare_output (GstVaBaseEnc * base, frame_enc = _enc_frame (frame); - GST_LOG_OBJECT (base, "Prepare to output: frame system_frame_number: %d," - "frame_num: %d, frame type: %s, flags: 0x%x, super_num is %d", + GST_LOG_OBJECT (base, "Prepare to output: frame system_frame_number: %u," + "frame_num: %d, frame type: %s, flags: 0x%x, super_num is %u", frame->system_frame_number, frame_enc->frame_num, _vp9_get_frame_type_name (frame_enc->type), frame_enc->flags, self->frames_in_super_num);