summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2019-07-26 22:05:29 +0200
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2019-08-19 16:48:49 +0000
commitbd175f9956e672bd9c9e13604b46f195a809f4e0 (patch)
treed5e2e20ac1a343020982961cfab54b49876900e5 /gst
parentc06b58781962c7668f4d5da6c27376dbe2dba54e (diff)
vaapipostproc: update filter before fixate caps
It is requiered to know if postproc is capable to change the video direction before fixating the source caps. In order to do it, it'ss required to know if there's a functional VPP, but that's checked at create() vmethod, which occurs after caps fixating. This patch checks for a functional VPP at fixate caps and, if so, checks for the enabled filtes and later do the caps fixations.
Diffstat (limited to 'gst')
-rw-r--r--gst/vaapi/gstvaapipostproc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gst/vaapi/gstvaapipostproc.c b/gst/vaapi/gstvaapipostproc.c
index dab05396..5e737e8e 100644
--- a/gst/vaapi/gstvaapipostproc.c
+++ b/gst/vaapi/gstvaapipostproc.c
@@ -1255,6 +1255,7 @@ gst_vaapipostproc_fixate_caps (GstBaseTransform * trans,
{
GstVaapiPostproc *const postproc = GST_VAAPIPOSTPROC (trans);
GstCaps *outcaps = NULL;
+ gboolean same_caps, filter_updated = FALSE;
GST_DEBUG_OBJECT (trans, "trying to fixate othercaps %" GST_PTR_FORMAT
" based on caps %" GST_PTR_FORMAT " in direction %s", othercaps, caps,
@@ -1267,11 +1268,18 @@ gst_vaapipostproc_fixate_caps (GstBaseTransform * trans,
}
g_mutex_lock (&postproc->postproc_lock);
+ postproc->has_vpp = gst_vaapipostproc_ensure_filter_caps (postproc);
+ if (check_filter_update (postproc) && update_filter (postproc)) {
+ /* check again if changed value is default */
+ filter_updated = check_filter_update (postproc);
+ }
+
outcaps = gst_vaapipostproc_fixate_srccaps (postproc, caps, othercaps);
g_mutex_unlock (&postproc->postproc_lock);
/* set passthrough according to caps changes or filter changes */
- gst_vaapipostproc_set_passthrough (trans);
+ same_caps = gst_caps_is_equal (caps, outcaps);
+ gst_base_transform_set_passthrough (trans, same_caps && !filter_updated);
done:
GST_DEBUG_OBJECT (trans, "fixated othercaps to %" GST_PTR_FORMAT, outcaps);