For a brief few weeks, I was using uShare to serve music files from my Linux box to my OmniFi DMS-1 [omnifiaudia4, omnifigroup] media player via UPnP [libupnp, ushareupnp]. When I got my Xbox360 [xbox360firstplay, xbox360dvdplayer, xbox360ad], I noticed that the latest version of uShare added support for the 360, so I upgraded. The new version of uShare required libupnp 1.3, so I had go through the hassle of building both it and uShare. And of course, after everything finally compiled and installed, nothing worked. The Xbox360 did not see the uShare server, and the OmniFi could no longer see it either. I've tried time and again to get it to work, with no positive results. So I gave up and tried GMediaServer.
GMediaServer is the official GNU UPnP media server. It is apparently included in some distros now, and available via apt for Debian. Naturally, this won't work for my old Linux box, so I had to build it myself. There were numerous errors, but I was able to fix them all. Here's what I had to do:
#include <upnp.h> and #include <upnptools.h> to read #include <upnp/upnp.h> and #include <upnp/upnptools.h>src/webserver.c so that len = min… reads len = MIN… (capitalize MIN)#include <upnp/ithread.h> to src/metadata.c (I slipped it in after line 40)src/gmediaserver.h (after the includes)
#ifndef IF_NAMESIZE
# ifdef IFNAMSIZ
# define IF_NAMESIZE IFNAMSIZ
# else
# define IF_NAMESIZE 16
# endif
#endif
After making all of the changes and successfully building the app, it works! The OmniFi sees it and plays music fine. Alas, the 360 doesn't see it, but it looks like there is some active code work happening on the 360 front. I'm in no hurry with the 360 anyway, as that thing is so noisy I would never leave it on when I'm listening to music.