stopping pipeline with qmlglsink (GstGLVideoItem) blocks Qt

DejanCotra dejancotra at gmail.com
Mon Oct 12 09:06:15 UTC 2020


Hi all,

Im using Gstreamer (1.16.2) and QT (5.14.2). Im using qmlglsink to display
webrtc video stream. 
When I try to stop pipeline with qmlglsink QT background tasks are blocked
(timers, callbacks...).

What Im doing basically boils down to this example:
https://github.com/GStreamer/gst-plugins-good/blob/master/tests/examples/qt/qmlsink/main.cpp

plus I added to timers between lines 72 and 74:
*    QTimer * timer = new QTimer();
    timer->setSingleShot(true);
    QObject::connect(timer, &QTimer::timeout, [] () {
        qDebug() << ">>Stop pipeline<<" << endl;
        gst_element_set_state (pipeline, GST_STATE_PAUSED);
        gst_element_set_state (pipeline, GST_STATE_NULL);
    });
    timer->start(10000); //in ms

    QTimer * timer1 = new QTimer();
    QObject::connect(timer1, &QTimer::timeout, [] () {
        qDebug() << ">>Alive!!!<<" << endl;
    });
    timer1->start(1000); //in ms
*

first timer will stop pipeline after 10s and second one just prints message. 
After first timer stops pipeline there is no more printouts from second
timer.
I guess that Im not stopping pipeline correctly? what is or is there a
correct way to stop pipeline with qmlglsink that uses GstGLVideoItem
element.

Br,
Dejan





--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list