Remove SetCaptureDelay from the RTP module.
This is a small step in getting rid of the default module, but also to
eventually delete FrameProviderBase completely.
BUG=769
R=pbos@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/34229004
Cr-Commit-Position: refs/heads/master@{#8396}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8396 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h b/webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h
index 49247ce..f509337 100644
--- a/webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h
+++ b/webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h
@@ -611,13 +611,6 @@
***************************************************************************/
/*
- * Set the estimated camera delay in MS
- *
- * return -1 on failure else 0
- */
- virtual int32_t SetCameraDelay(int32_t delayMS) = 0;
-
- /*
* Set the target send bitrate
*/
virtual void SetTargetSendBitrate(
diff --git a/webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h b/webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h
index 57de5fe..6c8dff4 100644
--- a/webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h
+++ b/webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h
@@ -231,8 +231,6 @@
int32_t(bool& enable, uint8_t& ID));
MOCK_METHOD1(SetAudioLevel,
int32_t(const uint8_t level_dBov));
- MOCK_METHOD1(SetCameraDelay,
- int32_t(const int32_t delayMS));
MOCK_METHOD1(SetTargetSendBitrate,
void(const std::vector<uint32_t>& stream_bitrates));
MOCK_METHOD3(SetGenericFECStatus,
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc b/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
index 7bf38a6..fbfe832 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
@@ -108,9 +108,6 @@
internal_report_blocks_(),
external_report_blocks_(),
_csrcCNAMEs(),
-
- _cameraDelayMS(0),
-
_lastSendReport(),
_lastRTCPTime(),
@@ -302,18 +299,6 @@
_remoteSSRC = ssrc;
}
-int32_t RTCPSender::SetCameraDelay(int32_t delayMS) {
- CriticalSectionScoped lock(_criticalSectionRTCPSender);
- if(delayMS > 1000 || delayMS < -1000)
- {
- LOG(LS_WARNING) << "Delay can't be larger than 1 second: "
- << delayMS << " ms";
- return -1;
- }
- _cameraDelayMS = delayMS;
- return 0;
-}
-
int32_t RTCPSender::SetCNAME(const char cName[RTCP_CNAME_SIZE]) {
if (!cName)
return -1;
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_sender.h b/webrtc/modules/rtp_rtcp/source/rtcp_sender.h
index 874adbf..fcc79b6 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_sender.h
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_sender.h
@@ -93,8 +93,6 @@
void SetRemoteSSRC(uint32_t ssrc);
- int32_t SetCameraDelay(int32_t delayMS);
-
int32_t SetCNAME(const char cName[RTCP_CNAME_SIZE]);
int32_t AddMixedCNAME(uint32_t SSRC, const char cName[RTCP_CNAME_SIZE]);
@@ -303,8 +301,6 @@
std::map<uint32_t, RTCPUtility::RTCPCnameInformation*> _csrcCNAMEs
GUARDED_BY(_criticalSectionRTCPSender);
- int32_t _cameraDelayMS GUARDED_BY(_criticalSectionRTCPSender);
-
// Sent
uint32_t _lastSendReport[RTCP_NUMBER_OF_SR] GUARDED_BY(
_criticalSectionRTCPSender); // allow packet loss and RTT above 1 sec
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
index 89ac9a0..98c9bf9 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
@@ -959,22 +959,6 @@
GetFeedbackState(), kRtcpSli, 0, 0, false, picture_id);
}
-int32_t ModuleRtpRtcpImpl::SetCameraDelay(const int32_t delay_ms) {
- if (IsDefaultModule()) {
- CriticalSectionScoped lock(critical_section_module_ptrs_.get());
- std::vector<ModuleRtpRtcpImpl*>::iterator it = child_modules_.begin();
- while (it != child_modules_.end()) {
- RtpRtcp* module = *it;
- if (module) {
- module->SetCameraDelay(delay_ms);
- }
- it++;
- }
- return 0;
- }
- return rtcp_sender_.SetCameraDelay(delay_ms);
-}
-
int32_t ModuleRtpRtcpImpl::SetGenericFECStatus(
const bool enable,
const uint8_t payload_type_red,
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h
index 7f61b7d..0c028bb 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h
@@ -292,8 +292,6 @@
// Send a request for a keyframe.
virtual int32_t RequestKeyFrame() OVERRIDE;
- virtual int32_t SetCameraDelay(int32_t delay_ms) OVERRIDE;
-
virtual void SetTargetSendBitrate(
const std::vector<uint32_t>& stream_bitrates) OVERRIDE;
diff --git a/webrtc/video_engine/vie_encoder.cc b/webrtc/video_engine/vie_encoder.cc
index 7e010b1..90abacc 100644
--- a/webrtc/video_engine/vie_encoder.cc
+++ b/webrtc/video_engine/vie_encoder.cc
@@ -618,7 +618,6 @@
}
void ViEEncoder::DelayChanged(int id, int frame_delay) {
- default_rtp_rtcp_->SetCameraDelay(frame_delay);
}
int ViEEncoder::GetPreferedFrameSettings(int* width,