Changed REMB return value to int instead of bool.
Review URL: https://webrtc-codereview.appspot.com/366001
git-svn-id: http://webrtc.googlecode.com/svn/trunk@1522 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/src/video_engine/include/vie_rtp_rtcp.h b/src/video_engine/include/vie_rtp_rtcp.h
index bf73bda..298031d 100644
--- a/src/video_engine/include/vie_rtp_rtcp.h
+++ b/src/video_engine/include/vie_rtp_rtcp.h
@@ -206,9 +206,9 @@
// Enables and disables REMB packets for this channel. |sender| indicates
// this channel is encoding, |receiver| tells the bitrate estimate for
// this channel should be included in the REMB packet.
- virtual bool SetRembStatus(int video_channel,
- bool sender,
- bool receiver) = 0;
+ virtual int SetRembStatus(int video_channel,
+ bool sender,
+ bool receiver) = 0;
// The function gets statistics from the received RTCP report.
virtual int GetReceivedRTCPStatistics(
diff --git a/src/video_engine/test/auto_test/source/vie_autotest_custom_call.cc b/src/video_engine/test/auto_test/source/vie_autotest_custom_call.cc
index d0069a4..2005700 100644
--- a/src/video_engine/test/auto_test/source/vie_autotest_custom_call.cc
+++ b/src/video_engine/test/auto_test/source/vie_autotest_custom_call.cc
@@ -437,8 +437,8 @@
__FUNCTION__, __LINE__);
if (remb) {
- bool ret = ptrViERtpRtcp->SetRembStatus(videoChannel, true, true);
- numberOfErrors += ViETest::TestError(ret, "ERROR: %s at line %d",
+ error = ptrViERtpRtcp->SetRembStatus(videoChannel, true, true);
+ numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
__FUNCTION__, __LINE__);
} else {
error = ptrViERtpRtcp->SetTMMBRStatus(videoChannel, true);
diff --git a/src/video_engine/vie_rtp_rtcp_impl.cc b/src/video_engine/vie_rtp_rtcp_impl.cc
index ebfa200..3304692 100644
--- a/src/video_engine/vie_rtp_rtcp_impl.cc
+++ b/src/video_engine/vie_rtp_rtcp_impl.cc
@@ -561,12 +561,15 @@
return 0;
}
-bool ViERTP_RTCPImpl::SetRembStatus(int video_channel, bool sender,
+int ViERTP_RTCPImpl::SetRembStatus(int video_channel, bool sender,
bool receiver) {
WEBRTC_TRACE(kTraceApiCall, kTraceVideo, ViEId(instance_id_, video_channel),
"ViERTP_RTCPImpl::SetRembStatus(%d, %d, %d)", video_channel,
sender, receiver);
- return channel_manager_.SetRembStatus(video_channel, sender, receiver);
+ if (!channel_manager_.SetRembStatus(video_channel, sender, receiver)) {
+ return -1;
+ }
+ return 0;
}
int ViERTP_RTCPImpl::GetReceivedRTCPStatistics(const int video_channel,
diff --git a/src/video_engine/vie_rtp_rtcp_impl.h b/src/video_engine/vie_rtp_rtcp_impl.h
index f074b48..fa71c42 100644
--- a/src/video_engine/vie_rtp_rtcp_impl.h
+++ b/src/video_engine/vie_rtp_rtcp_impl.h
@@ -65,7 +65,7 @@
virtual int SetKeyFrameRequestMethod(const int video_channel,
const ViEKeyFrameRequestMethod method);
virtual int SetTMMBRStatus(const int video_channel, const bool enable);
- virtual bool SetRembStatus(int video_channel, bool sender, bool receiver);
+ virtual int SetRembStatus(int video_channel, bool sender, bool receiver);
virtual int GetReceivedRTCPStatistics(const int video_channel,
unsigned short& fraction_lost,
unsigned int& cumulative_lost,