From 71a237268e8a60658314d3470332300179a50240 Mon Sep 17 00:00:00 2001
From: Florent Castelli
// New enum for video frame types. Will eventually re-use the equivalent defined
@@ -358,6 +367,8 @@ dictionary RTCEncodedVideoFrameMetadata {
sequence<unsigned long> contributingSources;
long long timestamp; // microseconds
unsigned long rtpTimestamp;
+ DOMHighResTimeStamp captureTimestamp;
+ DOMHighResTimeStamp senderCaptureTimeOffset;
DOMString mimeType;
};
@@ -430,6 +441,51 @@ dictionary RTCEncodedVideoFrameMetadata {
The RTP timestamp identifier is an unsigned integer value per [[RFC3550]]
that reflects the sampling instant of the first octet in the RTP data packet.
+ The {{captureTimestamp}} is the timestamp that, the most recent frame (from an RTP packet + originating from this source) delivered to the {{RTCRtpReceiver}}'s {{MediaStreamTrack}}, was + originally captured. Its reference clock is the capture system's NTP clock (same clock used + to generate NTP timestamps for RTCP sender reports on that system). + + On populating this member, the user agent MUST run the following steps: + 1. If the relevant RTP packet contains the [[RTP-EXT-CAPTURE-TIME|RTP Header Extension for + Absolute Capture Time]], return the value of the + [[RTP-EXT-CAPTURE-TIME#absolute-capture-timestamp|absolute capture timestamp]] field and + abort these steps. + 1. Otherwise, if the relevant RTP packet does not contain the RTP Header Extension for + Absolute Capture Time but a previous RTP packet did, return the result of calculating the + absolute capture timestamp according to [[RTP-EXT-CAPTURE-TIME#timestamp-interpolation| + timestamp interpolation]] and abort these steps. + 1. Otherwise, return undefined. + +
++ The {{senderCaptureTimeOffset}} is the sender system's estimate of the offset between its own + NTP clock and the capture system's NTP clock, for the same frame that the {{captureTimestamp}} was + originated from. + + On populating this member, the user agent MUST run the following steps: + 1. If the relevant RTP packet contains the [[RTP-EXT-CAPTURE-TIME|RTP Header Extension for Absolute + Capture Time]] and the estimated [[RTP-EXT-CAPTURE-TIME#estimated-capture-clock-offset|capture + clock offset field]] is present, return the value of the estimated capture clock offset field + and abort these steps. + 1. Otherwise, if the relevant RTP packet does not contain the [[RTP-EXT-CAPTURE-TIME|RTP Header + Extension for Absolute Capture Time]]'s [[RTP-EXT-CAPTURE-TIME#estimated-capture-clock-offset| + estimated capture clock offset]] field, but a previous RTP packet did, return the most recent + value that was present and abort these steps. + 1. Otherwise, return undefined. + +
+ The {{captureTimestamp}} is the timestamp that, the most recent frame (from an RTP packet + originating from this source) delivered to the {{RTCRtpReceiver}}'s {{MediaStreamTrack}}, was + originally captured. Its reference clock is the capture system's NTP clock (same clock used + to generate NTP timestamps for RTCP sender reports on that system). + + On populating this member, the user agent MUST run the following steps: + 1. If the relevant RTP packet contains the [[RTP-EXT-CAPTURE-TIME|RTP Header Extension for + Absolute Capture Time]], return the value of the + [[RTP-EXT-CAPTURE-TIME#absolute-capture-timestamp|absolute capture timestamp]] field and + abort these steps. + 1. Otherwise, if the relevant RTP packet does not contain the RTP Header Extension for + Absolute Capture Time but a previous RTP packet did, return the result of calculating the + absolute capture timestamp according to [[RTP-EXT-CAPTURE-TIME#timestamp-interpolation| + timestamp interpolation]] and abort these steps. + 1. Otherwise, return undefined. + +
++ The {{senderCaptureTimeOffset}} is the sender system's estimate of the offset between its own + NTP clock and the capture system's NTP clock, for the same frame that the {{captureTimestamp}} was + originated from. + + On populating this member, the user agent MUST run the following steps: + 1. If the relevant RTP packet contains the [[RTP-EXT-CAPTURE-TIME|RTP Header Extension for Absolute + Capture Time]] and the estimated [[RTP-EXT-CAPTURE-TIME#estimated-capture-clock-offset|capture + clock offset field]] is present, return the value of the estimated capture clock offset field + and abort these steps. + 1. Otherwise, if the relevant RTP packet does not contain the [[RTP-EXT-CAPTURE-TIME|RTP Header + Extension for Absolute Capture Time]]'s [[RTP-EXT-CAPTURE-TIME#estimated-capture-clock-offset| + estimated capture clock offset]] field, but a previous RTP packet did, return the most recent + value that was present and abort these steps. + 1. Otherwise, return undefined. + +
+