GNOME Bugzilla – Bug 616541
jackaudiosrc/sink needs to set layout on caps
Last modified: 2010-05-12 16:38:57 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.
Created attachment 159460 [details] [review] patch which sets the layout in the acquire function
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);
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.
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.
You forgot to include the gstutil.h for src. I did that in addition to your patch.