v4l2decoder: Improve debug tracing

Add some missing traces and move per-slice operation to TRACE level to
reduce the noise level.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1395>
This commit is contained in:
Nicolas Dufresne 2020-07-01 12:26:36 -04:00
parent d5a205cff4
commit a88e63dd2f

View file

@ -536,6 +536,8 @@ gst_v4l2_decoder_queue_sink_mem (GstV4l2Decoder * self,
.flags = V4L2_BUF_FLAG_REQUEST_FD | flags, .flags = V4L2_BUF_FLAG_REQUEST_FD | flags,
}; };
GST_TRACE_OBJECT (self, "Queueing bitstream buffer %i", buf.index);
if (self->mplane) { if (self->mplane) {
buf.length = 1; buf.length = 1;
buf.m.planes = &plane; buf.m.planes = &plane;
@ -566,6 +568,8 @@ gst_v4l2_decoder_queue_src_buffer (GstV4l2Decoder * self, GstBuffer * buffer,
.index = gst_v4l2_codec_buffer_get_index (buffer), .index = gst_v4l2_codec_buffer_get_index (buffer),
}; };
GST_TRACE_OBJECT (self, "Queuing picture buffer %i", buf.index);
if (self->mplane) { if (self->mplane) {
buf.length = gst_buffer_n_memory (buffer); buf.length = gst_buffer_n_memory (buffer);
buf.m.planes = planes; buf.m.planes = planes;
@ -611,6 +615,8 @@ gst_v4l2_decoder_dequeue_sink (GstV4l2Decoder * self)
return FALSE; return FALSE;
} }
GST_TRACE_OBJECT (self, "Dequeued bitstream buffer %i", buf.index);
return TRUE; return TRUE;
} }
@ -636,6 +642,9 @@ gst_v4l2_decoder_dequeue_src (GstV4l2Decoder * self, guint32 * out_frame_num)
} }
*out_frame_num = buf.timestamp.tv_usec; *out_frame_num = buf.timestamp.tv_usec;
GST_TRACE_OBJECT (self, "Dequeued picture buffer %i", buf.index);
return TRUE; return TRUE;
} }
@ -835,7 +844,7 @@ gst_v4l2_request_free (GstV4l2Request * request)
return; return;
} }
GST_DEBUG_OBJECT (decoder, "Recycling request %p.", request); GST_TRACE_OBJECT (decoder, "Recycling request %p.", request);
ret = ioctl (request->fd, MEDIA_REQUEST_IOC_REINIT, NULL); ret = ioctl (request->fd, MEDIA_REQUEST_IOC_REINIT, NULL);
if (ret < 0) { if (ret < 0) {
@ -855,7 +864,7 @@ gst_v4l2_request_queue (GstV4l2Request * request)
{ {
gint ret; gint ret;
GST_DEBUG_OBJECT (request->decoder, "Queuing request %p.", request); GST_TRACE_OBJECT (request->decoder, "Queuing request %p.", request);
ret = ioctl (request->fd, MEDIA_REQUEST_IOC_QUEUE, NULL); ret = ioctl (request->fd, MEDIA_REQUEST_IOC_QUEUE, NULL);
if (ret < 0) { if (ret < 0) {