Index: webrtc/video/vie_channel.cc |
diff --git a/webrtc/video/vie_channel.cc b/webrtc/video/vie_channel.cc |
index a1bdfb03338c2d826213a175356e59af471e58a8..b7cad388187a3e889e4d5f3b75b20e84b1109acf 100644 |
--- a/webrtc/video/vie_channel.cc |
+++ b/webrtc/video/vie_channel.cc |
@@ -16,13 +16,11 @@ |
#include "webrtc/base/checks.h" |
#include "webrtc/base/logging.h" |
-#include "webrtc/base/platform_thread.h" |
#include "webrtc/common_video/include/frame_callback.h" |
#include "webrtc/common_video/include/incoming_video_stream.h" |
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" |
#include "webrtc/modules/rtp_rtcp/include/rtp_receiver.h" |
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" |
-#include "webrtc/modules/utility/include/process_thread.h" |
#include "webrtc/modules/video_coding/video_coding_impl.h" |
#include "webrtc/modules/video_processing/include/video_processing.h" |
#include "webrtc/system_wrappers/include/metrics.h" |
@@ -50,18 +48,11 @@ class ChannelStatsObserver : public CallStatsObserver { |
ViEChannel* const owner_; |
}; |
-ViEChannel::ViEChannel(Transport* transport, |
- ProcessThread* module_process_thread, |
- vcm::VideoReceiver* video_receiver, |
- RemoteBitrateEstimator* remote_bitrate_estimator, |
- RtcpRttStats* rtt_stats, |
- PacedSender* paced_sender, |
- PacketRouter* packet_router) |
- : module_process_thread_(module_process_thread), |
- video_receiver_(video_receiver), |
- vie_receiver_(video_receiver, remote_bitrate_estimator, this, transport, |
- rtt_stats, paced_sender, packet_router), |
- rtp_rtcp_(vie_receiver_.rtp_rtcp()), |
+ViEChannel::ViEChannel(vcm::VideoReceiver* video_receiver, |
+ RtpStreamReceiver* rtp_stream_receiver) |
+ : video_receiver_(video_receiver), |
+ rtp_stream_receiver_(rtp_stream_receiver), |
+ rtp_rtcp_(rtp_stream_receiver_->rtp_rtcp()), |
stats_observer_(new ChannelStatsObserver(this)), |
receive_stats_callback_(nullptr), |
incoming_video_stream_(nullptr), |
@@ -75,8 +66,6 @@ ViEChannel::ViEChannel(Transport* transport, |
int32_t ViEChannel::Init() { |
static const int kDefaultRenderDelayMs = 10; |
- module_process_thread_->RegisterModule(vie_receiver_.GetReceiveStatistics()); |
- module_process_thread_->RegisterModule(rtp_rtcp_); |
if (video_receiver_->RegisterReceiveCallback(this) != 0) { |
return -1; |
@@ -89,13 +78,7 @@ int32_t ViEChannel::Init() { |
return 0; |
} |
-ViEChannel::~ViEChannel() { |
- // Make sure we don't get more callbacks from the RTP module. |
- module_process_thread_->DeRegisterModule( |
- vie_receiver_.GetReceiveStatistics()); |
- |
- module_process_thread_->DeRegisterModule(rtp_rtcp_); |
-} |
+ViEChannel::~ViEChannel() {} |
pbos-webrtc
2016/04/28 14:26:49
Remove dtor
mflodman
2016/04/29 04:50:15
Done.
|
void ViEChannel::SetProtectionMode(bool enable_nack, |
bool enable_fec, |
@@ -140,7 +123,7 @@ void ViEChannel::ProcessNACKRequest(const bool enable) { |
// Turn on NACK. |
if (rtp_rtcp_->RTCP() == RtcpMode::kOff) |
return; |
- vie_receiver_.SetNackStatus(true, max_nack_reordering_threshold_); |
+ rtp_stream_receiver_->SetNackStatus(true, max_nack_reordering_threshold_); |
video_receiver_->RegisterPacketRequestCallback(this); |
// Don't introduce errors when NACK is enabled. |
video_receiver_->SetDecodeErrorMode(kNoErrors); |
@@ -150,7 +133,7 @@ void ViEChannel::ProcessNACKRequest(const bool enable) { |
// When NACK is off, allow decoding with errors. Otherwise, the video |
// will freeze, and will only recover with a complete key frame. |
video_receiver_->SetDecodeErrorMode(kWithErrors); |
- vie_receiver_.SetNackStatus(false, max_nack_reordering_threshold_); |
+ rtp_stream_receiver_->SetNackStatus(false, max_nack_reordering_threshold_); |
} |
} |
@@ -169,11 +152,7 @@ RtpState ViEChannel::GetRtpStateForSsrc(uint32_t ssrc) const { |
void ViEChannel::RegisterRtcpPacketTypeCounterObserver( |
RtcpPacketTypeCounterObserver* observer) { |
- vie_receiver_.RegisterRtcpPacketTypeCounterObserver(observer); |
-} |
- |
-ViEReceiver* ViEChannel::vie_receiver() { |
- return &vie_receiver_; |
+ rtp_stream_receiver_->RegisterRtcpPacketTypeCounterObserver(observer); |
pbos-webrtc
2016/04/28 14:26:49
Can you move this to VideoReceiveStream since it's
mflodman
2016/04/29 04:50:15
I have a CL almost reay to upload as soon as this
|
} |
CallStatsObserver* ViEChannel::GetStatsObserver() { |
@@ -274,24 +253,6 @@ void ViEChannel::RegisterPreRenderCallback( |
pre_render_callback_ = pre_render_callback; |
} |
-// TODO(pbos): Remove as soon as audio can handle a changing payload type |
-// without this callback. |
-int32_t ViEChannel::OnInitializeDecoder( |
- const int8_t payload_type, |
- const char payload_name[RTP_PAYLOAD_NAME_SIZE], |
- const int frequency, |
- const size_t channels, |
- const uint32_t rate) { |
- RTC_NOTREACHED(); |
- return 0; |
-} |
- |
-void ViEChannel::OnIncomingSSRCChanged(const uint32_t ssrc) { |
- rtp_rtcp_->SetRemoteSSRC(ssrc); |
-} |
- |
-void ViEChannel::OnIncomingCSRCChanged(const uint32_t CSRC, const bool added) {} |
- |
void ViEChannel::RegisterReceiveStatisticsProxy( |
ReceiveStatisticsProxy* receive_statistics_proxy) { |
rtc::CritScope lock(&crit_); |