Short-cutting OPUS encoding-decoding pipeline.

jeyp4 jaiforfriend at
Fri Feb 21 17:11:20 UTC 2020


I am interested in short-cutting OPUS encoding-decoding pipeline.


Using Appsink and Appsrc in a c++ application.

For caution, I add caps of appsrc element.
_source = gst_element_factory_make("appsrc", "app_source");
            g_object_set (G_OBJECT(_source), "caps",
"rate", G_TYPE_INT, 16000,
"channels", G_TYPE_INT, 1,
"channel-mapping-family", G_TYPE_INT, 0,
"stream-count", G_TYPE_INT, 1,
"coupled-count", G_TYPE_INT, 0,
                          "is-live", TRUE,
                          //"do-timestamp", TRUE,
And also before pushing buffer from appsrc to decoder. I correct the buffer
        static GstClockTime pts = 0;
        static guint64 offset = 0;
        GST_BUFFER_PTS (buffer) = pts;
        GST_BUFFER_DTS (buffer) = pts;
        GST_BUFFER_OFFSET(buffer) = offset; offset = offset+60;
        GST_BUFFER_DURATION(buffer) = 20000000;
        GST_BUFFER_OFFSET_END(buffer) = offset;
        pts = pts + 20000000;

        GstFlowReturn ret;
        g_signal_emit_by_name(_source, "push-buffer", buffer, &ret);

And then also my appsrc pipeline is getting terminated with following error.
Error received from element app_source: Internal data flow error.
Debugging information: gstbasesrc.c(2948): gst_base_src_loop ():
streaming task paused, reason error (-5)

My appsink node is here, OPUSappsink.

Sent from:

More information about the gstreamer-devel mailing list