postproc: reconfigure after changing cropping values

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/365>
This commit is contained in:
Marc Leeman 2020-07-24 12:54:31 +02:00 committed by Víctor Manuel Jáquez Leal
parent e911c1ff02
commit 5b05e28a55

View file

@ -2110,21 +2110,37 @@ gst_vaapipostproc_set_property (GObject * object,
postproc->flags |= GST_VAAPI_POSTPROC_FLAG_SKINTONE_LEVEL; postproc->flags |= GST_VAAPI_POSTPROC_FLAG_SKINTONE_LEVEL;
break; break;
case PROP_CROP_LEFT: case PROP_CROP_LEFT:
{
guint prev_crop_left = postproc->crop_left;
postproc->crop_left = g_value_get_uint (value); postproc->crop_left = g_value_get_uint (value);
postproc->flags |= GST_VAAPI_POSTPROC_FLAG_CROP; postproc->flags |= GST_VAAPI_POSTPROC_FLAG_CROP;
do_reconf = (prev_crop_left != postproc->crop_left);
break; break;
}
case PROP_CROP_RIGHT: case PROP_CROP_RIGHT:
{
guint prev_crop_right = postproc->crop_right;
postproc->crop_right = g_value_get_uint (value); postproc->crop_right = g_value_get_uint (value);
postproc->flags |= GST_VAAPI_POSTPROC_FLAG_CROP; postproc->flags |= GST_VAAPI_POSTPROC_FLAG_CROP;
do_reconf = (prev_crop_right != postproc->crop_right);
break; break;
}
case PROP_CROP_TOP: case PROP_CROP_TOP:
{
guint prev_crop_top = postproc->crop_top;
postproc->crop_top = g_value_get_uint (value); postproc->crop_top = g_value_get_uint (value);
postproc->flags |= GST_VAAPI_POSTPROC_FLAG_CROP; postproc->flags |= GST_VAAPI_POSTPROC_FLAG_CROP;
do_reconf = (prev_crop_top != postproc->crop_top);
break; break;
}
case PROP_CROP_BOTTOM: case PROP_CROP_BOTTOM:
{
guint prev_crop_bottom = postproc->crop_bottom;
postproc->crop_bottom = g_value_get_uint (value); postproc->crop_bottom = g_value_get_uint (value);
postproc->flags |= GST_VAAPI_POSTPROC_FLAG_CROP; postproc->flags |= GST_VAAPI_POSTPROC_FLAG_CROP;
do_reconf = (prev_crop_bottom != postproc->crop_bottom);
break; break;
}
case PROP_HDR_TONE_MAP: case PROP_HDR_TONE_MAP:
postproc->hdr_tone_map = g_value_get_enum (value); postproc->hdr_tone_map = g_value_get_enum (value);
break; break;