Add RTP timestamp to contributing sources

RTP timestamp was recently added to contributing sources in the WebRTC
specification. This CL implements that change in WebRTC.

Bug: webrtc:10650
Change-Id: Ic0ccfbea7049a5b66063fa6cf60d01d5bd713132
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137515
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28020}
This commit is contained in:
Johannes Kron
2019-05-21 13:19:22 +02:00
committed by Commit Bot
parent afb8d5cdae
commit b5d918324c
7 changed files with 125 additions and 61 deletions

View File

@ -12,12 +12,24 @@
namespace webrtc {
RtpSource::RtpSource(int64_t timestamp_ms,
uint32_t source_id,
RtpSourceType source_type,
absl::optional<uint8_t> audio_level,
uint32_t rtp_timestamp)
: timestamp_ms_(timestamp_ms),
source_id_(source_id),
source_type_(source_type),
audio_level_(audio_level),
rtp_timestamp_(rtp_timestamp) {}
RtpSource::RtpSource(int64_t timestamp_ms,
uint32_t source_id,
RtpSourceType source_type)
: timestamp_ms_(timestamp_ms),
source_id_(source_id),
source_type_(source_type) {}
source_type_(source_type),
rtp_timestamp_(0) {}
RtpSource::RtpSource(int64_t timestamp_ms,
uint32_t source_id,
@ -26,7 +38,8 @@ RtpSource::RtpSource(int64_t timestamp_ms,
: timestamp_ms_(timestamp_ms),
source_id_(source_id),
source_type_(source_type),
audio_level_(audio_level) {}
audio_level_(audio_level),
rtp_timestamp_(0) {}
RtpSource::RtpSource(const RtpSource&) = default;
RtpSource& RtpSource::operator=(const RtpSource&) = default;