amlv4l2: CF2 parse secure flag in caps [2/2]
PD#SWPL-178861
Problem:
parse secure flag in caps
Solution:
parse secure flag in caps
Verify:
(detail info)
Change-Id: I3a835ac2905f6393ecc6c04d6972482d5cea20cb
Signed-off-by: xuesong.jiang <xuesong.jiang@amlogic.com>
diff --git a/src/gstamlv4l2videodec.c b/src/gstamlv4l2videodec.c
index 5d722ef..8ae49c5 100644
--- a/src/gstamlv4l2videodec.c
+++ b/src/gstamlv4l2videodec.c
@@ -1390,9 +1390,10 @@
GstCapsFeatures *features = NULL;
features = gst_caps_get_features(self->input_state->caps, 0);
- if (features && gst_caps_features_contains(features, GST_CAPS_FEATURE_MEMORY_DMABUF))
+ if (features && gst_caps_features_contains(features, GST_CAPS_FEATURE_MEMORY_DMABUF) && self->v4l2output->secure_es)
{
GST_DEBUG_OBJECT(self, "Is SVP");
+ //TODO:need rm is_svp flag and just using secure_es flag
self->v4l2output->is_svp = TRUE;
}
@@ -1681,6 +1682,16 @@
}
}
+ if ( gst_structure_has_field(structure, "secure") )
+ {
+ gboolean is_secure = FALSE;
+ if ( gst_structure_get_boolean( structure, "secure", &is_secure ) )
+ {
+ self->v4l2output->secure_es = is_secure;
+ GST_DEBUG("is secure es:%d", self->v4l2output->secure_es);
+ }
+ }
+
if ( gst_structure_get_fraction( structure, "framerate", &num, &denom ) )
{
if ( denom == 0 ) denom= 1;