mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
v4l2codecs: Trace request by it FD
This helps when crossing the debug logs with the kernel logs. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2009>
This commit is contained in:
parent
d24dc74170
commit
dcd62c35f0
3 changed files with 19 additions and 7 deletions
|
@ -1316,7 +1316,8 @@ gst_v4l2_codec_h264_dec_new_field_picture (GstH264Decoder * decoder,
|
|||
return GST_FLOW_OK;
|
||||
}
|
||||
|
||||
GST_DEBUG_OBJECT (self, "Assigned request %p to second field.", request);
|
||||
GST_DEBUG_OBJECT (self, "Assigned request %i to second field.",
|
||||
gst_v4l2_request_get_fd (request));
|
||||
|
||||
/* Associate the previous request with the new picture so that
|
||||
* submit_bitstream can create sub-request */
|
||||
|
|
|
@ -1053,7 +1053,7 @@ gst_v4l2_request_unref (GstV4l2Request * request)
|
|||
if (request->pending) {
|
||||
gint idx;
|
||||
|
||||
GST_DEBUG_OBJECT (decoder, "Freeing pending request %p.", request);
|
||||
GST_DEBUG_OBJECT (decoder, "Freeing pending request %i.", request->fd);
|
||||
|
||||
idx = gst_queue_array_find (decoder->pending_requests, NULL, request);
|
||||
if (idx >= 0)
|
||||
|
@ -1063,7 +1063,7 @@ gst_v4l2_request_unref (GstV4l2Request * request)
|
|||
return;
|
||||
}
|
||||
|
||||
GST_TRACE_OBJECT (decoder, "Recycling request %p.", request);
|
||||
GST_TRACE_OBJECT (decoder, "Recycling request %i.", request->fd);
|
||||
|
||||
ret = ioctl (request->fd, MEDIA_REQUEST_IOC_REINIT, NULL);
|
||||
if (ret < 0) {
|
||||
|
@ -1084,7 +1084,7 @@ gst_v4l2_request_queue (GstV4l2Request * request, guint flags)
|
|||
gint ret;
|
||||
guint max_pending;
|
||||
|
||||
GST_TRACE_OBJECT (decoder, "Queuing request %p.", request);
|
||||
GST_TRACE_OBJECT (decoder, "Queuing request %i.", request->fd);
|
||||
|
||||
if (!gst_v4l2_decoder_queue_sink_mem (decoder, request,
|
||||
request->bitstream, request->frame_num, flags)) {
|
||||
|
@ -1134,15 +1134,18 @@ gst_v4l2_request_set_done (GstV4l2Request * request)
|
|||
if (!request->pending)
|
||||
return 1;
|
||||
|
||||
GST_DEBUG_OBJECT (decoder, "Waiting for request %i to complete.",
|
||||
request->fd);
|
||||
|
||||
ret = gst_poll_wait (request->poll, GST_SECOND);
|
||||
if (ret == 0) {
|
||||
GST_WARNING_OBJECT (decoder, "Request %p took too long.", request);
|
||||
GST_WARNING_OBJECT (decoder, "Request %i took too long.", request->fd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ret < 0) {
|
||||
GST_WARNING_OBJECT (decoder, "Request %p error: %s (%i)",
|
||||
request, g_strerror (errno), errno);
|
||||
GST_WARNING_OBJECT (decoder, "Request %i error: %s (%i)",
|
||||
request->fd, g_strerror (errno), errno);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1187,3 +1190,9 @@ gst_v4l2_request_dup_pic_buf (GstV4l2Request * request)
|
|||
{
|
||||
return gst_buffer_ref (request->pic_buf);
|
||||
}
|
||||
|
||||
gint
|
||||
gst_v4l2_request_get_fd (GstV4l2Request * request)
|
||||
{
|
||||
return request->fd;
|
||||
}
|
||||
|
|
|
@ -138,6 +138,8 @@ gboolean gst_v4l2_request_failed (GstV4l2Request * request);
|
|||
|
||||
GstBuffer * gst_v4l2_request_dup_pic_buf (GstV4l2Request * request);
|
||||
|
||||
gint gst_v4l2_request_get_fd (GstV4l2Request * request);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_V4L2_DECODER_H__ */
|
||||
|
|
Loading…
Reference in a new issue