Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WebCodecs remote video encoders get timestamps in microseconds and no…
…t nanoseconds rdar://123684436 https://bugs.webkit.org/show_bug.cgi?id=270159 Reviewed by Eric Carlson. In WebRTC code path, we are getting a microsecond timestamp. We were converting it to a MediaTime in LibWebRTCCodecs which was then converted back to a nanosecond timestamp in LibWebRTCCodecsProxy. A factor of 1000 was applied in LibWebRTCCodecs and handled correctly on LibWebRTCCodecsProxy. The WebCodecs path is getting a MediaTime directly but without the 1000 factor. This was causing the timestamps given to WebCodecs encoder to be in microseconds and not nanoseconds. This can have an impact on encoders in some circumstances. We fix this by using Seconds/MediaTime routines on WebProcess WebRTC side (this removes the 1000 factor), and we update LibWebRTCCodecsProxy to do the same. * Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.mm: (WebKit::LibWebRTCCodecsProxy::encodeFrame): * Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp: (WebKit::LibWebRTCCodecs::encodeFrame): Canonical link: https://commits.webkit.org/275392@main
- Loading branch information