Refactor RTCP sender
The main purpose of this CL is to clean up RTCPSender::PrepareRTCP, but it has quite a few ramifications. Notable changes: * Removed the rtcpPacketTypeFlags bit vector and don't assume RTCPPacketType values have a single unique bit set. This will allow making this an enum class once rtcp_receiver has been overhauled. * Flags are now stored in a map that is a member of the class. This meant we could remove some bool flags (eg send_remb_) which was previously masked into rtcpPacketTypeFlags and then masked out again when testing if a remb packet should be sent. * Make all build methods, eg. BuildREMB(), have the same signature. An RtcpContext struct was introduced for this purpose. This allowed the use of a map from RTCPPacketType to method pointer. Instead of 18 consecutive if-statements, there is now a single loop. The context class also allowed some simplifications in the build methods themselves. * A few minor simplifications and cleanups. The next step is to gradually replace the builder methods with the builders from the new RtcpPacket classes. BUG=2450 R=asapersson@webrtc.org, pbos@webrtc.org Review URL: https://webrtc-codereview.appspot.com/48329004 Cr-Commit-Position: refs/heads/master@{#9166}
This commit is contained in:
@ -161,7 +161,10 @@ class ModuleRtpRtcpImpl : public RtpRtcp {
|
||||
|
||||
// Force a send of an RTCP packet.
|
||||
// Normal SR and RR are triggered via the process function.
|
||||
int32_t SendRTCP(uint32_t rtcp_packet_type = kRtcpReport) override;
|
||||
int32_t SendRTCP(RTCPPacketType rtcpPacketType) override;
|
||||
|
||||
int32_t SendCompoundRTCP(
|
||||
const std::set<RTCPPacketType>& rtcpPacketTypes) override;
|
||||
|
||||
int32_t ResetSendDataCountersRTP() override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user