rtppcmadepay error: "Segment with non-TIME format not supported"

34 views
Skip to first unread message

Ayberk Vardar

unread,
Dec 7, 2023, 8:03:56 AM12/7/23
to gstreamer-java
Hi all, 

I have a rtppcmadepay in my rtp-audio processing pipeline and trying to depay causes  internal data stream error.

No idea how to address it as there is virtually nothing on google that can help. There is a commit log on the gstreamer source code that is probably causing this: 

My pipeline: 
appsrc (rtp packets over udp) > capsfilter > rtpptdemux > queue > customtransform > rtppcmadepay > alawdec > audioconvert > audioresample > jackaudiosink

I know the rtppcmadepay causes the issue because if I don't use it and reduce the pipeline into the following, the issue disappears:
appsrc (rtp packets over udp) > capsfilter > rtpptdemux > queue > customtransform > fakesink

Library logs have the following relevant info: 

0:01:34.830814965 234324 0x7f6614006300 ERROR rtpbasedepayload gstrtpbasedepayload.c:623:gst_rtp_base_depayload_handle_event:<rtppcmadepay0> Segment with non-TIME format not supported
GstBus :: eventReceived(): SegmentEvent : structure: GstEventSegment, segment=(GstSegment)"GstSegment, flags=(GstSegmentFlags)GST_SEGMENT_FLAG_NONE, rate=(double)1, applied-rate=(double)1, format=(GstFormat)GST_FORMAT_BYTES, base=(guint64)0, offset=(guint64)0, start=(guint64)0, stop=(guint64)18446744073709551615, time=(guint64)0, position=(guint64)0, duration=(guint64)18446744073709551615;";
The element that fires the SegmentEvent is connected to rtppcmadepay
and event structure contains the following info which I suspect is related with the depayloader error: (GstFormat)GST_FORMAT_BYTES

I tried setting the data format from my AppSrc element as TIME (not BYTES) but it did NOT help.
ie -> BaseSrcAPI.BASESRC_API.gst_base_src_set_format(this, Format.TIME);

One potential issue here might be: even if I set the format right, rtpptdemux element above (which is before the depayloader) overrides it when it outputs on its src pads.

Another thing to note is rtppcmadepay has not have any parsers in front of it. gstreamer porting notes from 0.10 to 1.0 recommends this:

Then again there doesn't seem to be any parser related to rtp streams that I can place in front of the rtppcmadepay

Sorry for the info dump but hopefully it makes sense to veterans here. I am porting a java app that used to work with the old gstreamer (before 1.0). 

Pls let me know if more info is needed. 

Ayberk Vardar

unread,
Jan 16, 2024, 11:04:49 AMJan 16
to gstreamer-java
Was able to get rid of the internal data stream error by doing the following: 

- Adding the following element (in front of rtppcmadepay): rtpjitterbuffer 
- Handling the GstSegmentEvent on the sinkpad of depayloader and then (within the same event handler), sending a ReconfigureEvent upstream 

PS: forgot to mention above, versions: 
  • gstreamer = 1.16.3
  • gst1-java-core = 1.4.0
Reply all
Reply to author
Forward
0 new messages