mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 10:41:04 +00:00
vaapipostproc: use othercaps for preferred caps
Instead of the allowed_srcpad_caps variable, this patch uses the othercaps from fixate_caps() vmethod to find the preferred caps feature and color format. https://bugzilla.gnome.org/show_bug.cgi?id=758548
This commit is contained in:
parent
8de7faafdc
commit
bde3b072da
1 changed files with 3 additions and 4 deletions
|
@ -1092,7 +1092,7 @@ gst_vaapipostproc_transform_caps (GstBaseTransform * trans,
|
||||||
|
|
||||||
static GstCaps *
|
static GstCaps *
|
||||||
gst_vaapipostproc_fixate_srccaps (GstVaapiPostproc * postproc,
|
gst_vaapipostproc_fixate_srccaps (GstVaapiPostproc * postproc,
|
||||||
GstCaps * sinkcaps)
|
GstCaps * sinkcaps, GstCaps * srccaps)
|
||||||
{
|
{
|
||||||
GstVideoInfo vi;
|
GstVideoInfo vi;
|
||||||
GstVideoFormat out_format;
|
GstVideoFormat out_format;
|
||||||
|
@ -1134,8 +1134,7 @@ gst_vaapipostproc_fixate_srccaps (GstVaapiPostproc * postproc,
|
||||||
out_format = postproc->format;
|
out_format = postproc->format;
|
||||||
|
|
||||||
srcpad = GST_BASE_TRANSFORM_SRC_PAD (postproc);
|
srcpad = GST_BASE_TRANSFORM_SRC_PAD (postproc);
|
||||||
feature = gst_vaapi_find_preferred_caps_feature (srcpad,
|
feature = gst_vaapi_find_preferred_caps_feature (srcpad, srccaps,
|
||||||
postproc->allowed_srcpad_caps,
|
|
||||||
(out_format == GST_VIDEO_FORMAT_UNKNOWN) ? &out_format : NULL);
|
(out_format == GST_VIDEO_FORMAT_UNKNOWN) ? &out_format : NULL);
|
||||||
|
|
||||||
if (feature == GST_VAAPI_CAPS_FEATURE_NOT_NEGOTIATED)
|
if (feature == GST_VAAPI_CAPS_FEATURE_NOT_NEGOTIATED)
|
||||||
|
@ -1179,7 +1178,7 @@ gst_vaapipostproc_fixate_caps (GstBaseTransform * trans,
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((outcaps = gst_vaapipostproc_fixate_srccaps (postproc, caps)))
|
if ((outcaps = gst_vaapipostproc_fixate_srccaps (postproc, caps, othercaps)))
|
||||||
gst_caps_replace (&othercaps, outcaps);
|
gst_caps_replace (&othercaps, outcaps);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
|
Loading…
Reference in a new issue