Opened 16 years ago

Last modified 16 years ago

#988 new defect

ao_jack uses "only" the first ports found when using port=xxx

Reported by: jannis_achstetter@… Owned by: reimar
Priority: normal Component: ao
Version: HEAD Severity: minor
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

It's good that we can tell ao_jack to connect to some specific ports instead of the default ones using "-ao jack:port=xxx". I my case where mplayer is used for a larger livestream-project, I need mplayer to connect to several encoders named "xxx-pid", but ao_jack connected only to the first encoder (since I have only 2 channels played by mplayer). This is ok in general but needed to be modified for my case.
The attached patch makes ao_jack to connect to ALL ports found, starting at channel 0 again in case there are more ports found than we have channels. This is perfect for my case (since every encoder has exactly 2 channels and the media used by mplayer uses 2 as well) but might lead to some strange results on other setups.
If you consider this patch a good idea or harmless, feel free to (modify and) apply it to mainstream.

Attachments (2)

jack-use-more-ports.patch (2.3 KB ) - added by jannis_achstetter@… 16 years ago.
Patch to make ao_jack connect to all ports found
jack_allports.diff (628 bytes ) - added by reimar 16 years ago.
simpler version that should do the same

Download all attachments as: .zip

Change History (5)

by jannis_achstetter@…, 16 years ago

Attachment: jack-use-more-ports.patch added

Patch to make ao_jack connect to all ports found

comment:1 by jannis_achstetter@…, 16 years ago

description see above;
what I forgot: patch produces some output when MPlayer is verbose, mainly used by me to create the modification but I didn't remove it in since it might be intereseting/useful

by reimar, 16 years ago

Attachment: jack_allports.diff added

simpler version that should do the same

comment:2 by reimar, 16 years ago

attachments.isobsolete: 01

Your patch is not acceptable for SVN since I don't think most users will want e.g. the left channel coming out of their center speaker when playing stereo files on a 5.1 setup.
In addition as long as you know the number of ports and it's not more than 6 you can achieve this also via -af channels=...
Anyway, here is a simplified version of your patch that will also work better if you have less ports than channels (not sure how your version behaves in that case, but it looks wrong to me).

comment:3 by jannis_achstetter@…, 16 years ago

Yes, as I said, might lead to problems when using other setups, so it'll be better if this doesn't get applied. Was just a small hack for one specific case.
Maybe one can implement a way that ao_jack could work like "jack:port=applicationA,applicationB,applicationC" but that's just an idea.
Thanks for your shorter version of the patch, I'll test it later.
Bug can be closed, didn't know which resolution fits best so I didn't close it myself.

Note: See TracTickets for help on using tickets.