Commit 3cfe7a73 authored by Guillaume Desmottes's avatar Guillaume Desmottes 🐐 Committed by Tim-Philipp Müller

video-info: explain in logs why colorimetry are rejected

It wasn't clear from the logs why some colorimetry format were rejected.
parent 63a41324
......@@ -185,12 +185,19 @@ validate_colorimetry (GstVideoInfo * info)
const GstVideoFormatInfo *finfo = info->finfo;
if (!GST_VIDEO_FORMAT_INFO_IS_RGB (finfo) &&
info->colorimetry.matrix == GST_VIDEO_COLOR_MATRIX_RGB)
info->colorimetry.matrix == GST_VIDEO_COLOR_MATRIX_RGB) {
GST_WARNING
("color matrix RGB is only supported with RGB format, %s is not",
finfo->name);
return FALSE;
}
if (GST_VIDEO_FORMAT_INFO_IS_YUV (finfo) &&
info->colorimetry.matrix == GST_VIDEO_COLOR_MATRIX_UNKNOWN)
info->colorimetry.matrix == GST_VIDEO_COLOR_MATRIX_UNKNOWN) {
GST_WARNING ("Need to specify a color matrix when using YUV format (%s)",
finfo->name);
return FALSE;
}
return TRUE;
}
......
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