@@ -48,6 +48,11 @@ spec:webidl; type:dfn; text:resolve
48
48
"CloneArrayBuffer": {
49
49
"href": "https://tc39.es/ecma262/#sec-clonearraybuffer",
50
50
"title": "CloneArrayBuffer"
51
+ },
52
+ "RTP-EXT-CAPTURE-TIME": {
53
+ "href": "https://webrtc.googlesource.com/src/+/refs/heads/main/docs/native-code/rtp-hdrext/abs-capture-time",
54
+ "title": "RTP Header Extension for Absolute Capture Time",
55
+ "publisher": "WebRTC Project"
51
56
}
52
57
}
53
58
</pre>
@@ -293,6 +298,10 @@ The <dfn method for="SFrameTransform">setEncryptionKey(|key|, |keyID|)</dfn> met
293
298
294
299
# RTCRtpScriptTransform # {#scriptTransform}
295
300
301
+ In this section, the capture system refers to the system where media is sourced from and the sender system
302
+ refers to the system that is sending RTP and RTCP packets to the receiver system where {{RTCEncodedVideoFrameMetadata}} data
303
+ or {{RTCEncodedAudioFrameMetadata}} data is populated.
304
+
296
305
## <dfn enum>RTCEncodedVideoFrameType</dfn> dictionary ## {#RTCEncodedVideoFrameType}
297
306
<pre class="idl">
298
307
// New enum for video frame types. Will eventually re-use the equivalent defined
@@ -358,6 +367,8 @@ dictionary RTCEncodedVideoFrameMetadata {
358
367
sequence<unsigned long> contributingSources;
359
368
long long timestamp; // microseconds
360
369
unsigned long rtpTimestamp;
370
+ DOMHighResTimeStamp captureTimestamp;
371
+ DOMHighResTimeStamp senderCaptureTimeOffset;
361
372
DOMString mimeType;
362
373
};
363
374
</pre>
@@ -430,6 +441,51 @@ dictionary RTCEncodedVideoFrameMetadata {
430
441
The RTP timestamp identifier is an unsigned integer value per [[RFC3550]]
431
442
that reflects the sampling instant of the first octet in the RTP data packet.
432
443
</p>
444
+ </dd>
445
+ <dt>
446
+ <dfn dict-member>captureTimestamp</dfn> <span class="idlMemberType"> DOMHighResTimeStamp</span>
447
+ </dt>
448
+ <dd>
449
+ <p>
450
+ The {{captureTimestamp}} is the timestamp that, the most recent frame (from an RTP packet
451
+ originating from this source) delivered to the {{RTCRtpReceiver}} 's {{MediaStreamTrack}} , was
452
+ originally captured. Its reference clock is the capture system's NTP clock (same clock used
453
+ to generate NTP timestamps for RTCP sender reports on that system).
454
+
455
+ On populating this member, the user agent MUST run the following steps:
456
+ 1. If the relevant RTP packet contains the [[RTP-EXT-CAPTURE-TIME|RTP Header Extension for
457
+ Absolute Capture Time]], return the value of the
458
+ [[RTP-EXT-CAPTURE-TIME#absolute-capture-timestamp|absolute capture timestamp]] field and
459
+ abort these steps.
460
+ 1. Otherwise, if the relevant RTP packet does not contain the RTP Header Extension for
461
+ Absolute Capture Time but a previous RTP packet did, return the result of calculating the
462
+ absolute capture timestamp according to [[RTP-EXT-CAPTURE-TIME#timestamp-interpolation|
463
+ timestamp interpolation]] and abort these steps.
464
+ 1. Otherwise, return undefined.
465
+
466
+ </p>
467
+ </dd>
468
+ <dt>
469
+ <dfn dict-member>senderCaptureTimeOffset</dfn> <span class="idlMemberType"> DOMHighResTimeStamp</span>
470
+ </dt>
471
+ <dd>
472
+ <p>
473
+ The {{senderCaptureTimeOffset}} is the sender system's estimate of the offset between its own
474
+ NTP clock and the capture system's NTP clock, for the same frame that the {{captureTimestamp}} was
475
+ originated from.
476
+
477
+ On populating this member, the user agent MUST run the following steps:
478
+ 1. If the relevant RTP packet contains the [[RTP-EXT-CAPTURE-TIME|RTP Header Extension for Absolute
479
+ Capture Time]] and the estimated [[RTP-EXT-CAPTURE-TIME#estimated-capture-clock-offset|capture
480
+ clock offset field]] is present, return the value of the estimated capture clock offset field
481
+ and abort these steps.
482
+ 1. Otherwise, if the relevant RTP packet does not contain the [[RTP-EXT-CAPTURE-TIME|RTP Header
483
+ Extension for Absolute Capture Time]]'s [[RTP-EXT-CAPTURE-TIME#estimated-capture-clock-offset|
484
+ estimated capture clock offset]] field, but a previous RTP packet did, return the most recent
485
+ value that was present and abort these steps.
486
+ 1. Otherwise, return undefined.
487
+
488
+ </p>
433
489
</dd>
434
490
<dt>
435
491
<dfn dict-member>mimeType</dfn> <span class="idlMemberType"> DOMString</span>
@@ -611,6 +667,8 @@ dictionary RTCEncodedAudioFrameMetadata {
611
667
sequence<unsigned long> contributingSources;
612
668
short sequenceNumber;
613
669
unsigned long rtpTimestamp;
670
+ DOMHighResTimeStamp captureTimestamp;
671
+ DOMHighResTimeStamp senderCaptureTimeOffset;
614
672
DOMString mimeType;
615
673
};
616
674
</pre>
@@ -664,6 +722,51 @@ dictionary RTCEncodedAudioFrameMetadata {
664
722
that reflects the sampling instant of the first octet in the RTP data packet.
665
723
</p>
666
724
</dd>
725
+ <dt>
726
+ <dfn dict-member>captureTimestamp</dfn> <span class="idlMemberType"> DOMHighResTimeStamp</span>
727
+ </dt>
728
+ <dd>
729
+ <p>
730
+ The {{captureTimestamp}} is the timestamp that, the most recent frame (from an RTP packet
731
+ originating from this source) delivered to the {{RTCRtpReceiver}} 's {{MediaStreamTrack}} , was
732
+ originally captured. Its reference clock is the capture system's NTP clock (same clock used
733
+ to generate NTP timestamps for RTCP sender reports on that system).
734
+
735
+ On populating this member, the user agent MUST run the following steps:
736
+ 1. If the relevant RTP packet contains the [[RTP-EXT-CAPTURE-TIME|RTP Header Extension for
737
+ Absolute Capture Time]], return the value of the
738
+ [[RTP-EXT-CAPTURE-TIME#absolute-capture-timestamp|absolute capture timestamp]] field and
739
+ abort these steps.
740
+ 1. Otherwise, if the relevant RTP packet does not contain the RTP Header Extension for
741
+ Absolute Capture Time but a previous RTP packet did, return the result of calculating the
742
+ absolute capture timestamp according to [[RTP-EXT-CAPTURE-TIME#timestamp-interpolation|
743
+ timestamp interpolation]] and abort these steps.
744
+ 1. Otherwise, return undefined.
745
+
746
+ </p>
747
+ </dd>
748
+ <dt>
749
+ <dfn dict-member>senderCaptureTimeOffset</dfn> <span class="idlMemberType"> DOMHighResTimeStamp</span>
750
+ </dt>
751
+ <dd>
752
+ <p>
753
+ The {{senderCaptureTimeOffset}} is the sender system's estimate of the offset between its own
754
+ NTP clock and the capture system's NTP clock, for the same frame that the {{captureTimestamp}} was
755
+ originated from.
756
+
757
+ On populating this member, the user agent MUST run the following steps:
758
+ 1. If the relevant RTP packet contains the [[RTP-EXT-CAPTURE-TIME|RTP Header Extension for Absolute
759
+ Capture Time]] and the estimated [[RTP-EXT-CAPTURE-TIME#estimated-capture-clock-offset|capture
760
+ clock offset field]] is present, return the value of the estimated capture clock offset field
761
+ and abort these steps.
762
+ 1. Otherwise, if the relevant RTP packet does not contain the [[RTP-EXT-CAPTURE-TIME|RTP Header
763
+ Extension for Absolute Capture Time]]'s [[RTP-EXT-CAPTURE-TIME#estimated-capture-clock-offset|
764
+ estimated capture clock offset]] field, but a previous RTP packet did, return the most recent
765
+ value that was present and abort these steps.
766
+ 1. Otherwise, return undefined.
767
+
768
+ </p>
769
+ </dd>
667
770
<dt>
668
771
<dfn dict-member>mimeType</dfn> <span class="idlMemberType"> DOMString</span>
669
772
</dt>
0 commit comments