qt application crash on camera streaming on mipi dsi display

cancel
Showing results for 
Search instead for 
Did you mean: 

qt application crash on camera streaming on mipi dsi display

284 Views
jigneshpatel
Contributor III

Hi,

I have implemented a function to start camera streaming on my mipi-dsi display as below function:

 void StartStreaming(void)
 {
    GMainLoop *loop;
    GstElement *filter, *csp, *sink;
    GstPad *pad;

    /* init GStreamer */
    gst_init (NULL, NULL);
    loop = g_main_loop_new (NULL, FALSE);

    /* build */
    pipeline = gst_pipeline_new ("my-pipeline");
    src = gst_element_factory_make ("imxv4l2videosrc", "src");
    if (src == NULL)
        qDebug() << "Could not create 'videotestsrc' element";

    filter = gst_element_factory_make ("capsfilter", "filter");
    g_assert (filter != NULL);

    text = gst_element_factory_make ("textoverlay", NULL);
    if (!text)   qDebug() << "need textoverlay from gst-plugins-base";

    g_object_set (text,"text", "GStreamer rocks!","font-desc", "Sans, 30", "halignment", /* position */ 4,"valignment", /* position */ 3,NULL);

    csp = gst_element_factory_make ("videoconvert", "csp");
    if (csp == NULL)        qDebug() << "Could not create 'videoconvert' element";

    sink = gst_element_factory_make ("imxeglvivsink", "sink");
    if (sink == NULL) {
    qDebug() << "Getting error in video sink";
        sink = gst_element_factory_make ("imxeglvivsink", "sink");
        if (sink == NULL){
            qDebug() << "Could not create neither 'xvimagesink' nor 'ximagesink' element";
        }
    }

    bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
    gst_bus_add_watch (bus, bus_call, NULL);
    gst_object_unref (bus);

    gst_bin_add_many (GST_BIN (pipeline), text, src, filter, csp, sink, NULL);
    gst_element_link_many (src, text, filter, csp, sink, NULL);

    GstStateChangeReturn  sret  = gst_element_get_state (pipeline, NULL, NULL, -1);
        qDebug() <<  "Get pipe state " + QString::number(sret);


    QWidget *CamWidget = new QWidget();
    xwinid=CamWidget->winId();

    gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY(sink), guintptr(xwinid));

    /* run */
    sret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
        qDebug() <<  "set pipe line for playing succesfully " + QString::number(sret);

    /* wait until it's up and running or failed */
    sret  = gst_element_get_state (pipeline, NULL, NULL, -1);
    if(sret != GST_STATE_CHANGE_FAILURE)
    {
        qDebug() <<  "pipe state for Playing: " + QString::number(sret);
    }
    else
    {
        qDebug() << "set pipe line for playing failed " + QString::number(sret);
    }
}


I have issue : my application is getting crash when i started application first time on power reset.

Application crash when " gst_element_set_state (pipeline, GST_STATE_PLAYING);" function called.
I am getting following error on debug console:

    Alignment trap: not handling instruction f4024aef at [<67d992b0>]
    Unhandled fault: alignment exception (0x811) at 0x67e59e78
    pgd = a940c000
    [67e59e78] *pgd=397a0831, *pte=2e16775f, *ppte=2e167c7f

It would be great anyone can help to sort this issue.

My system detail:

Process : imx6dualite

Linux kernel :  4.9.88-10182-gec7d7d8-dirty

qt revision : 5.7.1

GStreamer: 1.10.4

Thanks,
Jignesh Patel

Labels (4)
0 Kudos
1 Reply

150 Views
jimmychan
NXP TechSupport
NXP TechSupport

please try the new version of BSP Linux 4.19.35_1.1.0

0 Kudos