why i never can get eos message

Борис bumatov at gmail.com
Fri Jul 17 09:45:20 UTC 2020


 Hi. I have a pipeline which receives h264 video stream:

rtspsrc location=rtsp://%1:%2/vd latency=0 tcp-timeout=2000000
protocols=GST_RTSP_LOWER_TRANS_TCP

! application/x-rtp,encoding-name=H264,payload=96 ! rtph264depay
name=prs0 ! h264parse ! tee name=t t. ! queue

! avdec_h264 ! videoconvert ! video/x-raw,format=(string)BGR

! appsink name=flowsink t. ! queue ! qtmux ! filesink location=%3.mov sync=false


Here is a part of code where i try to finish it correct:


     qDebug() << "clear buffer";

        for (auto& i : frameBuffer)

        {

            gst_buffer_unmap(std::get <GstBuffer*> (i), &std::get
<GstMapInfo> (i));

            gst_sample_unref(std::get <GstSample*> (i));

        }

        qDebug() << "send eos";

        if (gst_element_send_event(pipeline, gst_event_new_eos()))

        {

            qDebug() << "eos sent";

            GstClockTime timeout = 10 * GST_SECOND;

            GstMessage* msg;

            msg = gst_bus_timed_pop_filtered (GST_ELEMENT_BUS (pipeline),

           timeout, (GstMessageType)(GST_MESSAGE_EOS | GST_MESSAGE_ERROR));

            if (msg == NULL)

            {

                qDebug() << "NO END OF STREAM";

            }

            else if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR)

            {

                GError *err = NULL;

                gchar *dbg_info = NULL;

                gst_message_parse_error (msg, &err, &dbg_info);

                qDebug() << "ERROR" << err->message << ((dbg_info) ?
dbg_info : "none");

                g_error_free (err);

                g_free (dbg_info);

            }

            else

            {

                qDebug() << "END OF STREAM";

           }



Even if i call gst_bus_timed_pop_filtered without timeout i never get
an eos or any other signal

and can't finish the pipeline correctly...

What can be wrong here?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200717/3b280714/attachment.htm>


More information about the gstreamer-devel mailing list