Change the flag when RtpTransport objects send packet.
Always use the PF_SRTP_BYPASS when sending RTP/RTCP packets. Change the condition in BaseChannel::GetSrtpOverhead. Get the SRTP overhead when using either SDES or DTLS-SRTP. Bug: None Change-Id: I44aeff8b75e56b12acefd73299a95a3e38cd401b Reviewed-on: https://webrtc-review.googlesource.com/6580 Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Commit-Queue: Zhi Huang <zhihuang@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20152}
This commit is contained in:
parent
c177168d1e
commit
04eaa15468
@ -680,8 +680,9 @@ bool BaseChannel::SendPacket(bool rtcp,
|
||||
return false;
|
||||
}
|
||||
// Bon voyage.
|
||||
return rtcp ? rtp_transport_->SendRtcpPacket(packet, options, PF_NORMAL)
|
||||
: rtp_transport_->SendRtpPacket(packet, options, PF_NORMAL);
|
||||
return rtcp
|
||||
? rtp_transport_->SendRtcpPacket(packet, options, PF_SRTP_BYPASS)
|
||||
: rtp_transport_->SendRtpPacket(packet, options, PF_SRTP_BYPASS);
|
||||
}
|
||||
RTC_DCHECK(srtp_transport_);
|
||||
RTC_DCHECK(srtp_transport_->IsActive());
|
||||
@ -1661,7 +1662,7 @@ int BaseChannel::GetTransportOverheadPerPacket() const {
|
||||
? kTcpOverhaed
|
||||
: kUdpOverhaed;
|
||||
|
||||
if (sdes_active()) {
|
||||
if (srtp_active()) {
|
||||
int srtp_overhead = 0;
|
||||
if (srtp_transport_->GetSrtpOverhead(&srtp_overhead))
|
||||
transport_overhead_per_packet += srtp_overhead;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user