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

Unified Diff: webrtc/voice_engine/channel.cc

Issue 1373903003: Unify newapi::RtcpMode and RTCPMethod. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: enum class 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
« webrtc/common_types.h ('K') | « webrtc/video_receive_stream.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/voice_engine/channel.cc
diff --git a/webrtc/voice_engine/channel.cc b/webrtc/voice_engine/channel.cc
index ee170587325b479a2e460327d7dfd11b597c70fa..a7c36bf4cfe9c30e5d2fea875c55196c357663bc 100644
--- a/webrtc/voice_engine/channel.cc
+++ b/webrtc/voice_engine/channel.cc
@@ -921,7 +921,7 @@ Channel::Init()
// be transmitted since the Transport object will then be invalid.
telephone_event_handler_->SetTelephoneEventForwardToDecoder(true);
// RTCP is enabled by default.
- _rtpRtcpModule->SetRTCPStatus(kRtcpCompound);
+ _rtpRtcpModule->SetRTCPStatus(RtcpMode::COMPOUND);
// --- Register all permanent callbacks
const bool fail =
(audio_coding_->RegisterTransportCallback(this) == -1) ||
@@ -2783,14 +2783,14 @@ int Channel::SetReceiveAbsoluteSenderTimeStatus(bool enable, unsigned char id) {
void Channel::SetRTCPStatus(bool enable) {
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId),
"Channel::SetRTCPStatus()");
- _rtpRtcpModule->SetRTCPStatus(enable ? kRtcpCompound : kRtcpOff);
+ _rtpRtcpModule->SetRTCPStatus(enable ? RtcpMode::COMPOUND : RtcpMode::OFF);
}
int
Channel::GetRTCPStatus(bool& enabled)
{
- RTCPMethod method = _rtpRtcpModule->RTCP();
- enabled = (method != kRtcpOff);
+ RtcpMode method = _rtpRtcpModule->RTCP();
+ enabled = (method != RtcpMode::OFF);
return 0;
}
@@ -2936,8 +2936,8 @@ Channel::SendApplicationDefinedRTCPPacket(unsigned char subType,
"SendApplicationDefinedRTCPPacket() invalid length value");
return -1;
}
- RTCPMethod status = _rtpRtcpModule->RTCP();
- if (status == kRtcpOff)
+ RtcpMode status = _rtpRtcpModule->RTCP();
+ if (status == RtcpMode::OFF)
{
_engineStatisticsPtr->SetLastError(
VE_RTCP_ERROR, kTraceError,
@@ -2968,7 +2968,7 @@ Channel::GetRTPStatistics(
{
// The jitter statistics is updated for each received RTP packet and is
// based on received packets.
- if (_rtpRtcpModule->RTCP() == kRtcpOff) {
+ if (_rtpRtcpModule->RTCP() == RtcpMode::OFF) {
// If RTCP is off, there is no timed thread in the RTCP module regularly
// generating new stats, trigger the update manually here instead.
StreamStatistician* statistician =
@@ -3040,7 +3040,7 @@ Channel::GetRTPStatistics(CallStatistics& stats)
StreamStatistician* statistician =
rtp_receive_statistics_->GetStatistician(rtp_receiver_->SSRC());
if (!statistician || !statistician->GetStatistics(
- &statistics, _rtpRtcpModule->RTCP() == kRtcpOff)) {
+ &statistics, _rtpRtcpModule->RTCP() == RtcpMode::OFF)) {
_engineStatisticsPtr->SetLastError(
VE_CANNOT_RETRIEVE_RTP_STAT, kTraceWarning,
"GetRTPStatistics() failed to read RTP statistics from the "
@@ -3911,8 +3911,8 @@ int32_t Channel::GetPlayoutFrequency() {
}
int64_t Channel::GetRTT(bool allow_associate_channel) const {
- RTCPMethod method = _rtpRtcpModule->RTCP();
- if (method == kRtcpOff) {
+ RtcpMode method = _rtpRtcpModule->RTCP();
+ if (method == RtcpMode::OFF) {
return 0;
}
std::vector<RTCPReportBlock> report_blocks;
« webrtc/common_types.h ('K') | « webrtc/video_receive_stream.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698