Trouble getting appsrc to work

Soebirk, Thorsten Thorsten.Sobirk at itelligence.dk
Tue Jun 23 08:35:10 UTC 2020


Hi,

I am working on a custom appsrc that produces audio and will ultimately stream it via webrtcbin. The pipeline looks like this (some details left out for clarity):

appsrc ! queue ! opusenc ! rtpopuspay ! queue ! capsfilter

It gets connected to webrtcbin in my code. The pipeline starts up correctly and begins playing, but as soon as appsrc.push_buffer is called, GStreamer throws the following errors.


GStreamer-WARNING **: 09:53:28.785: ../gst/gstpad.c:4551:gst_pad_push_data:<opusenc0:src> Got data flow before segment event

GStreamer-WARNING **: 09:53:28.785: ../gst/gstpad.c:4298:gst_pad_chain_data_unchecked:<rtpopuspay0:sink> Got data flow before segment event

GStreamer-CRITICAL **: 09:53:28.785: gst_segment_to_running_time: assertion 'segment->format == format' failed

GStreamer-WARNING **: 09:53:28.785: ../gst/gstpad.c:4551:gst_pad_push_data:<rtpopuspay0:src> Got data flow before segment event


I have tried replacing my appsrc with audiotestsrc, and in this case the pipeline works and there are no errors.

I have tried troublehooting by replacing elements with fakesink, e.g. "appsrc ! fakesink", "appsrc ! queue ! opusenc ! fakesink", etc. The errors start occurring when rtpopuspay appears in the pipeline.

I have tried sending a SEGMENT event before calling push_buffer, but this doesn't change anything. Admittedly, I am not sure how to populate the SEGMENT event if it is relevant. I looked through the source code of audiotestsrc, and as far as I can tell, it does not send a SEGMENT event.

Can anyone see what I am doing wrong?
Best regards,
Thorsten

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200623/733b5404/attachment.htm>


More information about the gstreamer-devel mailing list