sjoerd at luon.net
Thu Mar 27 16:29:28 PDT 2008
On Thu, Mar 27, 2008 at 10:45:15PM +0100, Lennart Poettering wrote:
> On Thu, 27.03.08 20:27, Colin Guthrie (gmane at colin.guthr.ie) wrote:
> > >> I'll then either adapt module-zeroconf-discover or copy it to a new
> > >> module in order to allow for autodiscovery or Airport devices.
> > >
> > > I'd recommend splitting this into two modules: One module that browses
> > > for RAOP devices and then loads the other module for each instance it
> > > finds. Much like the zeroconf-discover + module-tunnel work right now.
> > :) I was actually going to use module-tunnel as my base for the actual
> > sink part so at least I'm in the right ball park.
> module-tunnel is certainly the worst module you could have
> picked. It's complicated, full of #ifdefs and doesn't even support all
> the newest fancy features of the core.
> > As I hinted above I'll either modify or copy the zeroconf-discover one.
> > I presume you'd prefer to make a separate module?
> Hmm, depends. It's up to you. A #ifdef based solution might be useful,
> i.e. conditional compilation of the RAOP and module-tunnel parts of
> zc-discover. That way you'd be able to share a single source and build
> two seperate modules of it. OTOH conditional compilation is a bit out
> of fashion these days. The alternative might be to split zc-disocver
> into three C files, and then compile two of them for one module and
> then two others for the other modules, if you understand what I mean.
Conditional compilation is indeed troublesome for distributions and most will
choose to just compile with all options as long as that doesn't pull in major
depends. But assuming that RAOP discovery is pure dns-sd. Then the extra code
for ROAP in zeroconf-discover should be minimal right?
In that case maybe just have it always discover both types of sinks and try to
always load the necessary modules (If say the RAOP module isn't available, this
loading fails but that not so bad). And optionall give the zeroconf an option
to enable/disable RAOP/native sink detection at runtime.
If you keep anything long enough, you can throw it away.
More information about the pulseaudio-discuss