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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7337>
This commit is contained in:
Víctor Manuel Jáquez Leal 2024-08-06 10:59:32 +02:00
parent 17fc4374b2
commit af075a225e
7 changed files with 36 additions and 36 deletions

View file

@ -922,7 +922,7 @@ gst_va_av1_dec_end_picture (GstAV1Decoder * decoder, GstAV1Picture * picture)
GstVaBaseDec *base = GST_VA_BASE_DEC (decoder); GstVaBaseDec *base = GST_VA_BASE_DEC (decoder);
GstVaDecodePicture *va_pic; 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)); picture, GST_CODEC_PICTURE_FRAME_NUMBER (picture));
va_pic = gst_av1_picture_get_user_data (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); picture->frame_hdr.show_existing_frame);
GST_LOG_OBJECT (self, GST_LOG_OBJECT (self,
"Outputting picture %p (system_frame_number %d)", "Outputting picture %p (system_frame_number %u)",
picture, codec_picture->system_frame_number); picture, codec_picture->system_frame_number);
if (picture->frame_hdr.show_existing_frame) { if (picture->frame_hdr.show_existing_frame) {

View file

@ -1335,7 +1335,7 @@ gst_va_av1_enc_reorder_frame (GstVaBaseEnc * base, GstVideoCodecFrame * frame,
va_frame->frame_num = self->gop.frame_num_since_kf; va_frame->frame_num = self->gop.frame_num_since_kf;
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); frame->system_frame_number, va_frame->frame_num);
/* A new key frame force to finish the current GF group. */ /* 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)) { if (!_av1_gf_group_push_frame (&self->gop.current_group, frame)) {
GST_WARNING_OBJECT (base, "Failed to push the 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; goto error;
} }
@ -1391,7 +1391,7 @@ pop:
finish: finish:
if (*out_frame) { if (*out_frame) {
va_frame = _enc_frame (*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, " frame_num: %d, frame_type %s", (*out_frame)->system_frame_number,
va_frame->frame_num, _av1_get_frame_type_name (va_frame->type)); va_frame->frame_num, _av1_get_frame_type_name (va_frame->type));
} }
@ -1401,7 +1401,7 @@ finish:
error: error:
if (frame) { if (frame) {
GST_ERROR_OBJECT (base, "Failed to reorder the 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 { } else {
GST_ERROR_OBJECT (base, "error when poping frame."); 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)) { if (!_av1_assign_ref_index (self, gst_frame)) {
GST_ERROR_OBJECT (self, "Failed to assign reference for 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, gst_frame->system_frame_number, va_frame->frame_num,
_av1_get_frame_type_name (va_frame->type)); _av1_get_frame_type_name (va_frame->type));
return GST_FLOW_ERROR; return GST_FLOW_ERROR;
@ -3978,7 +3978,7 @@ _av1_create_tu_output_buffer (GstVaAV1Enc * self,
frame_enc->base.picture, data + offset, total_sz - offset); frame_enc->base.picture, data + offset, total_sz - offset);
if (frame_size <= 0) { if (frame_size <= 0) {
GST_ERROR_OBJECT (self, "Fails to copy the output data of " 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); self->frames_in_tu[num]->system_frame_number, frame_enc->frame_num);
goto error; goto error;
} }
@ -3998,7 +3998,7 @@ _av1_create_tu_output_buffer (GstVaAV1Enc * self,
frame_enc->base.picture, data + offset, total_sz - offset); frame_enc->base.picture, data + offset, total_sz - offset);
if (frame_size <= 0) { if (frame_size <= 0) {
GST_ERROR_OBJECT (self, "Fails to copy the output data of " 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); last_frame->system_frame_number, frame_enc->frame_num);
goto error; goto error;
} }

View file

@ -463,7 +463,7 @@ _push_buffer_to_downstream (GstVaBaseEnc * base, GstVideoCodecFrame * frame)
} }
if (frame->output_buffer) 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 " pts: %" GST_TIME_FORMAT ", dts: %" GST_TIME_FORMAT
" duration: %" GST_TIME_FORMAT ", buffer size: %" G_GSIZE_FORMAT, " duration: %" GST_TIME_FORMAT ", buffer size: %" G_GSIZE_FORMAT,
frame->system_frame_number, GST_TIME_ARGS (frame->pts), frame->system_frame_number, GST_TIME_ARGS (frame->pts),
@ -503,7 +503,7 @@ _push_out_one_buffer (GstVaBaseEnc * base)
if (ret != GST_FLOW_OK) { if (ret != GST_FLOW_OK) {
GST_DEBUG_OBJECT (base, "fails to push one buffer, system_frame_number " 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; return ret;
@ -527,7 +527,7 @@ _try_to_push_out_one_buffer (GstVaBaseEnc * base)
ready = va_check_surface_has_status (base->display, surface, VASurfaceReady); 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"); frame_out->system_frame_number, ready ? "ready" : "not ready");
if (!ready) if (!ready)
@ -657,7 +657,7 @@ gst_va_base_enc_handle_frame (GstVideoEncoder * venc,
GstVideoCodecFrame *frame_encode = NULL; GstVideoCodecFrame *frame_encode = NULL;
GST_LOG_OBJECT (venc, 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, frame->system_frame_number,
GST_TIME_ARGS (GST_BUFFER_DTS (frame->input_buffer)), GST_TIME_ARGS (GST_BUFFER_DTS (frame->input_buffer)),
GST_TIME_ARGS (GST_BUFFER_PTS (frame->input_buffer))); GST_TIME_ARGS (GST_BUFFER_PTS (frame->input_buffer)));

View file

@ -1759,7 +1759,7 @@ _push_one_frame (GstVaBaseEnc * base, GstVideoCodecFrame * gst_frame,
if (GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME (gst_frame) && if (GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME (gst_frame) &&
!(self->gop.cur_frame_index == 0 || !(self->gop.cur_frame_index == 0 ||
self->gop.cur_frame_index == self->gop.idr_period)) { 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(IDR), begin a new GOP.", gst_frame->system_frame_number);
frame->poc = 0; frame->poc = 0;
@ -1797,7 +1797,7 @@ _push_one_frame (GstVaBaseEnc * base, GstVideoCodecFrame * gst_frame,
/* TODO: move most this logic onto vabaseenc class */ /* TODO: move most this logic onto vabaseenc class */
if (self->gop.cur_frame_index == 0) { if (self->gop.cur_frame_index == 0) {
g_assert (frame->poc == 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); " a new GOP", gst_frame->system_frame_number);
g_queue_clear_full (&base->ref_list, 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); 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, "frame type %s", gst_frame->system_frame_number, frame->poc,
gst_h264_slice_type_to_string (frame->type)); 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) { if (self->gop.b_pyramid && vaframe->type == GST_H264_B_SLICE) {
GST_LOG_OBJECT (self, "pop a pyramid B frame with system_frame_number:" 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, frame->system_frame_number, vaframe->poc, vaframe->frame_num,
vaframe->is_ref ? "true" : "false", vaframe->pyramid_level); vaframe->is_ref ? "true" : "false", vaframe->pyramid_level);
} else { } 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 type: %s, poc: %d, frame num: %d, is_ref: %s",
frame->system_frame_number, frame->system_frame_number,
gst_h264_slice_type_to_string (vaframe->type), 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)) { if (!_push_one_frame (base, frame, bump_all)) {
GST_ERROR_OBJECT (base, "Failed to push the input frame" 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); frame->system_frame_number);
*out_frame = NULL; *out_frame = NULL;

View file

@ -2036,7 +2036,7 @@ _h265_push_one_frame (GstVaBaseEnc * base, GstVideoCodecFrame * gst_frame,
if (GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME (gst_frame) && if (GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME (gst_frame) &&
!(self->gop.cur_frame_index == 0 || !(self->gop.cur_frame_index == 0 ||
self->gop.cur_frame_index == self->gop.idr_period)) { 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(IDR), begin a new GOP.", gst_frame->system_frame_number);
frame->poc = 0; frame->poc = 0;
@ -2071,7 +2071,7 @@ _h265_push_one_frame (GstVaBaseEnc * base, GstVideoCodecFrame * gst_frame,
if (self->gop.cur_frame_index == 0) { if (self->gop.cur_frame_index == 0) {
g_assert (frame->poc == 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); " a new GOP", gst_frame->system_frame_number);
g_queue_clear_full (&base->ref_list, 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); 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, "frame type %s", gst_frame->system_frame_number, frame->poc,
gst_h265_slice_type_to_string (frame->type)); 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) { if (self->gop.b_pyramid && vaframe->type == GST_H265_B_SLICE) {
GST_LOG_OBJECT (self, "pop a pyramid B frame with system_frame_number:" 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, frame->system_frame_number, vaframe->poc,
vaframe->is_ref ? "true" : "false", vaframe->pyramid_level); vaframe->is_ref ? "true" : "false", vaframe->pyramid_level);
} else { } 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 type: %s, poc: %d, is_ref: %s",
frame->system_frame_number, frame->system_frame_number,
gst_h265_slice_type_to_string (vaframe->type), 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)) { if (!_h265_push_one_frame (base, frame, bump_all)) {
GST_ERROR_OBJECT (base, "Failed to push the input frame" 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); frame->system_frame_number);
*out_frame = NULL; *out_frame = NULL;

View file

@ -374,7 +374,7 @@ gst_va_vp8_dec_end_picture (GstVp8Decoder * decoder, GstVp8Picture * picture)
GstVaBaseDec *base = GST_VA_BASE_DEC (decoder); GstVaBaseDec *base = GST_VA_BASE_DEC (decoder);
GstVaDecodePicture *va_pic; 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); picture, GST_CODEC_PICTURE (picture)->system_frame_number);
va_pic = gst_vp8_picture_get_user_data (picture); va_pic = gst_vp8_picture_get_user_data (picture);
@ -396,7 +396,7 @@ gst_va_vp8_dec_output_picture (GstVp8Decoder * decoder,
gboolean ret; gboolean ret;
GST_LOG_OBJECT (self, GST_LOG_OBJECT (self,
"Outputting picture %p (system_frame_number %d)", "Outputting picture %p (system_frame_number %u)",
picture, codec_picture->system_frame_number); picture, codec_picture->system_frame_number);
ret = gst_va_base_dec_process_output (base, frame, ret = gst_va_base_dec_process_output (base, frame,

View file

@ -1091,7 +1091,7 @@ gst_va_vp9_enc_reorder_frame (GstVaBaseEnc * base, GstVideoCodecFrame * frame,
va_frame->frame_num = self->gop.frame_num_since_kf; va_frame->frame_num = self->gop.frame_num_since_kf;
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); frame->system_frame_number, va_frame->frame_num);
/* A new key frame force to finish the current GF group. */ /* 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)) { if (!_vp9_gf_group_push_frame (&self->gop.current_group, frame)) {
GST_WARNING_OBJECT (base, "Failed to push the 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; goto error;
} }
@ -1147,7 +1147,7 @@ pop:
finish: finish:
if (*out_frame) { if (*out_frame) {
va_frame = _enc_frame (*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, " frame_num: %d, frame_type %s", (*out_frame)->system_frame_number,
va_frame->frame_num, _vp9_get_frame_type_name (va_frame->type)); va_frame->frame_num, _vp9_get_frame_type_name (va_frame->type));
} }
@ -1157,7 +1157,7 @@ finish:
error: error:
if (frame) { if (frame) {
GST_ERROR_OBJECT (base, "Failed to reorder the 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 { } else {
GST_ERROR_OBJECT (base, "error when poping frame."); 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)) { if (!_vp9_assign_ref_index (self, gst_frame)) {
GST_ERROR_OBJECT (self, "Failed to assign reference for 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, gst_frame->system_frame_number, va_frame->frame_num,
_vp9_get_frame_type_name (va_frame->type)); _vp9_get_frame_type_name (va_frame->type));
return GST_FLOW_ERROR; 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); frame_enc->base.picture, data + offset, total_sz - offset);
if (frame_size[num] <= 0) { if (frame_size[num] <= 0) {
GST_ERROR_OBJECT (self, "Fails to copy the output data of " 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, self->frames_in_super[num]->system_frame_number,
frame_enc->frame_num); frame_enc->frame_num);
goto error; goto error;
@ -2619,7 +2619,7 @@ _vp9_create_super_frame_output_buffer (GstVaVp9Enc * self,
frame_enc->base.picture, data + offset, total_sz - offset); frame_enc->base.picture, data + offset, total_sz - offset);
if (frame_size[num] <= 0) { if (frame_size[num] <= 0) {
GST_ERROR_OBJECT (self, "Fails to copy the output data of " 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); last_frame->system_frame_number, frame_enc->frame_num);
goto error; goto error;
} }
@ -2671,8 +2671,8 @@ gst_va_vp9_enc_prepare_output (GstVaBaseEnc * base,
frame_enc = _enc_frame (frame); frame_enc = _enc_frame (frame);
GST_LOG_OBJECT (base, "Prepare to output: frame system_frame_number: %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 %d", "frame_num: %d, frame type: %s, flags: 0x%x, super_num is %u",
frame->system_frame_number, frame_enc->frame_num, frame->system_frame_number, frame_enc->frame_num,
_vp9_get_frame_type_name (frame_enc->type), frame_enc->flags, _vp9_get_frame_type_name (frame_enc->type), frame_enc->flags,
self->frames_in_super_num); self->frames_in_super_num);