amlv4l2: CB1 consider dma es as secure buf by default [1/1]
PD#SWPL-178861
Problem:
The newly added secure field in caps affects the playback of static pipeline secure scenes such as YTS
Solution:
consider dma es as secure buf by default
Set caps with secure flag to false for dma es buf if needed
Verify:
(detail info)
Change-Id: I4983120c5fa2e1953fa35ddee6de693cfe825aee
Signed-off-by: xuesong.jiang <xuesong.jiang@amlogic.com>
diff --git a/src/gstamlv4l2videodec.c b/src/gstamlv4l2videodec.c
index e7d16af..780cea3 100644
--- a/src/gstamlv4l2videodec.c
+++ b/src/gstamlv4l2videodec.c
@@ -1693,6 +1693,15 @@
GST_DEBUG("is secure es:%d", self->v4l2output->secure_es);
}
}
+ else
+ {
+ GstCapsFeatures *const features = gst_caps_get_features(caps, 0);
+ if (features && gst_caps_features_contains(features, GST_CAPS_FEATURE_MEMORY_DMABUF))
+ {
+ self->v4l2output->secure_es = TRUE;
+ GST_DEBUG("If there is no secure field in caps, consider dma es is secure");
+ }
+ }
if ( gst_structure_get_fraction( structure, "framerate", &num, &denom ) )
{