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

Unified Diff: webrtc/video/vie_channel.cc

Issue 1686323003: Use std::vector in the PayloadRouter interface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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/video/payload_router_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/vie_channel.cc
diff --git a/webrtc/video/vie_channel.cc b/webrtc/video/vie_channel.cc
index 0f66c81659b4532cd612c81b271e0ea02e67a416..d49f505365933aeb11705bbbe20dab17a8a5fb07 100644
--- a/webrtc/video/vie_channel.cc
+++ b/webrtc/video/vie_channel.cc
@@ -155,8 +155,8 @@ int32_t ViEChannel::Init() {
}
packet_router_->AddRtpModule(rtp_rtcp_modules_[0], sender_);
if (sender_) {
- std::list<RtpRtcp*> send_rtp_modules(1, rtp_rtcp_modules_[0]);
- send_payload_router_->SetSendingRtpModules(send_rtp_modules);
+ send_payload_router_->SetSendingRtpModules(
+ std::vector<RtpRtcp*>(1, rtp_rtcp_modules_[0]));
RTC_DCHECK(!send_payload_router_->active());
} else {
if (vcm_->RegisterReceiveCallback(this) != 0) {
@@ -177,7 +177,7 @@ ViEChannel::~ViEChannel() {
module_process_thread_->DeRegisterModule(
vie_receiver_.GetReceiveStatistics());
if (sender_) {
- send_payload_router_->SetSendingRtpModules(std::list<RtpRtcp*>());
+ send_payload_router_->SetSendingRtpModules(std::vector<RtpRtcp*>());
} else {
module_process_thread_->DeRegisterModule(&vie_sync_);
}
@@ -345,7 +345,7 @@ int32_t ViEChannel::SetSendCodec(const VideoCodec& video_codec,
bool is_sending = rtp_rtcp_modules_[0]->Sending();
bool router_was_active = send_payload_router_->active();
send_payload_router_->set_active(false);
- send_payload_router_->SetSendingRtpModules(std::list<RtpRtcp*>());
+ send_payload_router_->SetSendingRtpModules(std::vector<RtpRtcp*>());
std::vector<RtpRtcp*> registered_modules;
std::vector<RtpRtcp*> deregistered_modules;
@@ -386,12 +386,7 @@ int32_t ViEChannel::SetSendCodec(const VideoCodec& video_codec,
vie_receiver_.RegisterRtpRtcpModules(registered_modules);
// Update the packet and payload routers with the sending RtpRtcp modules.
- if (sender_) {
- std::list<RtpRtcp*> active_send_modules;
- for (RtpRtcp* rtp_rtcp : registered_modules)
- active_send_modules.push_back(rtp_rtcp);
- send_payload_router_->SetSendingRtpModules(active_send_modules);
- }
+ send_payload_router_->SetSendingRtpModules(registered_modules);
danilchap 2016/02/11 16:22:07 why drop if(sender_) ?
pbos-webrtc 2016/02/11 16:38:31 DCHECKed above.
if (router_was_active)
send_payload_router_->set_active(true);
« no previous file with comments | « webrtc/video/payload_router_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698