GNOME Bugzilla – Bug 556641
rtpL16depay doesn't support multichannel audio
Last modified: 2009-01-23 08:44:46 UTC
Please describe the problem: gst-inspect reports that rtpL16depay supports multichannel audio. However, the pipeline I have receiving 4 channel audio reports the following errors: ** (<unknown>:27449): WARNING **: Failed to retrieve channel layout from caps. This usually means there is a GStreamer element that does not implement multichannel audio correctly. Please file a bug. ** (<unknown>:27449): WARNING **: Failed to retrieve channel layout from caps. This usually means there is a GStreamer element that does not implement multichannel audio correctly. Please file a bug. ** (<unknown>:27449): WARNING **: audioconvert0: size 1388 is not a multiple of unit size 16 0:00:00.102989147 27449 0x824c9f8 ERROR basetransform gstbasetransform.c:1290:gst_base_transform_prepare_output_buffer:<audioconvert0> unknown output size WARNING: Internal data flow error DEBUG: Debug details: gstbasesrc Steps to reproduce: 1. Create a pipeline that either interleaves audio (and sets the layout) or uses some other multichannel input (i.e. filesrc) 2. Payload it with rtpL16pay and send it to a receiver pipeline with gstrtpbin 3. Use rtpL16depay in the receiving pipeline to get the error Actual results: The audio receiver is unable to play the incoming audio. Expected results: The audio would be correctly depayloaded, as is the case for 1 or 2 channel audio. Does this happen every time? Yes. Other information:
First problem was basetransform not calling the fixate caps function in all cases so that sometimes the channel positions were not set resulting in the warnings above. * libs/gst/base/gstbasetransform.c: (gst_base_transform_find_transform), (gst_base_transform_getrange): If we have a fixate function, call it even if we already have fixed caps because the subclass might add some caps. Makes audioconvert add a default channel layout.
Second patch, add channel mappings and checks. * gst/rtp/gstrtpL16depay.c: (gst_rtp_L16_depay_setcaps): * gst/rtp/gstrtpL16pay.c: (gst_rtp_L16_pay_setcaps), (gst_rtp_L16_pay_getcaps): * gst/rtp/gstrtpchannels.c: (check_channels), (gst_rtp_channels_get_by_pos), (gst_rtp_channels_get_by_order), (gst_rtp_channels_create_default): * gst/rtp/gstrtpchannels.h: Add mappings for multichannel support. Does not completely just work because the getcaps function does not yet return the allowed channel mappings. See #556641.
Created attachment 121532 [details] Test case that fails This program creates 8 audiotestsrcs, interleaves them, then sends them through rtpL16pay, rtpL16depay, audioconvert, jackaudiosink. Requires a jack server to be running. Compile with: gcc -Wall -Werror -g -pthread -I/usr/local/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -L/usr/local/lib -lgstreamer-0.10 -lgstaudio-0.10 -lgobject-2.0 -lgmodule-2.0 -ldl -lgthread-2.0 -lrt -lxml2 -lglib-2.0 multiChannel.c -o multiChannel Currently fails with the message: ** (multiChannel:13409): WARNING **: audioconvert10: size 1388 is not a multiple of unit size 16 0:00:00.320827207 13409 0x80dbaa0 ERROR basetransform gstbasetransform.c:1304:gst_base_transform_prepare_output_buffer:<audioconvert10> unknown output size
* gst/rtp/gstrtpL16pay.c: (gst_rtp_L16_pay_flush), (gst_rtp_L16_pay_getcaps): Only put an integral amount of samples in the RTP packet. Fixes #556641.