Skip to content

Commit

Permalink
Updates after TPAC joint Media/WebRTC session.
Browse files Browse the repository at this point in the history
  • Loading branch information
handellm committed Sep 27, 2024
1 parent 41da924 commit 069793f
Showing 1 changed file with 29 additions and 20 deletions.
49 changes: 29 additions & 20 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1155,20 +1155,20 @@ <h2>Constrainable Properties</h2>
</table>
</section>
<section class="informative">
<h2>Timestamp concepts</h2>
<h2>Video timestamp concepts</h2>
<p>
Media flowing inside media stream tracks comprise of a sequence of media frames, where
Video media flowing inside media stream tracks comprise of a sequence of video frames, where
the frames are sampled from the media at instants spread out over time.
</p>
<p>
Each video frame has a <dfn class="export">presentation timestamp</dfn>
which is relative to the first frame appearing on the track.
</p>
<p>
Each frame may have a <dfn class="export">capture timestamp</dfn> representing
the instant it was captured. A source of frames can define how this timestamp is set, otherwise
it is unset.
</p>
<p>
Each video frame has a <dfn class="export">presentation timestamp</dfn>
which is relative to the first frame appearing on the track.
</p>
<p>
Each frame may have a <dfn class="export">receive timestamp</dfn> representing
the last received timestamp of packets used to produce this video frame was received in its entirety.
Expand All @@ -1193,30 +1193,39 @@ <h5>Members</h5>
<dl class="dictionary-members" data-link-for="VideoFrameMetadata" data-dfn-for="VideoFrameMetadata">
<dt><dfn><code>captureTime</code></dfn> of type <span class="idlMemberType">DOMHighResTimeStamp</span></dt>
<dd>
<p>
The capture timestamp of the frame relative to {{Performance}}.{{Performance/timeOrigin}}.
MUST be set to the [=capture timestamp=] of the source {{MediaStreamTrack}} video frame if set.
It is not [=map/exist|present=] if [=capture timestamp=] is unset.
<p>The capture timestamp of the frame relative to {{Performance}}.{{Performance/timeOrigin}}. It corresponds to
the [=capture timestamp=] of {{MediaStreamTrack}} video frames.
</p>
</dd>
<dt><dfn><code>receiveTime</code></dfn> of type <span class="idlMemberType">DOMHighResTimeStamp</span></dt>
<dd>
<p>
The receive time of the corresponding encoded frame relative to {{Performance}}.{{Performance/timeOrigin}}.
MUST be set to the [=receive timestamp=] of the source {{MediaStreamTrack}} video frame if set.
It is not [=map/exist|present=] if [=receive timestamp=] is unset.
</p>
<p>The receive time of the corresponding encoded frame relative to {{Performance}}.{{Performance/timeOrigin}}.
It corresponds to the [=receive timestamp=] of {{MediaStreamTrack}} video frames.</p>
</dd>
<dt><dfn><code>rtpTimestamp</code></dfn> of type <span class="idlMemberType">unsigned long</span></dt>
<dd>
<p>
The RTP timestamp of the corresponding encoded frame.
MUST be set to the [=RTP timestamp=] of the source {{MediaStreamTrack}} video frames if set.
It is not [=map/exist|present=] if [=receive timestamp=] is unset.
</p>
<p>The RTP timestamp of the corresponding encoded frame. It corresponds to [=RTP timestamp=] of
{{MediaStreamTrack}} video frames.</p>
</dd>
</dl>
</section>
<h3>Algorithms</h3>
The <dfn for=VideoFrame class="export">Initialize Video Frame Timestamps From Internal MediaStreamTrack Video Frame</dfn>
algorithm runs with |frame| as input.
<ol>
<li>Set {{VideoFrame/timestamp}} from [=presentation timestamp=].</li>
<li>Set {{VideoFrameMetadata/captureTime}} from [=capture timestamp=] if set.</li>
<li>Set {{VideoFrameMetadata/receiveTime}} from [=receive timestamp=] if set.</li>
<li>Set {{VideoFrameMetadata/rtpTimestamp}} from [=RTP timestamp=] if set.</li>
</ol>
The <dfn for=VideoFrame class="export">Copy Video Frame Timestamps To Internal MediaStreamTrack Video Frame</dfn>
algorithm runs with |frame| as input.
<ol>
<li>Set [=presentation timestamp=] from {{VideoFrame/timestamp}}.</li>
<li>Set [=capture timestamp=] from {{VideoFrameMetadata/captureTime}} if [=map/exist|present=].</li>
<li>Set [=receive timestamp=] from {{VideoFrameMetadata/receiveTime}} if [=map/exist|present=].</li>
<li>Set [=RTP timestamp=] from {{VideoFrameMetadata/rtpTimestamp}} if [=map/exist|present=].</li>
</ol>
</section>
<section>
<h3>Local video capture timestamps</h3>
Expand Down

0 comments on commit 069793f

Please sign in to comment.