aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--airtunes2.rst12
1 files changed, 10 insertions, 2 deletions
diff --git a/airtunes2.rst b/airtunes2.rst
index 29779ca..4af1764 100644
--- a/airtunes2.rst
+++ b/airtunes2.rst
@@ -27,7 +27,8 @@ encryption, 16 bytes each, should be generated.
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.
+Both are updated when sending audio packets. Audio data is encapsulated in
+RTP packets which are sent sent as UDP packets to the audio port.
There are ``TIMESTAMPS_PER_SECOND`` timestamp ticks per second (equivalent
to the number of frames per second).
@@ -336,6 +337,7 @@ Headers ``Transport: RTP/AVP/UDP;unicast;interleaved=0-1;mode=record;control_por
Get ``server_port``, ``control_port`` and ``timing_port`` from ``Transport``
response header. Get ``Session`` response header and use it as server session ID.
+(TODO server_port is missing from the Transport: example above)
TEARDOWN
~~~~~~~~
@@ -444,6 +446,10 @@ If ``Apple-Response``, ``Server`` or ``Audio-Latency`` in response:
Timing
------
+The server will send Timing request UDP packets to the timing port. The
+sender will answer to this Timing request with a Timing response UDP packet
+sent to the server timing port.
+
Replying to timing packet
~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -466,7 +472,9 @@ Replying to timing packet
Sync
----
-Sync packets are sent once per second or when adding a speaker.
+Sync packets are sent once per second or when adding a speaker. They are sent
+to the device control port as UDP packets. The next_timestamp field corresponds
+to the RTP timestamp of the next audio packet that will be sent.
TODO: More details such as timing adjustments.