From 09ad21b26c765a642f532e27e586f45a15aaa6fd Mon Sep 17 00:00:00 2001 From: Varunkumar Allagadapa Date: Tue, 20 Feb 2018 10:57:42 -0800 Subject: [PATCH] omxvideoenc: Add dynamic IDR insertion support on zynq As the pi, the zynq has its own API to request keyframe. --- omx/gstomxvideoenc.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/omx/gstomxvideoenc.c b/omx/gstomxvideoenc.c index 6fa57fb72f..0da42b1c71 100644 --- a/omx/gstomxvideoenc.c +++ b/omx/gstomxvideoenc.c @@ -2810,6 +2810,15 @@ gst_omx_video_enc_handle_frame (GstVideoEncoder * encoder, err = gst_omx_component_set_config (self->enc, OMX_IndexConfigBrcmVideoRequestIFrame, &config); +#elif USE_OMX_TARGET_ZYNQ_USCALE_PLUS + OMX_ALG_VIDEO_CONFIG_INSERT config; + + GST_OMX_INIT_STRUCT (&config); + config.nPortIndex = self->enc_out_port->index; + + GST_DEBUG_OBJECT (self, "Forcing a keyframe"); + err = gst_omx_component_set_config (self->enc, (OMX_INDEXTYPE) + OMX_ALG_IndexConfigVideoInsertInstantaneousDecodingRefresh, &config); #else OMX_CONFIG_INTRAREFRESHVOPTYPE config;