w3c / webrtc-encoded-transform

WebRTC Encoded Transform
https://w3c.github.io/webrtc-encoded-transform/
Other
122 stars 27 forks source link

add RTP timestamp to metadata #169

Open fippo opened 1 year ago

fippo commented 1 year ago

see also https://github.com/w3c/webrtc-encoded-transform/pull/116

https://w3c.github.io/webrtc-encoded-transform/#RTCEncodedVideoFrame-interface and https://w3c.github.io/webrtc-encoded-transform/#RTCEncodedAudioFrame-interface both define a timestamp as

readonly attribute unsigned long timestamp;

which by definition is the RTP timestamp (and this was changed to align with implementations). This is different from what we have in Webcodecs

  readonly attribute long long timestamp;          // microseconds

This is hard to fix so we should do this as follows:

aboba commented 1 year ago

rtpTimestamp is already defined in VideoFrameCallbackMetadata so it seems logical to have it also be a property of encoded chunks in both Encoded Transform and WebCodecs.

fippo commented 1 year ago

@tonyherre FYI

tonyherre commented 1 year ago

To update on what's been happening: #173 added the long long timestamp type into the Metadata, so we at least now have that field matching the webcodecs field in both type and definition. I created #203 to move the RTP timestamp to metadata and rename it to explicitly be rtcTimestamp - so the first bulletpoint in fippo's original comment.