Reland: Add ability to set ssrcs of RtpSender at construction time
Patch set 1 is identical to original CL. Next one adds fix for backwards compatibilit. Original cl: https://webrtc-review.googlesource.com/c/src/+/144037 Bug: webrtc:10774 Change-Id: Ib72e3723c7a07e9ee83f97560a85367becd868a1 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144601 Reviewed-by: Åsa Persson <asapersson@webrtc.org> Commit-Queue: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28485}
This commit is contained in:
@ -40,6 +40,7 @@ constexpr int32_t kDefaultAudioReportInterval = 5000;
|
||||
} // namespace
|
||||
|
||||
RtpRtcp::Configuration::Configuration() = default;
|
||||
RtpRtcp::Configuration::Configuration(Configuration&& rhs) = default;
|
||||
|
||||
std::unique_ptr<RtpRtcp> RtpRtcp::Create(const Configuration& configuration) {
|
||||
RTC_DCHECK(configuration.clock);
|
||||
@ -94,27 +95,8 @@ ModuleRtpRtcpImpl::ModuleRtpRtcpImpl(const Configuration& configuration)
|
||||
ack_observer_(configuration.ack_observer),
|
||||
rtt_stats_(configuration.rtt_stats),
|
||||
rtt_ms_(0) {
|
||||
FieldTrialBasedConfig default_trials;
|
||||
if (!configuration.receiver_only) {
|
||||
rtp_sender_.reset(new RTPSender(
|
||||
configuration.audio, configuration.clock,
|
||||
configuration.outgoing_transport, configuration.paced_sender,
|
||||
configuration.flexfec_sender
|
||||
? absl::make_optional(configuration.flexfec_sender->ssrc())
|
||||
: absl::nullopt,
|
||||
configuration.transport_sequence_number_allocator,
|
||||
configuration.transport_feedback_callback,
|
||||
configuration.send_bitrate_observer,
|
||||
configuration.send_side_delay_observer, configuration.event_log,
|
||||
configuration.send_packet_observer,
|
||||
configuration.retransmission_rate_limiter,
|
||||
configuration.overhead_observer,
|
||||
configuration.populate_network2_timestamp,
|
||||
configuration.frame_encryptor, configuration.require_frame_encryption,
|
||||
configuration.extmap_allow_mixed,
|
||||
configuration.field_trials ? *configuration.field_trials
|
||||
: default_trials));
|
||||
|
||||
rtp_sender_.reset(new RTPSender(configuration));
|
||||
// Make sure rtcp sender use same timestamp offset as rtp sender.
|
||||
rtcp_sender_.SetTimestampOffset(rtp_sender_->TimestampOffset());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user