2016-01-12 13:55:00 +01:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#ifndef MODULES_BITRATE_CONTROLLER_INCLUDE_MOCK_MOCK_BITRATE_CONTROLLER_H_
|
|
|
|
|
#define MODULES_BITRATE_CONTROLLER_INCLUDE_MOCK_MOCK_BITRATE_CONTROLLER_H_
|
2016-01-12 13:55:00 +01:00
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "modules/bitrate_controller/include/bitrate_controller.h"
|
|
|
|
|
#include "test/gmock.h"
|
2016-01-12 13:55:00 +01:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
namespace test {
|
|
|
|
|
|
|
|
|
|
class MockBitrateObserver : public BitrateObserver {
|
|
|
|
|
public:
|
|
|
|
|
MOCK_METHOD3(OnNetworkChanged,
|
|
|
|
|
void(uint32_t bitrate_bps,
|
|
|
|
|
uint8_t fraction_loss,
|
|
|
|
|
int64_t rtt_ms));
|
|
|
|
|
};
|
2016-01-20 07:13:58 -08:00
|
|
|
|
|
|
|
|
class MockBitrateController : public BitrateController {
|
|
|
|
|
public:
|
|
|
|
|
MOCK_METHOD0(CreateRtcpBandwidthObserver, RtcpBandwidthObserver*());
|
|
|
|
|
MOCK_METHOD1(SetStartBitrate, void(int start_bitrate_bps));
|
|
|
|
|
MOCK_METHOD2(SetMinMaxBitrate,
|
|
|
|
|
void(int min_bitrate_bps, int max_bitrate_bps));
|
2016-04-28 15:52:49 +02:00
|
|
|
MOCK_METHOD3(SetBitrates,
|
|
|
|
|
void(int start_bitrate_bps,
|
|
|
|
|
int min_bitrate_bps,
|
|
|
|
|
int max_bitrate_bps));
|
2016-06-24 11:03:55 -07:00
|
|
|
MOCK_METHOD3(ResetBitrates,
|
|
|
|
|
void(int bitrate_bps, int min_bitrate_bps, int max_bitrate_bps));
|
2016-01-20 07:13:58 -08:00
|
|
|
MOCK_METHOD1(UpdateDelayBasedEstimate, void(uint32_t bitrate_bps));
|
2016-08-24 02:45:35 -07:00
|
|
|
MOCK_METHOD1(UpdateProbeBitrate, void(uint32_t bitrate_bps));
|
2016-01-20 07:13:58 -08:00
|
|
|
MOCK_METHOD1(SetEventLog, void(RtcEventLog* event_log));
|
|
|
|
|
MOCK_CONST_METHOD1(AvailableBandwidth, bool(uint32_t* bandwidth));
|
|
|
|
|
MOCK_METHOD1(SetReservedBitrate, void(uint32_t reserved_bitrate_bps));
|
2016-05-11 06:01:13 -07:00
|
|
|
MOCK_METHOD3(GetNetworkParameters,
|
|
|
|
|
bool(uint32_t* bitrate, uint8_t* fraction_loss, int64_t* rtt));
|
2016-01-20 07:13:58 -08:00
|
|
|
|
2016-02-25 04:50:01 -08:00
|
|
|
MOCK_METHOD0(Process, void());
|
2016-01-20 07:13:58 -08:00
|
|
|
MOCK_METHOD0(TimeUntilNextProcess, int64_t());
|
|
|
|
|
};
|
2016-01-12 13:55:00 +01:00
|
|
|
} // namespace test
|
|
|
|
|
} // namespace webrtc
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#endif // MODULES_BITRATE_CONTROLLER_INCLUDE_MOCK_MOCK_BITRATE_CONTROLLER_H_
|