Remove unnecessary calls to BaseChannel::SetRtpTransport
Also updating SocketOptionsMergedOnSetTransport test code to make the call to SetRtpTransport from the right context. Bug: webrtc:12636 Change-Id: I343851bcf8ac663d7559128d12447a9a742786f0 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/213660 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Tommi <tommi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33633}
This commit is contained in:
parent
fe041643b4
commit
d9a51b05da
@ -228,11 +228,6 @@ void BaseChannel::Deinit() {
|
||||
}
|
||||
|
||||
bool BaseChannel::SetRtpTransport(webrtc::RtpTransportInternal* rtp_transport) {
|
||||
if (!network_thread_->IsCurrent()) {
|
||||
return network_thread_->Invoke<bool>(RTC_FROM_HERE, [this, rtp_transport] {
|
||||
return SetRtpTransport(rtp_transport);
|
||||
});
|
||||
}
|
||||
RTC_DCHECK_RUN_ON(network_thread());
|
||||
if (rtp_transport == rtp_transport_) {
|
||||
return true;
|
||||
@ -881,10 +876,6 @@ VoiceChannel::~VoiceChannel() {
|
||||
Deinit();
|
||||
}
|
||||
|
||||
void VoiceChannel::Init_w(webrtc::RtpTransportInternal* rtp_transport) {
|
||||
BaseChannel::Init_w(rtp_transport);
|
||||
}
|
||||
|
||||
void VoiceChannel::UpdateMediaSendRecvState_w() {
|
||||
// Render incoming data if we're the active call, and we have the local
|
||||
// content. We receive data on the default channel and multiplexed streams.
|
||||
|
||||
@ -434,7 +434,6 @@ class VoiceChannel : public BaseChannel {
|
||||
cricket::MediaType media_type() const override {
|
||||
return cricket::MEDIA_TYPE_AUDIO;
|
||||
}
|
||||
void Init_w(webrtc::RtpTransportInternal* rtp_transport) override;
|
||||
|
||||
private:
|
||||
// overrides from BaseChannel
|
||||
|
||||
@ -1276,11 +1276,11 @@ class ChannelTest : public ::testing::Test, public sigslot::has_slots<> {
|
||||
|
||||
new_rtp_transport_ = CreateDtlsSrtpTransport(
|
||||
fake_rtp_dtls_transport2_.get(), fake_rtcp_dtls_transport2_.get());
|
||||
channel1_->SetRtpTransport(new_rtp_transport_.get());
|
||||
|
||||
bool rcv_success, send_success;
|
||||
int rcv_buf, send_buf;
|
||||
network_thread_->Invoke<void>(RTC_FROM_HERE, [&] {
|
||||
channel1_->SetRtpTransport(new_rtp_transport_.get());
|
||||
send_success = fake_rtp_dtls_transport2_->GetOption(
|
||||
rtc::Socket::Option::OPT_SNDBUF, &send_buf);
|
||||
rcv_success = fake_rtp_dtls_transport2_->GetOption(
|
||||
|
||||
@ -4629,8 +4629,6 @@ cricket::VoiceChannel* SdpOfferAnswerHandler::CreateVoiceChannel(
|
||||
}
|
||||
voice_channel->SignalSentPacket().connect(pc_,
|
||||
&PeerConnection::OnSentPacket_w);
|
||||
voice_channel->SetRtpTransport(rtp_transport);
|
||||
|
||||
return voice_channel;
|
||||
}
|
||||
|
||||
@ -4654,8 +4652,6 @@ cricket::VideoChannel* SdpOfferAnswerHandler::CreateVideoChannel(
|
||||
}
|
||||
video_channel->SignalSentPacket().connect(pc_,
|
||||
&PeerConnection::OnSentPacket_w);
|
||||
video_channel->SetRtpTransport(rtp_transport);
|
||||
|
||||
return video_channel;
|
||||
}
|
||||
|
||||
@ -4688,8 +4684,6 @@ bool SdpOfferAnswerHandler::CreateDataChannel(const std::string& mid) {
|
||||
}
|
||||
data_channel_controller()->rtp_data_channel()->SignalSentPacket().connect(
|
||||
pc_, &PeerConnection::OnSentPacket_w);
|
||||
data_channel_controller()->rtp_data_channel()->SetRtpTransport(
|
||||
rtp_transport);
|
||||
have_pending_rtp_data_channel_ = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user