Skip to main content

Module utc_timing

Module utc_timing 

Source
Expand description

UTCTiming schemes and the client-measured clock sample.

ISO/IEC 23009-1 5.8.5.7 Table 35 names the schemes; the sampling rule (midpoint of the request/response exchange, uncertainty = half the round trip plus the time source’s own resolution) is docs/dash-runtime/DESIGN.md 3.3. The caller measures sent_us and received_us on its own monotonic clock; nothing here reads a clock.

Structs§

Exchange
The request/response pair the caller timed on its monotonic clock.
UtcSample
One clock measurement: at monotonic mono_us the UTC time was utc_us (Unix microseconds), give or take uncertainty_us.

Enums§

UtcScheme
A UTCTiming scheme (Table 35).

Constants§

DATE_HEADER_HALF_SECOND_US
Date carries whole seconds (RFC 9110 5.6.7): the sample is taken at the middle of the second and the half second is added to the uncertainty.
HTTP_NTP_RESOLUTION_US
Resolution of an NTP timestamp read over HTTP, in microseconds.
SCHEME_DIRECT
5.8.5.7: urn:mpeg:dash:utc:direct:2014.
SCHEME_HTTP_HEAD
5.8.5.7: urn:mpeg:dash:utc:http-head:2014.
SCHEME_HTTP_ISO
5.8.5.7: urn:mpeg:dash:utc:http-iso:2014.
SCHEME_HTTP_NTP
5.8.5.7: urn:mpeg:dash:utc:http-ntp:2014.
SCHEME_HTTP_XSDATE
5.8.5.7: urn:mpeg:dash:utc:http-xsdate:2014.
SCHEME_NTP
5.8.5.7: urn:mpeg:dash:utc:ntp:2014.
SCHEME_SNTP
5.8.5.7: urn:mpeg:dash:utc:sntp:2014.
UTC_BODY_MAX_BYTES
Largest UTC response body read (DESIGN risk R3).

Functions§

sample_from_body
Sample from the body of an http-xsdate, http-iso or http-ntp response.
sample_from_date_header
Sample from the Date header of an http-head (or any) response.
sample_from_direct
Sample from a direct scheme @value, taken at the midpoint of the MPD response exchange.
sample_from_exchange
Build a sample from a timed exchange and the server time it returned.