Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rtpTimestamp to RTCRtpContributingSource #2178

Merged
merged 3 commits into from May 9, 2019

Conversation

drkron
Copy link
Contributor

@drkron drkron commented Apr 24, 2019

Fixes #2177


Preview | Diff

webrtc.html Outdated
"idlMemberType">unsigned long</span>
<dd>
<p>The RTP timestamp of the latest played out media that arrived
in an RTP packet originating from this source.</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we refer this to the variable above, as "RTP timestamp of the media played out at "timestamp", to make it clear that the two timestamps are required to be from the same packet?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @alvestrand that this needs to correlate with the same packet, not the "latest".

See also #2172 (comment) wrt this API—at least in Firefox—returns data no sooner than at time of playout.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that makes sense. I think this change should be coordinated with #2172 .

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -7295,6 +7295,7 @@ <h2>Methods</h2>
required DOMHighResTimeStamp timestamp;
required unsigned long source;
double audioLevel;
unsigned long rtpTimestamp;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that RTCRtpSynchronizationSource is derived from RTCRtpContributingSource. Did you mean to add rtpTimestamp to both? Just making sure it's not done by accident.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know the details of this well enough to tell which is the correct place to put it. To me it makes sense put it where you have the other timestamp in contributing source though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it belongs here. Both the SSRC and CSRC dictionary contains information from a particular RTP packet. This is more information about that RTP packet, so it can be added to both. (For the intended use case it would be enough to have it in the SSRC dictionary, but it doesn't hurt to have it here too.)

@henbos
Copy link
Contributor

henbos commented Apr 25, 2019

@jan-ivar to get implementers to comment

@jan-ivar
Copy link
Member

@na-g can you comment on how this fits with our implementation? My concern is that this API is geared toward being "the audio bar API" in many respects, principally in that, at the time you poll the method, you get data related to playout right now. This means you won't get rtpTimestamp until playout time. Is this sufficient for the use-cases suggested, or does this require a new API?

webrtc.html Outdated
<dt><dfn data-idl><code>rtpTimestamp</code></dfn> of type
<span class="idlMemberType">unsigned long</span></dt>
<dd>
<p>The RTP timestamp of the latest played out media that arrived
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This RTP timestamp will be from a remote clock, right? Do we need language here defining this similar to remoteTimestamp?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's reference [RFC3550] section 5.1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@drkron
Copy link
Contributor Author

drkron commented May 9, 2019

@jan-ivar @aboba @alvestrand Please have a look at the updated PR.

@aboba aboba merged commit 19e066f into w3c:master May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add RTP timestamp to RTCRtpContributingSource
5 participants