-
Notifications
You must be signed in to change notification settings - Fork 6
MPD Patch
MPD Patch was introduced in DASH 4'th edition, and is a way to ask for a diff between the latest MPD and one published at an earlier time.
The enabler for this functionality is a new element
PatchLocation
in the MPD that provides an URL where
an MPD Patch XML document can be fetched relative the
MPD carrying this URL.
The livesim2 URL parameter that enables this functionality is
called patch
and takes a parameter ttl
which is the
time-to-live in seconds.
A typical URL could look like:
https://livesim2.dashif.org/livesim2/patch_60/segtimeline_1/testpic_2s/Manifest.mpd
and will contain an MPD Patch URL in the PatchLocation
element like:
/patch/livesim2/patch_60/segtimeline_/testpic_2s/Manifest.mpp?publishTime=2024-04-19T12%3A16%3A56Z
(The date in publishTime is URL encoded). The MPD patch will contain the publishTime of the latest MPD and the difference. If there is no update yet, the new publishTime will be the same as the one asked for.
A patch is only available during a limited time interval.
The first time a patch is available is when there
is a new publishTime (an update of the MPD).
If a request is done before that time, livesim2
will respond with 425 Too Early
.
There is also a time limit. That is based on the ttl
value specified in
the /patch_ttl
URL parameter and also written in the MPD.
This ttl
value (extended by 10s) is also used to calculate an expiration
time for the patch. That expiration time is set in an HTTP Expires
header.
If a request is made later than this, livesim2 will respond with 410 Gone
.
One can use query-string parameters, to see this behavior, as is explained in the next chapter.
livesim2
allows for specifying the wall-clock time that should be used for generating responses.
In particular, one can ask for a DASH Patch with a publishTime
and a nowDate
that is e.g. 18s later as
https://livesim2.dashif.org/patch/livesim2/livesim2/patch_60/segtimeline_1/testpic_2s/Manifest.mpp?publishTime=2024-04-16T07:34:38Z&nowDate=2024-04-16T07:34:56Z"
(Here the dates are not URL-encoded). By choosing nowDate to be the same value or 1s after publishTime one can also see what the response will look like when the MPD has not yet been updated or the request is too late.