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 616541 - jackaudiosrc/sink needs to set layout on caps
jackaudiosrc/sink needs to set layout on caps
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.10.19
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-04-22 16:40 UTC by Tristan Matthews
Modified: 2010-05-12 16:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
testcase to demonstrate the workaround (6.74 KB, text/x-csrc)
2010-04-22 16:40 UTC, Tristan Matthews
  Details
patch which sets the layout in the acquire function (4.37 KB, patch)
2010-04-23 21:37 UTC, Tristan Matthews
needs-work Details | Review
sets layout on spec->caps for source and sink (8.44 KB, patch)
2010-04-26 19:46 UTC, Tristan Matthews
none Details | Review
fixes multichannel issue for source (7.26 KB, patch)
2010-04-27 15:04 UTC, Tristan Matthews
committed Details | Review

Description Tristan Matthews 2010-04-22 16:40:12 UTC
Created attachment 159345 [details]
testcase to demonstrate the workaround

In the attached testcase, I have this pipeline:
jackaudiosrc->capsfilter->audioconvert->rtpL16pay->rtpL16depay->audioconvert->capsfilter->jackaudiosink

The second capsfilter should not be needed, the rtpL16depay element should simply set the channel-positions to GST_AUDIO_CHANNEL_POSITION_NONE since it can't know the order for more than 2 channels.
Comment 1 Tristan Matthews 2010-04-23 21:37:40 UTC
Created attachment 159460 [details] [review]
patch which sets the layout in the acquire function
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2010-04-26 19:09:03 UTC
Review of attachment 159460 [details] [review]:

::: ext/jack/gstjackaudiosrc.c
@@ +504,3 @@
+  /* if channels are less than or equal to 8, we set a default layout,
+   * otherwise set layout to an array of GST_AUDIO_CHANNEL_POSITION_NONE */
+  gst_caps_make_writable(spec->caps);

this should be
spec->caps = gst_caps_make_writable(spec->caps);
Comment 3 Tristan Matthews 2010-04-26 19:46:24 UTC
Created attachment 159637 [details] [review]
sets layout on spec->caps for source and sink

i put the function in a new file, gstjackutil.c and call it for source and sink.
Comment 4 Tristan Matthews 2010-04-27 15:04:54 UTC
Created attachment 159700 [details] [review]
fixes multichannel issue for source

this can be tested with:
gst-launch -v jackaudiosrc connect=0 ! audio/x-raw-float, channels=12 ! audioconvert ! fakesink silent=true

the separate issue that is still not resolved is why this works:
gst-launch -v jackaudiosrc connect=0 ! audio/x-raw-float, channels=12 ! audioconvert ! rtpL16pay ! rtpL16depay ! audioconvert ! audio/x-raw-float, channels=12 ! jackaudiosink connect=0

and this works:
gst-launch -v jackaudiosrc connect=0 ! audio/x-raw-float, channels=11 ! audioconvert ! rtpL16pay ! rtpL16depay ! audioconvert ! jackaudiosink connect=0

but this does not:
gst-launch -v jackaudiosrc connect=0 ! audio/x-raw-float, channels=12 ! audioconvert ! rtpL16pay ! rtpL16depay ! audioconvert ! jackaudiosink connect=0

This is either some edge case for channels > 11 that audioconvert doesn't handle properly, or jackaudiosink is supposed to be doing some extra negotiation to work properly with audioconvert since it doesn't need a channel-positions layout.
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2010-04-30 07:06:34 UTC
You forgot to include the gstutil.h for src. I did that in addition to your patch.