File: README.md

package info (click to toggle)
shairplay 0.9.0~git20180824.096b61a%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 1,700 kB
  • sloc: ansic: 17,339; cpp: 348; python: 261; makefile: 50; objc: 26; sh: 1
file content (111 lines) | stat: -rw-r--r-- 4,296 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
Shairplay
=========
Free portable AirPlay server implementation similar to [ShairPort](https://github.com/abrasive/shairport).

Currently only AirPort Express emulation is supported.

Disclaimer
----------
All the resources in this repository are written using only freely available
information from the internet. The code and related resources are meant for
educational purposes only. It is the responsibility of the user to make sure
all local laws are adhered to.

Installation
------------

First you need to install some dependencies, for example on Ubuntu you would
write:
```
sudo apt-get install autoconf automake libtool
sudo apt-get install libltdl-dev libao-dev libavahi-compat-libdnssd-dev
sudo apt-get install avahi-daemon
```

```
./autogen.sh
./configure
make
sudo make install
```

Notice that libao is required in order to install the shairplay binary,
otherwise only the library is compiled and installed.

### Fairplay handshake support

The library has experimental support for handling fairplay handshake (used in
for example screen mirroring) using a playfair library that is licensed under
GPLv3. This can be enabled by adding ```--with-playfair``` to the
```./configure``` command above.

Usage
-----

Check available options with ```shairplay --help```:

```
Usage: shairplay [OPTION...]

  -a, --apname=AirPort            Sets Airport name
  -p, --password=secret           Sets password
  -o, --server_port=5000          Sets port for RAOP service
      --ao_driver=driver          Sets the ao driver (optional)
      --hwaddr=address            Sets the MAC address, useful if running multuple instances
      --ao_devicename=devicename  Sets the ao device name (optional)
      --ao_deviceid=id            Sets the ao device id (optional)
  -h, --help                      This help
```

Start the server with ```shairplay```, if you are connected to a Wi-Fi the
server should show as an AirPort Express on your iOS devices and Mac OS X
computers in the same network.

Notice that you need to have the airport.key file in your working directory when
starting the shairplay service. It is not included in the binary for possible
legal reasons.

Multiple Instances
------------------

Shairplay advertises over mDNS in the form 485D607CEE22@Dining Room Speakers where 485D607CEE22 is a MAC address. This is hardcoded to a nonsense value, which is not a problem so long as it's unique. However, if you run multiple Shairplay instances, iOS devices will only recognize one of them. To fix this, supply the --hwaddr option with different values on each device.

Related software
----------------

* [ShairPort](https://github.com/abrasive/shairport), original AirPort Express emulator
* [ALAC](http://craz.net/programs/itunes/alac.html), ALAC decoder by David Hammerton

Description
-----------

Short description about what each file in the main library does:

```
src/lib/base64.*         - base64 encoder/decoder
src/lib/dnssd.*          - dnssd helper functions
src/lib/http_parser.*    - HTTP parser from joyent (nginx fork)
src/lib/http_request.*   - Request parser that uses http_parser
src/lib/http_response.*  - Extremely simple HTTP response serializer
src/lib/httpd.*          - Generic HTTP/RTSP server
src/lib/logger.*         - Logging related functions
src/lib/netutils.*       - Mostly socket related code
src/lib/raop.*           - Main RAOP handler, handles all RTSP stuff
src/lib/raop_rtp.*       - Handles the RAOP RTP related stuff (UDP/TCP)
src/lib/raop_buffer.*    - Parses and buffers RAOP packets, resend logic here
src/lib/rsakey.*         - Decrypts and parses the RSA key to bigints
src/lib/rsapem.*         - Converts the RSA PEM key to DER encoded bytes
src/lib/sdp.*            - Extremely simple RAOP specific SDP parser
src/lib/utils.*          - Utils for reading a file and handling strings
```

Short description about what each file in the Qt application does:

```
AirTV-Qt/main.cpp                 - Initializes the application
AirTV-Qt/mainapplication.cpp      - Creates the tray icon and starts RAOP
AirTV-Qt/raopservice.cpp          - Handles all communication with the library
AirTV-Qt/raopcallbackhandler.cpp  - Converts C callbacks to Qt callbacks
AirTV-Qt/audiooutput.cpp          - Takes care of the actual audio output
```