f104de7329d7bca8536e242a75934ca61b7c26d8
[deb_shairplay.git] / README.md
1 Shairplay
2 =========
3 Free portable AirPlay server implementation similar to [ShairPort](https://github.com/abrasive/shairport).
4
5 Currently only AirPort Express emulation is supported.
6
7 Disclaimer
8 ----------
9 All the resources in this repository are written using only freely available
10 information from the internet. The code and related resources are meant for
11 educational purposes only. It is the responsibility of the user to make sure
12 all local laws are adhered to.
13
14 Installation
15 ------------
16
17 First you need to install some dependencies, for example on Ubuntu you would
18 write:
19 ```
20 sudo apt-get install autoconf automake libtool
21 sudo apt-get install libltdl-dev libao-dev libavahi-compat-libdnssd-dev
22 sudo apt-get install avahi-daemon
23 ```
24
25 ```
26 ./autogen.sh
27 ./configure
28 make
29 sudo make install
30 ```
31
32 Notice that libao is required in order to install the shairplay binary,
33 otherwise only the library is compiled and installed.
34
35 Usage
36 -----
37
38 Check available options with ```shairplay --help```:
39
40 ```
41 Usage: shairplay [OPTION...]
42
43 -a, --apname=AirPort Sets Airport name
44 -p, --password=secret Sets password
45 -o, --server_port=5000 Sets port for RAOP service
46 --ao_driver=driver Sets the ao driver (optional)
47 --ao_devicename=devicename Sets the ao device name (optional)
48 --ao_deviceid=id Sets the ao device id (optional)
49 -h, --help This help
50 ```
51
52 Start the server with ```shairplay```, if you are connected to a Wi-Fi the
53 server should show as an AirPort Express on your iOS devices and Mac OS X
54 computers in the same network.
55
56 Related software
57 ----------------
58
59 * [ShairPort](https://github.com/abrasive/shairport), original AirPort Express emulator
60 * [ALAC](http://craz.net/programs/itunes/alac.html), ALAC decoder by David Hammerton
61
62 Description
63 -----------
64
65 Short description about what each file in the main library does:
66
67 ```
68 src/lib/base64.* - base64 encoder/decoder
69 src/lib/dnssd.* - dnssd helper functions
70 src/lib/http_parser.* - HTTP parser from joyent (nginx fork)
71 src/lib/http_request.* - Request parser that uses http_parser
72 src/lib/http_response.* - Extremely simple HTTP response serializer
73 src/lib/httpd.* - Generic HTTP/RTSP server
74 src/lib/logger.* - Logging related functions
75 src/lib/netutils.* - Mostly socket related code
76 src/lib/raop.* - Main RAOP handler, handles all RTSP stuff
77 src/lib/raop_rtp.* - Handles the RAOP RTP related stuff (UDP/TCP)
78 src/lib/raop_buffer.* - Parses and buffers RAOP packets, resend logic here
79 src/lib/rsakey.* - Decrypts and parses the RSA key to bigints
80 src/lib/rsapem.* - Converts the RSA PEM key to DER encoded bytes
81 src/lib/sdp.* - Extremely simple RAOP specific SDP parser
82 src/lib/utils.* - Utils for reading a file and handling strings
83 ```
84
85 Short description about what each file in the Qt application does:
86
87 ```
88 AirTV-Qt/main.cpp - Initializes the application
89 AirTV-Qt/mainapplication.cpp - Creates the tray icon and starts RAOP
90 AirTV-Qt/raopservice.cpp - Handles all communication with the library
91 AirTV-Qt/raopcallbackhandler.cpp - Converts C callbacks to Qt callbacks
92 AirTV-Qt/audiooutput.cpp - Takes care of the actual audio output
93 ```
94