Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(534)

Unified Diff: webrtc/modules/pacing/packet_router.h

Issue 2774623006: Let PacketRouter separate send and receive modules. (Closed)
Patch Set: Eliminate std::remove. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/audio/audio_send_stream_unittest.cc ('k') | webrtc/modules/pacing/packet_router.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/pacing/packet_router.h
diff --git a/webrtc/modules/pacing/packet_router.h b/webrtc/modules/pacing/packet_router.h
index 0dc3fb53bad6ea3fb2369a981819a1c2ee708814..ffc0c1a59d3bc8f86ecea77aed4ac05d6ebe139d 100644
--- a/webrtc/modules/pacing/packet_router.h
+++ b/webrtc/modules/pacing/packet_router.h
@@ -12,6 +12,7 @@
#define WEBRTC_MODULES_PACING_PACKET_ROUTER_H_
#include <list>
+#include <vector>
#include "webrtc/base/constructormagic.h"
#include "webrtc/base/criticalsection.h"
@@ -28,16 +29,29 @@ namespace rtcp {
class TransportFeedback;
} // namespace rtcp
-// PacketRouter routes outgoing data to the correct sending RTP module, based
-// on the simulcast layer in RTPVideoHeader.
+// PacketRouter keeps track of rtp send modules to support the pacer.
+// In addition, it handles feedback messages, which are sent on a send
+// module if possible (sender report), otherwise on receive module
+// (receiver report). For the latter case, we also keep track of the
+// receive modules.
class PacketRouter : public PacedSender::PacketSender,
public TransportSequenceNumberAllocator {
public:
PacketRouter();
virtual ~PacketRouter();
- void AddRtpModule(RtpRtcp* rtp_module);
- void RemoveRtpModule(RtpRtcp* rtp_module);
+ // TODO(nisse): Delete, as soon as downstream app is updated.
+ RTC_DEPRECATED void AddRtpModule(RtpRtcp* rtp_module) {
+ AddReceiveRtpModule(rtp_module);
+ }
+ RTC_DEPRECATED void RemoveRtpModule(RtpRtcp* rtp_module) {
+ RemoveReceiveRtpModule(rtp_module);
+ }
+ void AddSendRtpModule(RtpRtcp* rtp_module);
+ void RemoveSendRtpModule(RtpRtcp* rtp_module);
+
+ void AddReceiveRtpModule(RtpRtcp* rtp_module);
+ void RemoveReceiveRtpModule(RtpRtcp* rtp_module);
// Implements PacedSender::Callback.
bool TimeToSendPacket(uint32_t ssrc,
@@ -58,7 +72,8 @@ class PacketRouter : public PacedSender::PacketSender,
private:
rtc::ThreadChecker pacer_thread_checker_;
rtc::CriticalSection modules_crit_;
- std::list<RtpRtcp*> rtp_modules_ GUARDED_BY(modules_crit_);
+ std::list<RtpRtcp*> rtp_send_modules_ GUARDED_BY(modules_crit_);
+ std::vector<RtpRtcp*> rtp_receive_modules_ GUARDED_BY(modules_crit_);
volatile int transport_seq_;
« no previous file with comments | « webrtc/audio/audio_send_stream_unittest.cc ('k') | webrtc/modules/pacing/packet_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698