Short-cutting OPUS encoding-decoding pipeline.
jeyp4
jaiforfriend at gmail.com
Fri Feb 21 17:11:20 UTC 2020
Hi
I am interested in short-cutting OPUS encoding-decoding pipeline.
image
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",
gst_caps_new_simple("audio/x-opus",
"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,
NULL
),
"is-live", TRUE,
//"do-timestamp", TRUE,
NULL);
}
And also before pushing buffer from appsrc to decoder. I correct the buffer
parameters.
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 ():
/GstPipeline:app_pipeline/GstAppSrc:app_source:
streaming task paused, reason error (-5)
My appsink node is here, OPUSappsink.
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
More information about the gstreamer-devel
mailing list