From cce8f3fb0878ba16936ca381a15772df9bf43ecb Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sun, 27 Sep 2020 16:10:38 +0200 Subject: [PATCH] v4l2: improve debug --- spa/plugins/v4l2/v4l2-utils.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/spa/plugins/v4l2/v4l2-utils.c b/spa/plugins/v4l2/v4l2-utils.c index e29297f32..265178a58 100644 --- a/spa/plugins/v4l2/v4l2-utils.c +++ b/spa/plugins/v4l2/v4l2-utils.c @@ -590,12 +590,16 @@ spa_v4l2_enum_format(struct impl *this, int seq, fmt.fmt.pix.height = 0; if ((res = xioctl(dev->fd, VIDIOC_TRY_FMT, &fmt)) < 0) { - spa_log_error(this->log, "v4l2: '%s' VIDIOC_TRY_FMT: %m", - this->props.device); + spa_log_debug(this->log, "v4l2: '%s' VIDIOC_TRY_FMT %08x: %m", + this->props.device, info->fourcc); goto next_fmtdesc; } - if (fmt.fmt.pix.pixelformat != info->fourcc) + if (fmt.fmt.pix.pixelformat != info->fourcc) { + spa_log_debug(this->log, "v4l2: '%s' VIDIOC_TRY_FMT wanted %.4s gave %.4s", + this->props.device, (char*)&info->fourcc, + (char*)&fmt.fmt.pix.pixelformat); goto next_fmtdesc; + } } else { if ((res = xioctl(dev->fd, VIDIOC_ENUM_FMT, &port->fmtdesc)) < 0) {