From 04af62b70feb47e287051694cf084535cbfab6c8 Mon Sep 17 00:00:00 2001 From: Julian Bouzas Date: Fri, 25 Oct 2024 11:10:38 -0400 Subject: [PATCH] lcevch264enc: Set 'byte-stream' format and 'au' alignment in output caps This is because the LCEVC EIL SDK from V-Nova always outputs encoded video in that format. This also avoids using the parser in some scenarios. Part-of: --- .../ext/lcevcencoder/gstlcevch264enc.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/subprojects/gst-plugins-bad/ext/lcevcencoder/gstlcevch264enc.c b/subprojects/gst-plugins-bad/ext/lcevcencoder/gstlcevch264enc.c index 861ad14a30..080008927a 100644 --- a/subprojects/gst-plugins-bad/ext/lcevcencoder/gstlcevch264enc.c +++ b/subprojects/gst-plugins-bad/ext/lcevcencoder/gstlcevch264enc.c @@ -23,10 +23,16 @@ #include "gstlcevch264enc.h" +#define GST_LCEVC_H264_ENC_CAPS \ + "video/x-h264, " \ + "lcevc = (boolean) true, " \ + "stream-format = (string) byte-stream, " \ + "alignment = (string) au" + static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_STATIC_CAPS ("video/x-h264, lcevc = (boolean) true") + GST_STATIC_CAPS (GST_LCEVC_H264_ENC_CAPS) ); struct _GstLcevcH264Enc @@ -49,8 +55,7 @@ gst_lecevc_h264_enc_get_eil_plugin_name (GstLcevcEncoder * enc) static GstCaps * gst_lecevc_h264_enc_get_output_caps (GstLcevcEncoder * enc) { - return gst_caps_new_simple ("video/x-h264", - "lcevc", G_TYPE_BOOLEAN, TRUE, NULL); + return gst_static_caps_get (&src_template.static_caps); } static void