This library may be used to create UPnP or DLNA servers via its RygelMediaServer class.
The RygelMediaServer reference documentation and this example explains how to implement a server.