v4l2object: complete colorspace info in debug log

The desired colorimetry is logged with all parameters (colorpsace,
range, matrix, and transfer function), but of the values actually
set by the driver, only colorspace is logged. Complete the debug
log message to display all colorimetry parameters:

  Desired colorspace is 8:1:1:1
  Got format of 640x480, format YU12, nb planes 1, colorspace 8

->

  Desired colorspace is 8:1:1:1
  Got format of 640x480, format YU12, nb planes 1, colorspace 8:0:0:0

https://bugzilla.gnome.org/show_bug.cgi?id=796940
This commit is contained in:
Philipp Zabel 2018-08-09 15:14:05 +02:00 committed by Nicolas Dufresne
parent 91dd9c1929
commit 00143ca554

View file

@ -3512,12 +3512,24 @@ gst_v4l2_object_set_format_full (GstV4l2Object * v4l2object, GstCaps * caps,
goto set_fmt_failed;
}
if (is_mplane) {
colorspace = format.fmt.pix_mp.colorspace;
range = format.fmt.pix_mp.quantization;
matrix = format.fmt.pix_mp.ycbcr_enc;
transfer = format.fmt.pix_mp.xfer_func;
} else {
colorspace = format.fmt.pix.colorspace;
range = format.fmt.pix.quantization;
matrix = format.fmt.pix.ycbcr_enc;
transfer = format.fmt.pix.xfer_func;
}
GST_DEBUG_OBJECT (v4l2object->dbg_obj, "Got format of %dx%d, format "
"%" GST_FOURCC_FORMAT ", nb planes %d, colorspace %d",
"%" GST_FOURCC_FORMAT ", nb planes %d, colorspace %d:%d:%d:%d",
format.fmt.pix.width, format.fmt.pix_mp.height,
GST_FOURCC_ARGS (format.fmt.pix.pixelformat),
is_mplane ? format.fmt.pix_mp.num_planes : 1,
is_mplane ? format.fmt.pix_mp.colorspace : format.fmt.pix.colorspace);
colorspace, range, matrix, transfer);
#ifndef GST_DISABLE_GST_DEBUG
if (is_mplane) {