Skip to content

PieVo/libupnppsamples-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libupnpp sample programs

This repository has a bunch of small(ish) sample programs to help with starting-up a libupnpp-based project. Some of them may be useful in their own right but beware:

Note
none of the samples take a lot of care about managing memory because they’re of the 'run once and die' kind. Be careful about cleanup if you integrate bits of code in a longer-running program.

The different samples are hopefully commented enough to be understandable and useful.

samples

src/uplistdir.cpp

Just list all devices and services on the local network, using the simple libupnpp discovery 'traverse' method, which has to wait for the full discovery window.

src/rdcvolume.cpp

Control the volume on an UPnP AV renderer, using the keyboard. This is a simple demonstration of using a predefined libupnpp control class to control a standard device. It uses discovery callbacks to connect to the device as soon as it responds to search.

src/myrdcvolume.cpp

This is functionally the same as rdcvolume, but it defines its own service control interface class. This is to show how you can do stuff without the predefined control classes, and use libupnpp to control an arbitrary UPnP device.

hello_src/hellodevice.cpp, hello_src/helloctl.cpp

This shows how to implement a "Hello World" device/service and the corresponding control interface. Nothing in there that is not more interestingly implemented in upmpdcli, but it is as simple as possible, so certainly easier to understand.

upsend_src

A program to send an audio file to an UPnP AV renderer, without using a Media Server. Can also send a 44100/16/2 stream read on stdin as a wav file. The file description part (DIDL) is not too smart, but most renderers don’t seem to care. It uses libmicrohttpd to serve the audio file to the renderer. Possibly could be improved and find a use.

src/multirdr.cpp

Shows that we can get events from multiple UPnP AV renderers.

src/upexplo.cpp

Has a whole bunch of more or less useful code snippets, accessing UPnP AV Media Server and Renderer services.

src/ohradio.cpp, src/ohsender.cpp

Code to interface the OpenHome Radio and Sender services. Not sure that this is good for anything…​

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages