Revert "Use only first payload timestamp for RTCP SR generation for audio"

This reverts commit 9a0662ac7e4a3bc6b3a316397a7fdf25f0025d35.

Reason for revert: breaks some av sync perf tests

Original change's description:
> Use only first payload timestamp for RTCP SR generation for audio
> 
> Since now RTP rate is set correctly for audio, there's no need to
> use the very last data packet rtp/capture timestamps for generating
> RTCP SR packets.
> 
> Using only one (first) packet timestamp eliminates the jitter between
> rtp and capture timestamps for audio. This jitter comes from the fact
> that capture timestamp for audio is unknown and we generate bogus
> timestamp at arbitrary, non-constant offset from the real capture time.
> 
> Bug: webrtc:9905
> Change-Id: I855556184cfe994be39ab7780836a050f5a38c35
> Reviewed-on: https://webrtc-review.googlesource.com/c/108580
> Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25430}

TBR=danilchap@webrtc.org,ilnik@webrtc.org,ossu@webrtc.org

Change-Id: I208a659379b1075258ee94613e42afd9aebe4754
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9905
Reviewed-on: https://webrtc-review.googlesource.com/c/108623
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25435}
This commit is contained in:
Ilya Nikolaevskiy
2018-10-30 15:47:48 +00:00
committed by Commit Bot
parent 992a868393
commit fcc3981633
2 changed files with 0 additions and 10 deletions

View File

@ -333,7 +333,6 @@ int32_t ChannelSend::SendRtpAudio(FrameType frameType,
// This call will trigger Transport::SendPacket() from the RTP/RTCP module. // This call will trigger Transport::SendPacket() from the RTP/RTCP module.
if (!_rtpRtcpModule->SendOutgoingData((FrameType&)frameType, payloadType, if (!_rtpRtcpModule->SendOutgoingData((FrameType&)frameType, payloadType,
timeStamp, timeStamp,
// TODO(https://bugs.webrtc.org/9905):
// Leaving the time when this frame was // Leaving the time when this frame was
// received from the capture device as // received from the capture device as
// undefined for voice for now. // undefined for voice for now.

View File

@ -258,15 +258,6 @@ void RTCPSender::SetLastRtpTime(uint32_t rtp_timestamp,
int64_t capture_time_ms, int64_t capture_time_ms,
int8_t payload_type) { int8_t payload_type) {
rtc::CritScope lock(&critical_section_rtcp_sender_); rtc::CritScope lock(&critical_section_rtcp_sender_);
// Workaround for https://bugs.webrtc.org/9905
// Only very first SetLastRtpTime for audio should update
// last_frame_capture_time_ms_ and last_payload_type_.
// This eliminates jitter between last rtp and capture timestamps.
// TODO(https://bugs.webrtc.org/9905): remove once the bug is fixed.
if (capture_time_ms < 0 && last_frame_capture_time_ms_ > 0 &&
payload_type != -1 && last_payload_type_ == payload_type) {
return;
}
// For compatibility with clients who don't set payload type correctly on all // For compatibility with clients who don't set payload type correctly on all
// calls. // calls.
if (payload_type != -1) { if (payload_type != -1) {