path: root/airtunes2.rst
diff options
Diffstat (limited to 'airtunes2.rst')
1 files changed, 43 insertions, 5 deletions
diff --git a/airtunes2.rst b/airtunes2.rst
index c06db62..1266194 100644
--- a/airtunes2.rst
+++ b/airtunes2.rst
@@ -19,7 +19,7 @@ Credits
* `Rogue Amoeba Software, LLC <http://www.rogueamoeba.com/>`_
-Streaming audio to an AirTunes 2 compatible device
+Streaming audio to an AirTunes 2 compatible server
If encryption is necessary, a random key and IV (initialization vector) for AES
@@ -29,10 +29,41 @@ Every stream has a timestamp (uint64; initially set to ``INITIAL_TIMESTAMP``,
see Constants_) and sequence number (int16; initially set to 0) attached to it.
Both are updated when sending audio packets.
-Up to ``PACKET_BACKLOG`` audio packets should be kept around to resend them if
-necessary. After sending a audio packet, the sender should check if a sync
-packet should also be sent (basically every ``TIMESYNC_INTERVAL`` frames and
-just after connecting).
+There are ``TIMESTAMPS_PER_SECOND`` timestamp ticks per second (equivalent
+to the number of frames per second).
+Up to ``PACKET_BACKLOG`` audio packets should be kept around after encoding and
+encryption to resend if necessary. After sending an audio packet, the sender
+should check if a sync packet should also be sent (basically every
+``TIMESYNC_INTERVAL`` frames and just after connecting).
+#. Establish TCP connection to RTSP port
+ - IP address(es) from Zeroconf TXT record
+#. Send RTSP ``OPTIONS`` request
+#. Send RTSP ``ANNOUNCE`` request
+ - Use password authentication based on authentication type from Zeroconf TXT
+ record or after receiving HTTP status code 401 (``401 Unauthorized``)
+#. Send RTSP ``SETUP`` request
+#. Set sequence number of connection to a random value between 0 and 8192,
+ timestamp and normal play time to 0 each
+#. Send RTSP ``RECORD`` request
+#. Send initial volume (see `Setting volume`_)
+#. Prepare RTP connection for audio packets
+#. Stop sending audio data
+#. Close RTSP connection
Preferred TCP/UDP ports
@@ -314,6 +345,13 @@ Body Metadata in PList format
======= ===================================
+AirTunes 2 uses the HTTP Digest authentication method as described
+in RFC2617.
Detect speaker type