xbmc/xbmc — pull request #2844 by Memphiz (2013-06-07 07:47:42+00:00)
Title: [droid] - add zeroconf support

This pull request does the following things:

1. Adds mDnsResponder to unified depends.
a. mDnsResponder is the bonjour lib from apple which we use on windows atm
b. For android we only compile a subset of the sources
c. While mDnsResponder is normally intended to be client server (e.x. bonjour service for windows) there is no possibility to run any daemons on android - there is an embedded version of mDnsResponder which allows us to use the same API without the need of a server/daemon (this is documented in the code and just involves the compilation of the right sourcefiles).

2. Refactor the zeroconf sources
a. Move the Windows implementation of Zeroconf and ZeroconfBrowser to its own directory "mdns" as it isn't windows specific anymore - we are using 98% of the code for android too.
b. Based on what we do with avahi - add new defines for MDNS (HAS_MDNS - for client/server like on windows, HAS_MDNS_EMBEDDED - for clientembedded on android)
c. Remove all OS assumptions from the zeroconf factory and use the defines from b instead
d. make configure aware of libmDnsEmbedded and do the defines accordingly

This results in:

1. Full Airplay support for android - same like the other platforms - music (airtunes), video and pictures (airplay)
2. Everything else gets announced via zeroconf (webserver, upnp, jsonrpc) - so remotes and stuff will see XBMC on android
in the network
3. Browsing for Zeroconf announcements

Known issues:
1. While browsing for zeroconf announcements is working - resolving doesn't on my odroid-x. This basically makes the browser useless because it shows the found services but you can't "enter" them. But i want to give this a field test because it might be related to the hacky android version of hardkernel...

This touches windows and android platforms only. @wsoltys would be nice if you could give it a compile test.
I guess @theuni would sign this off as he helped me alot with this?

I have no hard feelings if this doesn't get in during this merge windows (i am a bit late for that i admit).

And sorry that i didn't squash it down yet - i just wanted to bring it to attention and are not at a git-able rig atm ;)