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

Unified Diff: webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h

Issue 2744233002: Provide default impl of TimeUntilNextProcess in MockRtpRtcp instead of mocking. (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h
diff --git a/webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h b/webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h
index cc7058a4e41bdfb3674cf6a1d0d906373e58b469..dd73c735867ac8c113b809ec1335dad2abbbe46c 100644
--- a/webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h
+++ b/webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h
@@ -15,6 +15,7 @@
#include <utility>
#include <vector>
+#include "webrtc/base/checks.h"
#include "webrtc/base/optional.h"
#include "webrtc/modules/include/module.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h"
@@ -196,7 +197,6 @@ class MockRtpRtcp : public RtpRtcp {
const FecProtectionParams& key_params));
MOCK_METHOD1(SetKeyFrameRequestMethod, int32_t(KeyFrameRequestMethod method));
MOCK_METHOD0(RequestKeyFrame, int32_t());
- MOCK_METHOD0(TimeUntilNextProcess, int64_t());
MOCK_METHOD0(Process, void());
MOCK_METHOD1(RegisterSendFrameCountObserver, void(FrameCountObserver*));
MOCK_CONST_METHOD0(GetSendFrameCountObserver, FrameCountObserver*(void));
@@ -207,6 +207,12 @@ class MockRtpRtcp : public RtpRtcp {
MOCK_METHOD1(SetVideoBitrateAllocation, void(const BitrateAllocation&));
// Members.
unsigned int remote_ssrc_;
+
+ private:
+ // Mocking this method is currently not required and having a default
+ // implementation like MOCK_METHOD0(TimeUntilNextProcess, int64_t())
+ // can be dangerous since it can cause a tight loop on a process thread.
+ virtual int64_t TimeUntilNextProcess() { return 0xffffffff; }
};
} // namespace webrtc
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698