a b/README.asc
1
= libupnpp sample programs
2
3
This repository has a bunch of small(ish) sample programs to help with
4
starting-up a libupnpp-based project. Some of them may be useful in their
5
own right but beware:
6
7
NOTE: none of the samples take a lot of care about managing memory because
8
they're of the 'run once and die' kind. Be careful about cleanup if you
9
integrate bits of code in a longer-running program.
10
11
The different samples are hopefully commented enough to be understandable
12
and useful.
13
14
== samples
15
16
=== src/uplistdir.cpp
17
18
Just list all devices and services on the local network, using the simple
19
libupnpp discovery 'traverse' method, which has to wait for the full
20
discovery window.
21
22
=== src/rdcvolume.cpp
23
24
Control the volume on an UPnP AV renderer, using the keyboard. This is a
25
simple demonstration of using a predefined libupnpp control class to control a
26
standard device. It uses discovery callbacks to connect to the device as
27
soon as it responds to search.
28
29
=== src/myrdcvolume.cpp
30
31
This is functionally the same as rdcvolume, but it defines its own service
32
control interface class. This is to show how you can do stuff without the
33
predefined control classes, and use libupnpp to control an arbitrary UPnP
34
device.
35
36
=== hello_src/hellodevice.cpp, hello_src/helloctl.cpp
37
38
This shows how to implement a "Hello World" device/service and the
39
corresponding control interface. Nothing in there that is not more
40
interestingly implemented in upmpdcli, but it is as simple as possible,
41
so certainly easier to understand.
42
43
=== upsend_src
44
45
A program to send an audio file to an UPnP AV renderer, without using a
46
Media Server. Can also send a 44100/16/2 stream read on stdin as a wav
47
file. The file description part (DIDL) is not too smart, but most
48
renderers don't seem to care. It uses libmicrohttpd to serve the audio file
49
to the renderer. Possibly could be improved and find a use.
50
51
=== src/multirdr.cpp
52
53
Shows that we can get events from multiple UPnP AV renderers.
54
55
=== src/upexplo.cpp
56
57
Has a whole bunch of more or less useful code snippets, accessing UPnP AV
58
Media Server and Renderer services.
59
60
=== src/ohradio.cpp, src/ohsender.cpp
61
62
Code to interface the OpenHome Radio and Sender services. Not sure that
63
this is good for anything...
64