mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-02 16:52:42 +00:00
video-info: explain in logs why colorimetry are rejected
It wasn't clear from the logs why some colorimetry format were rejected.
This commit is contained in:
parent
951b951188
commit
e397c4cea1
1 changed files with 9 additions and 2 deletions
|
@ -185,12 +185,19 @@ validate_colorimetry (GstVideoInfo * info)
|
||||||
const GstVideoFormatInfo *finfo = info->finfo;
|
const GstVideoFormatInfo *finfo = info->finfo;
|
||||||
|
|
||||||
if (!GST_VIDEO_FORMAT_INFO_IS_RGB (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;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (GST_VIDEO_FORMAT_INFO_IS_YUV (finfo) &&
|
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 FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue