GUPnP + Gobject Introspection Status

As I’ve been mentioning lately I have been working on using PyGObject + GObject Introspection (recently forked, now called PyGI + PyGObject + Gobject Introspection) and have some exciting news!

I have been working on fleshing out a whole bunch of unit tests which exercise the entire GUPnP API. I hate a major roadblock in that PyGI did not support native callbacks! So, after a week or two detour I have implemented PyGI callbacks (which now work rather nicely, but need a bunch of stylistic cleanups and error checking before its pushed back upstream.. priorities!) as well as some working GUPnP demos.

My best demo so far is about 25 lines of python which:

1) Gets all devices on one network interface
2) Scans for all the services each device provides
3) If the device is GMediaRenderer and it provides an AVTransport Service (it does…) then it
3a) Stops whatever is currently playing
3b) Loads a new URI (hardcoded from my mediatomb server for now, havn’t played enough with gupnp-av to dynamically get the mediatomb data — for now!)
3c) Initiates playing

3a->3c have been tested using the synchronous GUPnP action api (send_action…) as well as the asynchronous API (begin_action…. end_action…) with callbacks!

Leave a Reply

Your email address will not be published. Required fields are marked *