d3d11decoder: Fix for alternate interlacing signalling

Don't set d3d11+interlace caps feature. None of d3d11 elements
support it

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2584>
This commit is contained in:
Seungha Yang 2022-06-09 23:19:24 +09:00 committed by Tim-Philipp Müller
parent 3e1528f1fb
commit 47aef341d0

View file

@ -1602,6 +1602,8 @@ gst_d3d11_decoder_negotiate (GstD3D11Decoder * decoder,
gboolean alternate_interlaced; gboolean alternate_interlaced;
gboolean alternate_supported = FALSE; gboolean alternate_supported = FALSE;
gboolean d3d11_supported = FALSE; gboolean d3d11_supported = FALSE;
/* No d3d11 element supports alternate now */
gboolean d3d11_alternate_supported = FALSE;
GstVideoCodecState *input_state; GstVideoCodecState *input_state;
GstStructure *s; GstStructure *s;
const gchar *str; const gchar *str;
@ -1636,10 +1638,13 @@ gst_d3d11_decoder_negotiate (GstD3D11Decoder * decoder,
if (gst_caps_features_contains (features, if (gst_caps_features_contains (features,
GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY)) { GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY)) {
d3d11_supported = TRUE; d3d11_supported = TRUE;
if (gst_caps_features_contains (features,
GST_CAPS_FEATURE_FORMAT_INTERLACED)) {
d3d11_alternate_supported = TRUE;
}
} }
/* FIXME: software deinterlace element will not return interlaced caps
* feature... We should fix it */
if (gst_caps_features_contains (features, if (gst_caps_features_contains (features,
GST_CAPS_FEATURE_FORMAT_INTERLACED)) { GST_CAPS_FEATURE_FORMAT_INTERLACED)) {
alternate_supported = TRUE; alternate_supported = TRUE;
@ -1657,7 +1662,7 @@ gst_d3d11_decoder_negotiate (GstD3D11Decoder * decoder,
GST_FIXME_OBJECT (videodec, GST_FIXME_OBJECT (videodec,
"Implement alternating interlaced stream for D3D11"); "Implement alternating interlaced stream for D3D11");
if (alternate_supported) { if (d3d11_alternate_supported || (!d3d11_supported && alternate_supported)) {
gint height = GST_VIDEO_INFO_HEIGHT (info); gint height = GST_VIDEO_INFO_HEIGHT (info);
/* Set caps resolution with display size, that's how we designed /* Set caps resolution with display size, that's how we designed