Revert "Add ability to set ssrcs of RtpSender at construction time"

This reverts commit e9d6e658c307fc0241d622756703d5c0d5388d80.

Reason for revert: breaks downstream project

Original change's description:
> Add ability to set ssrcs of RtpSender at construction time
> 
> Bug: webrtc:10774
> Change-Id: I7147a75ccbcd1093dcd2e08047da8900843fdd8d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144037
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28447}

TBR=asapersson@webrtc.org,sprang@webrtc.org

Change-Id: I8b0cba0836e7d86ae1718055196c2c89860b97ff
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10774
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144368
Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28453}
This commit is contained in:
Amit Hilbuch
2019-07-02 21:04:57 +00:00
committed by Commit Bot
parent c4421979fe
commit 02d7d353a9
7 changed files with 257 additions and 273 deletions

View File

@ -40,7 +40,6 @@ 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);
@ -95,8 +94,27 @@ 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));
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));
// Make sure rtcp sender use same timestamp offset as rtp sender.
rtcp_sender_.SetTimestampOffset(rtp_sender_->TimestampOffset());
}