Commit ab1f4cc8 authored by Philipp Zabel's avatar Philipp Zabel Committed by Nicolas Dufresne

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
parent ca561ac7
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment