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

Unified Diff: webrtc/video/encoder_state_feedback_unittest.cc

Issue 1958053002: Revert "Reland of Remove SendPacer from ViEEncoder (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased Created 4 years, 7 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/modules/remote_bitrate_estimator/test/packet_sender.cc ('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/encoder_state_feedback_unittest.cc
diff --git a/webrtc/video/encoder_state_feedback_unittest.cc b/webrtc/video/encoder_state_feedback_unittest.cc
index b9f27d575a74a69a5c36740dd2a3f0990220471c..3bc45f1843a5d45f324a889890414304d5e78b80 100644
--- a/webrtc/video/encoder_state_feedback_unittest.cc
+++ b/webrtc/video/encoder_state_feedback_unittest.cc
@@ -12,6 +12,8 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/modules/pacing/packet_router.h"
+#include "webrtc/modules/bitrate_controller/include/bitrate_controller.h"
#include "webrtc/modules/utility/include/mock/mock_process_thread.h"
#include "webrtc/video/vie_encoder.h"
@@ -21,11 +23,13 @@ namespace webrtc {
class MockVieEncoder : public ViEEncoder {
public:
- explicit MockVieEncoder(ProcessThread* process_thread)
+ explicit MockVieEncoder(ProcessThread* process_thread, PacedSender* pacer)
: ViEEncoder(1,
process_thread,
nullptr,
- nullptr) {}
+ nullptr,
+ nullptr,
+ pacer) {}
~MockVieEncoder() {}
MOCK_METHOD1(OnReceivedIntraFrameRequest, void(size_t));
@@ -36,7 +40,13 @@ class MockVieEncoder : public ViEEncoder {
class VieKeyRequestTest : public ::testing::Test {
public:
VieKeyRequestTest()
- : encoder_(&process_thread_),
+ : pacer_(Clock::GetRealTimeClock(),
+ &router_,
+ BitrateController::kDefaultStartBitrateKbps,
+ PacedSender::kDefaultPaceMultiplier *
+ BitrateController::kDefaultStartBitrateKbps,
+ 0),
+ encoder_(&process_thread_, &pacer_),
simulated_clock_(123456789),
encoder_state_feedback_(
&simulated_clock_,
@@ -46,6 +56,8 @@ class VieKeyRequestTest : public ::testing::Test {
protected:
const uint32_t kSsrc = 1234;
NiceMock<MockProcessThread> process_thread_;
+ PacketRouter router_;
+ PacedSender pacer_;
MockVieEncoder encoder_;
SimulatedClock simulated_clock_;
EncoderStateFeedback encoder_state_feedback_;
« no previous file with comments | « webrtc/modules/remote_bitrate_estimator/test/packet_sender.cc ('k') | webrtc/video/video_send_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698