GUPnP is an object-oriented open source framework for creating UPnP devices and control points, written in C using GObject and libsoup. The GUPnP API is intended to be easy to use, efficient and flexible.
GUPnP MediaServer is an implementation of the UPnP MediaServer V 2.0
specification based on GUPnP and tracker. It is written (mostly) in Vala language.
Download at http://gupnp.org/sources/gupnp-media-server/