GNOME Bugzilla – Bug 490184
[audioconvert] don't set channel-positions on fixate caps
Last modified: 2007-10-25 18:24:51 UTC
The audioconvert element don't recognize the channel-positions when trying to fixate the caps. Therefore this information can get lost on caps negotiation. tvermeir@tvermeir-laptop:> gst-launch-0.10 -v --gst-fatal-warnings filesrc location=~/pinball.wmv ! asfdemux ! fluwmadec ! audioconvert ! audioresample ! fakesink silent=true Setting pipeline to PAUSED ... Pipeline is PREROLLING ... /pipeline0/fluwmadec0.src: caps = audio/x-raw-int, channels=(int)6, width=(int)24, depth=(int)24, rate=(int)48000, signed=(boolean)true, endianness=(int)1234, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_LFE, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT > /pipeline0/fluwmadec0.sink: caps = audio/x-wma, wmaversion=(int)3, bitrate=(int)258992, depth=(int)24, rate=(int)48000, channels=(int)6, block_align=(int)10923, codec_data=(buffer)18003f0000000000000000000000e0000000 ** 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. aborting... Aborted (core dumped)
Created attachment 97857 [details] [review] Add some basic channel position support for audioconvert These patch adds the channel positions to the caps to the other caps. If the channels are increased we drop the known positions ( GST_AUDIO_CHANNEL_POSITION_NONE), if we decrease we assume we drop the last known channels.
This looks very similar to bug #430677. > These patch adds the channel positions to the caps to the other caps. If the > channels are increased we drop the known positions ( > GST_AUDIO_CHANNEL_POSITION_NONE), if we decrease we assume we drop the last > known channels. This doesn't look right to me. Firstly, it's not allowed to mix NONE positions with other positions in a channel layout, but even if it was, it would produce output that's not particularly useful (if not entirely nonsensical) in practice. Secondly, there is mixing going on in audioconvert, so just adding/dropping channels just doesn't seem the right thing to do IMHO. I think it would be reasonable for audioconvert to require downstream to provide a channel layout (ie. you'd have to specify one via the filter caps in your scenario), but I'll see how much work it is to fix it up so that it works in all cases. *** This bug has been marked as a duplicate of 430677 ***
> Firstly, it's not allowed to mix NONE positions > with other positions in a channel layout Sorry, I misunderstood. You're not mixing positions, you're just marking them all as NONE. Not sure how much sense that makes though, will have a think about it.
I mark them as NONE because I don't know if you create more channels with this plugin what the location of this channels are. And because mixing is not allowed I set all channels to NONE.