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

Unified Diff: webrtc/video/video_receive_stream.cc

Issue 1373903003: Unify newapi::RtcpMode and RTCPMethod. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: ehm, compile the code Created 5 years, 3 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/video_receive_stream.h ('k') | webrtc/video/video_send_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_receive_stream.cc
diff --git a/webrtc/video/video_receive_stream.cc b/webrtc/video/video_receive_stream.cc
index 1be63e07d1e166f039e50e777489821d52b6cc59..d50bb228f8c4f9cb398f2eafa5b7e51afb5899f1 100644
--- a/webrtc/video/video_receive_stream.cc
+++ b/webrtc/video/video_receive_stream.cc
@@ -63,9 +63,9 @@ std::string VideoReceiveStream::Config::Rtp::ToString() const {
std::stringstream ss;
ss << "{remote_ssrc: " << remote_ssrc;
ss << ", local_ssrc: " << local_ssrc;
- ss << ", rtcp_mode: " << (rtcp_mode == newapi::kRtcpCompound
- ? "kRtcpCompound"
- : "kRtcpReducedSize");
+ ss << ", rtcp_mode: "
+ << (rtcp_mode == RtcpMode::kCompound ? "RtcpMode::kCompound"
+ : "RtcpMode::kReducedSize");
ss << ", rtcp_xr: ";
ss << "{receiver_reference_time_report: "
<< (rtcp_xr.receiver_reference_time_report ? "on" : "off");
@@ -148,7 +148,10 @@ VideoReceiveStream::VideoReceiveStream(int num_cpu_cores,
vie_channel_->SetProtectionMode(config_.rtp.nack.rtp_history_ms > 0, false,
-1, -1);
vie_channel_->SetKeyFrameRequestMethod(kKeyFrameReqPliRtcp);
- SetRtcpMode(config_.rtp.rtcp_mode);
+ RTC_DCHECK(config_.rtp.rtcp_mode != RtcpMode::kOff)
+ << "A stream should not be configured with RTCP disabled. This value is "
+ "reserved for internal usage.";
+ vie_channel_->SetRTCPMode(config_.rtp.rtcp_mode);
RTC_DCHECK(config_.rtp.remote_ssrc != 0);
// TODO(pbos): What's an appropriate local_ssrc for receive-only streams?
@@ -325,21 +328,9 @@ int VideoReceiveStream::RenderFrame(const uint32_t /*stream_id*/,
}
void VideoReceiveStream::SignalNetworkState(NetworkState state) {
- if (state == kNetworkUp)
- SetRtcpMode(config_.rtp.rtcp_mode);
- if (state == kNetworkDown)
- vie_channel_->SetRTCPMode(kRtcpOff);
+ vie_channel_->SetRTCPMode(state == kNetworkUp ? config_.rtp.rtcp_mode
+ : RtcpMode::kOff);
}
-void VideoReceiveStream::SetRtcpMode(newapi::RtcpMode mode) {
- switch (mode) {
- case newapi::kRtcpCompound:
- vie_channel_->SetRTCPMode(kRtcpCompound);
- break;
- case newapi::kRtcpReducedSize:
- vie_channel_->SetRTCPMode(kRtcpNonCompound);
- break;
- }
-}
} // namespace internal
} // namespace webrtc
« no previous file with comments | « webrtc/video/video_receive_stream.h ('k') | webrtc/video/video_send_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698