amlv4l2dec: CF2 amlv4l2 can support avs codec [1/1]
PD#SWPL-74963
Problem:
amlv4l2 support avs, avs2, and avs3 codecs
Solution:
amlv4l2dec add avs codec
Verify:
Yocto
Signed-off-by: zengliang.li <zengliang.li@amlogic.com>
Change-Id: If6ebe8e15513c8f2e08e60ecfab30152407192d9
diff --git a/src/gstamlv4l2videodec.c b/src/gstamlv4l2videodec.c
index 9953ddc..b1db3e2 100644
--- a/src/gstamlv4l2videodec.c
+++ b/src/gstamlv4l2videodec.c
@@ -1564,6 +1564,24 @@
GST_DEBUG_OBJECT(self, "after Send private_signal Event :%p", event);
break;
}
+ case GST_EVENT_CAPS:
+ {
+ GstCaps *caps;
+ GstStructure *structure;
+
+ gst_event_parse_caps (event, &caps);
+ structure= gst_caps_get_structure(caps, 0);
+ if ( gst_structure_has_field(structure, "parsed") )
+ {
+ gboolean parsed = TRUE;
+ if ( gst_structure_get_boolean( structure, "parsed", &parsed ) )
+ {
+ self->v4l2output->stream_mode = !parsed;
+ GST_DEBUG("frame parsed:%d, set stream_mode to %d", parsed, self->v4l2output->stream_mode);
+ }
+ }
+ break;
+ }
case GST_EVENT_FLUSH_START:
GST_DEBUG_OBJECT(self, "flush start");
@@ -1875,6 +1893,18 @@
{
SET_META("AV1");
}
+ else if (gst_structure_has_name(s, "video/x-avs"))
+ {
+ SET_META("AVS");
+ }
+ else if (gst_structure_has_name(s, "video/x-avs2"))
+ {
+ SET_META("AVS2");
+ }
+ else if (gst_structure_has_name(s, "video/x-avs3"))
+ {
+ SET_META("AVS3");
+ }
else if (gst_structure_has_name(s, "video/x-bayer"))
{
SET_META("BAYER");