video flickering with imxeglvivsink


video flickering with imxeglvivsink

939 次查看
Contributor I


We use i.MX6 Sabre lite platform for our test and measurement solution. Our solution includes a video streaming application with gstreamer 1.0 for USB and MIPI HD cameras.

We created the following pipeline and it works fine with imxeglvivsink - with its own window. We want to overlay the video on to a QT/QML application window. When we overlay the video the video display flickers.

Camera init code:

void GSTCamera::mInit()


    m_pipe_USBCamera = gst_pipeline_new("USB Camera"); Q_ASSERT(m_pipe_USBCamera);

    m_src_USBCamera = gst_element_factory_make("v4l2src", NULL); Q_ASSERT(m_src_USBCamera);

    m_sink_IMXEGLVIV = gst_element_factory_make("imxeglvivsink", NULL); Q_ASSERT(m_sink_IMXEGLVIV);

    m_dec_IMXVPU = gst_element_factory_make("imxvpudec", NULL); Q_ASSERT(m_dec_IMXVPU);

    m_trans_IMXIPU = gst_element_factory_make("imxipuvideotransform", NULL); Q_ASSERT(m_trans_IMXIPU);

    m_src_caps = gst_element_factory_make("capsfilter", NULL);

    g_object_set(G_OBJECT(m_src_USBCamera), "device", "/dev/video0", NULL);

    g_object_set(G_OBJECT(m_src_caps),"caps", gst_caps_from_string("image/jpeg,width=320,height=240,framerate=30/1"),NULL);

    gst_bin_add_many (GST_BIN(m_pipe_USBCamera), m_src_USBCamera, m_src_caps, m_dec_IMXVPU, m_trans_IMXIPU, m_sink_IMXEGLVIV, NULL);

    gst_element_link(m_src_USBCamera, m_src_caps);

    gst_element_link(m_src_caps, m_dec_IMXVPU);

    gst_element_link(m_dec_IMXVPU, m_trans_IMXIPU);

    gst_element_link(m_trans_IMXIPU, m_sink_IMXEGLVIV);


    GstBus *pBus = gst_pipeline_get_bus (GST_PIPELINE (m_pipe_USBCamera));

    gst_bus_set_sync_handler (pBus, (GstBusSyncHandler) bus_sync_handler, NULL, NULL);

    gst_object_unref (pBus);

    //gst_element_set_state(m_pipe_USBCamera, GST_STATE_PLAYING);


We are able to set the QML application window handle through the bus_sync_handler() GstBusSyncHandler.

When the pipeline is set for playing the video display appears flickering - appears to be video and graphics displays interleaved.

If we don't set the application window handle the video appears in a separate window and is smooth without any issues.

Please suggest what needs to be done extra for a smooth video display overlay on to the QML window.

Thanks in advance,


0 项奖励
1 回复

291 次查看
Senior Contributor III

Send your post to imx community (e.g. i.MX Community ) to get it visible for active members.

0 项奖励