Search in sources :

Example 1 with ApacheUpnpServiceConfiguration

use of org.libresonic.player.service.upnp.ApacheUpnpServiceConfiguration in project libresonic by Libresonic.

the class UPnPService method createService.

private synchronized void createService() throws Exception {
    upnpService = new UpnpServiceImpl(new ApacheUpnpServiceConfiguration());
    // Asynch search for other devices (most importantly UPnP-enabled routers for port-mapping)
    upnpService.getControlPoint().search();
    // Start DLNA media server?
    setMediaServerEnabled(settingsService.isDlnaEnabled());
    Runtime.getRuntime().addShutdownHook(new Thread() {

        @Override
        public void run() {
            System.err.println("Shutting down UPnP service...");
            upnpService.shutdown();
            System.err.println("Shutting down UPnP service - Done!");
        }
    });
}
Also used : UpnpServiceImpl(org.fourthline.cling.UpnpServiceImpl) ApacheUpnpServiceConfiguration(org.libresonic.player.service.upnp.ApacheUpnpServiceConfiguration)

Aggregations

UpnpServiceImpl (org.fourthline.cling.UpnpServiceImpl)1 ApacheUpnpServiceConfiguration (org.libresonic.player.service.upnp.ApacheUpnpServiceConfiguration)1