[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gstreamer-devel
Subject:    Short-cutting OPUS encoding-decoding pipeline.
From:       jeyp4 <jaiforfriend () gmail ! com>
Date:       2020-02-21 17:11:20
Message-ID: 1582305080057-0.post () n4 ! nabble ! com
[Download RAW message or body]

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/
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic