After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 556641 - rtpL16depay doesn't support multichannel audio
rtpL16depay doesn't support multichannel audio
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: Normal normal
: 0.10.14
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-10-16 21:22 UTC by Tristan Matthews
Modified: 2009-01-23 08:44 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Test case that fails (7.70 KB, text/plain)
2008-10-28 18:59 UTC, Tristan Matthews
Details

Description Tristan Matthews 2008-10-16 21:22:44 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:
Comment 1 Wim Taymans 2008-10-28 10:02:33 UTC
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.
Comment 2 Wim Taymans 2008-10-28 10:04:45 UTC
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.
Comment 3 Tristan Matthews 2008-10-28 18:59:19 UTC
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
Comment 4 Wim Taymans 2008-10-29 18:28:44 UTC
        * 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.