path: root/airtunes2.rst
diff options
authorChristophe Fergeau <cfergeau@mandriva.com>2010-08-02 12:05:59 +0200
committerChristophe Fergeau <cfergeau@mandriva.com>2010-08-02 12:08:07 +0200
commit42e33cd9f6492cfd247038be2dfe66ef78903dcd (patch)
tree2bb82c402f397ebf58f36b36a725879eb54c7a15 /airtunes2.rst
parentAdd details about audio packet transmission (diff)
More detailed packet payload/UDP port descriptions
Add explanations about what port each kind of UDP packet goes, and in which direction they travel (sender => server or server => sender).
Diffstat (limited to 'airtunes2.rst')
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)
@@ -444,6 +446,10 @@ If ``Apple-Response``, ``Server`` or ``Audio-Latency`` in response:
+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 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.