xref: /aosp_15_r20/external/webrtc/docs/native-code/rtp-hdrext/abs-send-time/README.md (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1*d9f75844SAndroid Build Coastguard Worker# Absolute Send Time
2*d9f75844SAndroid Build Coastguard Worker
3*d9f75844SAndroid Build Coastguard WorkerThe Absolute Send Time extension is used to stamp RTP packets with a timestamp
4*d9f75844SAndroid Build Coastguard Workershowing the departure time from the system that put this packet on the wire
5*d9f75844SAndroid Build Coastguard Worker(or as close to this as we can manage). Contact <[email protected]> for
6*d9f75844SAndroid Build Coastguard Workermore info.
7*d9f75844SAndroid Build Coastguard Worker
8*d9f75844SAndroid Build Coastguard WorkerName: "Absolute Sender Time" ; "RTP Header Extension for Absolute Sender Time"
9*d9f75844SAndroid Build Coastguard Worker
10*d9f75844SAndroid Build Coastguard WorkerFormal name: <http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time>
11*d9f75844SAndroid Build Coastguard Worker
12*d9f75844SAndroid Build Coastguard WorkerSDP "a= name": "abs-send-time" ; this is also used in client/cloud signaling.
13*d9f75844SAndroid Build Coastguard Worker
14*d9f75844SAndroid Build Coastguard WorkerNot unlike [RTP with TFRC](http://tools.ietf.org/html/draft-ietf-avt-tfrc-profile-10#section-5)
15*d9f75844SAndroid Build Coastguard Worker
16*d9f75844SAndroid Build Coastguard WorkerWire format: 1-byte extension, 3 bytes of data. total 4 bytes extra per packet
17*d9f75844SAndroid Build Coastguard Worker(plus shared 4 bytes for all extensions present: 2 byte magic word 0xBEDE, 2
18*d9f75844SAndroid Build Coastguard Workerbyte # of extensions). Will in practice replace the "toffset" extension so we
19*d9f75844SAndroid Build Coastguard Workershould see no long term increase in traffic as a result.
20*d9f75844SAndroid Build Coastguard Worker
21*d9f75844SAndroid Build Coastguard WorkerEncoding: Timestamp is in seconds, 24 bit 6.18 fixed point, yielding 64s
22*d9f75844SAndroid Build Coastguard Workerwraparound and 3.8us resolution (one increment for each 477 bytes going out on
23*d9f75844SAndroid Build Coastguard Workera 1Gbps interface).
24*d9f75844SAndroid Build Coastguard Worker
25*d9f75844SAndroid Build Coastguard WorkerRelation to NTP timestamps: abs_send_time_24 = (ntp_timestamp_64 >> 14) &
26*d9f75844SAndroid Build Coastguard Worker0x00ffffff ; NTP timestamp is 32 bits for whole seconds, 32 bits fraction of
27*d9f75844SAndroid Build Coastguard Workersecond.
28*d9f75844SAndroid Build Coastguard Worker
29*d9f75844SAndroid Build Coastguard WorkerNotes: Packets are time stamped when going out, preferably close to metal.
30*d9f75844SAndroid Build Coastguard WorkerIntermediate RTP relays (entities possibly altering the stream) should remove
31*d9f75844SAndroid Build Coastguard Workerthe extension or set its own timestamp.
32