xbmc/xbmc — pull request #698 by Memphiz (2012-02-17 17:01:17+00:00)
Title: Preparations for sourcing AirPlay out into a python addon

This PR is a preparation for factoring the whole AirPlay/AirTunes stuff out into a python addon.

What this PR does:

1. Extend the PipesManager to add some sort of plain C interface for using it from Python. PipesManager allows to create a pipe and read or write from/to it. The pipe can be feed into our player with using the pipe:// protocol (this is already used for internal AirTunes).

2. Expose the PipesManager API via our python interface (getting the object into python by accessing xbmc.PipesManager).

3. Expose our Zeroconf API via our python interface (allowing addons to announce or deannounce services) - accessible via xbmc.Zeroconf. This is build only when avahi is there on linux. (at least thats what i wanted to accomplish with the buildsys adaptions here haha).

4. Add the InfoLabels "seekbar, progress, progresscache" which where there already but only hooked up in the GetInt method not in the GetLabel method.

5. Additions to our Builtin functions:
a. Add "ShowPicture" for showing a single picture given by an URL - its just a wrapper for g_application.getApplicationMessenger().PictureShow(url) which wasn't there before (only slideshow builtins with a folder as argument as of now)

b. New params for the PlayMedia builtin:
* startpercentage= <- for telling the player to start the media at a given percentage (wrapper for the SetProperty of the item)
* mimytype= <- wrapper for item.SetMimeType("audio/blubblibb");
* isradio <- when set - SetProperty("isradio",true) on item
* isfile <- when set - item.m_bIsFolder = false; (opposite of isdir)
* no-skip <- when set - SetProperty("no-skip",true) on item
* no-pause <- when set - SetProperty("no-pause,true) on item

Sounds like much but imho its not very intrusive all in all. I have the python addon ready too. It still depends on libshairport for AirTunes (and will download it after addon installation - same like with boblight). It has identical features like the internal version as of now - but since we are still missing the python ctypes module on iOS - AirTunes is not available. We can get rid of the libplist dependency when finally removing the internal implementation.

Well i think its something we want for the future. It makes it easier to adapt protocol changes or new findings via addon. Also it might be interesting for 3rd party companys who having doubt about legality or something.

No Eden food.