Set local ssrc at construction (audio)
Changing the ssrc for a module is intended to be removed, and will in the future require creating a new instance. Bug: webrtc:10774 Change-Id: Ie96daa4a8cf00223ea040509037582f6b1c8eb19 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145205 Reviewed-by: Oskar Sundbom <ossu@webrtc.org> Commit-Queue: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28571}
This commit is contained in:
@ -113,7 +113,8 @@ AudioSendStream::AudioSendStream(
|
|||||||
config.frame_encryptor,
|
config.frame_encryptor,
|
||||||
config.crypto_options,
|
config.crypto_options,
|
||||||
config.rtp.extmap_allow_mixed,
|
config.rtp.extmap_allow_mixed,
|
||||||
config.rtcp_report_interval_ms)) {}
|
config.rtcp_report_interval_ms,
|
||||||
|
config.rtp.ssrc)) {}
|
||||||
|
|
||||||
AudioSendStream::AudioSendStream(
|
AudioSendStream::AudioSendStream(
|
||||||
Clock* clock,
|
Clock* clock,
|
||||||
@ -239,11 +240,12 @@ void AudioSendStream::ConfigureStream(
|
|||||||
RTC_DCHECK(first_time ||
|
RTC_DCHECK(first_time ||
|
||||||
old_config.send_transport == new_config.send_transport);
|
old_config.send_transport == new_config.send_transport);
|
||||||
|
|
||||||
if (first_time || old_config.rtp.ssrc != new_config.rtp.ssrc) {
|
if (old_config.rtp.ssrc != new_config.rtp.ssrc) {
|
||||||
channel_send->SetLocalSSRC(new_config.rtp.ssrc);
|
channel_send->SetLocalSSRC(new_config.rtp.ssrc);
|
||||||
if (stream->suspended_rtp_state_) {
|
}
|
||||||
stream->rtp_rtcp_module_->SetRtpState(*stream->suspended_rtp_state_);
|
if (stream->suspended_rtp_state_ &&
|
||||||
}
|
(first_time || old_config.rtp.ssrc != new_config.rtp.ssrc)) {
|
||||||
|
stream->rtp_rtcp_module_->SetRtpState(*stream->suspended_rtp_state_);
|
||||||
}
|
}
|
||||||
if (first_time || old_config.rtp.c_name != new_config.rtp.c_name) {
|
if (first_time || old_config.rtp.c_name != new_config.rtp.c_name) {
|
||||||
channel_send->SetRTCP_CNAME(new_config.rtp.c_name);
|
channel_send->SetRTCP_CNAME(new_config.rtp.c_name);
|
||||||
|
@ -97,7 +97,8 @@ class ChannelSend : public ChannelSendInterface,
|
|||||||
FrameEncryptorInterface* frame_encryptor,
|
FrameEncryptorInterface* frame_encryptor,
|
||||||
const webrtc::CryptoOptions& crypto_options,
|
const webrtc::CryptoOptions& crypto_options,
|
||||||
bool extmap_allow_mixed,
|
bool extmap_allow_mixed,
|
||||||
int rtcp_report_interval_ms);
|
int rtcp_report_interval_ms,
|
||||||
|
uint32_t ssrc);
|
||||||
|
|
||||||
~ChannelSend() override;
|
~ChannelSend() override;
|
||||||
|
|
||||||
@ -640,7 +641,8 @@ ChannelSend::ChannelSend(Clock* clock,
|
|||||||
FrameEncryptorInterface* frame_encryptor,
|
FrameEncryptorInterface* frame_encryptor,
|
||||||
const webrtc::CryptoOptions& crypto_options,
|
const webrtc::CryptoOptions& crypto_options,
|
||||||
bool extmap_allow_mixed,
|
bool extmap_allow_mixed,
|
||||||
int rtcp_report_interval_ms)
|
int rtcp_report_interval_ms,
|
||||||
|
uint32_t ssrc)
|
||||||
: event_log_(rtc_event_log),
|
: event_log_(rtc_event_log),
|
||||||
_timeStamp(0), // This is just an offset, RTP module will add it's own
|
_timeStamp(0), // This is just an offset, RTP module will add it's own
|
||||||
// random offset
|
// random offset
|
||||||
@ -695,6 +697,8 @@ ChannelSend::ChannelSend(Clock* clock,
|
|||||||
configuration.extmap_allow_mixed = extmap_allow_mixed;
|
configuration.extmap_allow_mixed = extmap_allow_mixed;
|
||||||
configuration.rtcp_report_interval_ms = rtcp_report_interval_ms;
|
configuration.rtcp_report_interval_ms = rtcp_report_interval_ms;
|
||||||
|
|
||||||
|
configuration.media_send_ssrc = ssrc;
|
||||||
|
|
||||||
_rtpRtcpModule = RtpRtcp::Create(configuration);
|
_rtpRtcpModule = RtpRtcp::Create(configuration);
|
||||||
_rtpRtcpModule->SetSendingMediaStatus(false);
|
_rtpRtcpModule->SetSendingMediaStatus(false);
|
||||||
|
|
||||||
@ -1256,12 +1260,13 @@ std::unique_ptr<ChannelSendInterface> CreateChannelSend(
|
|||||||
FrameEncryptorInterface* frame_encryptor,
|
FrameEncryptorInterface* frame_encryptor,
|
||||||
const webrtc::CryptoOptions& crypto_options,
|
const webrtc::CryptoOptions& crypto_options,
|
||||||
bool extmap_allow_mixed,
|
bool extmap_allow_mixed,
|
||||||
int rtcp_report_interval_ms) {
|
int rtcp_report_interval_ms,
|
||||||
|
uint32_t ssrc) {
|
||||||
return absl::make_unique<ChannelSend>(
|
return absl::make_unique<ChannelSend>(
|
||||||
clock, task_queue_factory, module_process_thread, media_transport_config,
|
clock, task_queue_factory, module_process_thread, media_transport_config,
|
||||||
overhead_observer, rtp_transport, rtcp_rtt_stats, rtc_event_log,
|
overhead_observer, rtp_transport, rtcp_rtt_stats, rtc_event_log,
|
||||||
frame_encryptor, crypto_options, extmap_allow_mixed,
|
frame_encryptor, crypto_options, extmap_allow_mixed,
|
||||||
rtcp_report_interval_ms);
|
rtcp_report_interval_ms, ssrc);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace voe
|
} // namespace voe
|
||||||
|
@ -140,7 +140,8 @@ std::unique_ptr<ChannelSendInterface> CreateChannelSend(
|
|||||||
FrameEncryptorInterface* frame_encryptor,
|
FrameEncryptorInterface* frame_encryptor,
|
||||||
const webrtc::CryptoOptions& crypto_options,
|
const webrtc::CryptoOptions& crypto_options,
|
||||||
bool extmap_allow_mixed,
|
bool extmap_allow_mixed,
|
||||||
int rtcp_report_interval_ms);
|
int rtcp_report_interval_ms,
|
||||||
|
uint32_t ssrc);
|
||||||
|
|
||||||
} // namespace voe
|
} // namespace voe
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
Reference in New Issue
Block a user