Remove ViEChannel simulcast lock.
Since the number of streams is now known on construction we can initialize all RTP modules on construction. They are internally locked so we don't nede a simulcast lock anymore. BUG=1695 R=mflodman@webrtc.org, stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/52639004 . Cr-Commit-Position: refs/heads/master@{#9577}
This commit is contained in:
@ -472,10 +472,7 @@ int32_t ModuleRtpRtcpImpl::SetTransportOverhead(
|
||||
}
|
||||
|
||||
int32_t ModuleRtpRtcpImpl::SetMaxTransferUnit(const uint16_t mtu) {
|
||||
if (mtu > IP_PACKET_SIZE) {
|
||||
LOG(LS_ERROR) << "Invalid mtu: " << mtu;
|
||||
return -1;
|
||||
}
|
||||
DCHECK_LE(mtu, IP_PACKET_SIZE) << "Invalid mtu: " << mtu;
|
||||
return rtp_sender_.SetMaxPayloadLength(mtu - packet_overhead_,
|
||||
packet_overhead_);
|
||||
}
|
||||
|
||||
@ -355,10 +355,8 @@ int RTPSender::SendPayloadFrequency() const {
|
||||
int32_t RTPSender::SetMaxPayloadLength(size_t max_payload_length,
|
||||
uint16_t packet_over_head) {
|
||||
// Sanity check.
|
||||
if (max_payload_length < 100 || max_payload_length > IP_PACKET_SIZE) {
|
||||
LOG(LS_ERROR) << "Invalid max payload length: " << max_payload_length;
|
||||
return -1;
|
||||
}
|
||||
DCHECK(max_payload_length >= 100 && max_payload_length <= IP_PACKET_SIZE)
|
||||
<< "Invalid max payload length: " << max_payload_length;
|
||||
CriticalSectionScoped cs(send_critsect_.get());
|
||||
max_payload_length_ = max_payload_length;
|
||||
packet_over_head_ = packet_over_head;
|
||||
@ -504,7 +502,7 @@ int32_t RTPSender::SendOutgoingData(FrameType frame_type,
|
||||
return -1;
|
||||
}
|
||||
|
||||
uint32_t ret_val;
|
||||
int32_t ret_val;
|
||||
if (audio_configured_) {
|
||||
TRACE_EVENT_ASYNC_STEP1("webrtc", "Audio", capture_timestamp,
|
||||
"Send", "type", FrameTypeToString(frame_type));
|
||||
|
||||
Reference in New Issue
Block a user