2018-02-27 17:07:02 +01:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2018 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.
|
|
|
|
|
*/
|
|
|
|
|
|
2018-10-09 19:02:03 +02:00
|
|
|
#ifndef API_TRANSPORT_GOOG_CC_FACTORY_H_
|
|
|
|
|
#define API_TRANSPORT_GOOG_CC_FACTORY_H_
|
2018-05-03 11:18:32 +02:00
|
|
|
#include <memory>
|
|
|
|
|
|
2019-04-10 13:48:24 +02:00
|
|
|
#include "api/network_state_predictor.h"
|
2018-05-09 10:33:39 +02:00
|
|
|
#include "api/transport/network_control.h"
|
2019-09-17 12:47:17 +02:00
|
|
|
#include "rtc_base/deprecation.h"
|
2018-02-27 17:07:02 +01:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
class RtcEventLog;
|
|
|
|
|
|
2019-04-15 15:42:25 +02:00
|
|
|
struct GoogCcFactoryConfig {
|
|
|
|
|
std::unique_ptr<NetworkStateEstimatorFactory>
|
|
|
|
|
network_state_estimator_factory = nullptr;
|
|
|
|
|
NetworkStatePredictorFactoryInterface* network_state_predictor_factory =
|
|
|
|
|
nullptr;
|
|
|
|
|
bool feedback_only = false;
|
|
|
|
|
};
|
|
|
|
|
|
2018-02-27 17:07:02 +01:00
|
|
|
class GoogCcNetworkControllerFactory
|
|
|
|
|
: public NetworkControllerFactoryInterface {
|
|
|
|
|
public:
|
2019-04-30 14:17:45 +02:00
|
|
|
GoogCcNetworkControllerFactory() = default;
|
|
|
|
|
explicit RTC_DEPRECATED GoogCcNetworkControllerFactory(
|
|
|
|
|
RtcEventLog* event_log);
|
2019-04-10 13:48:24 +02:00
|
|
|
explicit GoogCcNetworkControllerFactory(
|
|
|
|
|
NetworkStatePredictorFactoryInterface* network_state_predictor_factory);
|
2019-04-15 15:42:25 +02:00
|
|
|
|
|
|
|
|
explicit GoogCcNetworkControllerFactory(GoogCcFactoryConfig config);
|
2018-05-03 11:18:32 +02:00
|
|
|
std::unique_ptr<NetworkControllerInterface> Create(
|
2018-03-13 11:38:04 +01:00
|
|
|
NetworkControllerConfig config) override;
|
2018-02-27 17:07:02 +01:00
|
|
|
TimeDelta GetProcessInterval() const override;
|
|
|
|
|
|
2019-04-15 15:42:25 +02:00
|
|
|
protected:
|
|
|
|
|
RtcEventLog* const event_log_ = nullptr;
|
|
|
|
|
GoogCcFactoryConfig factory_config_;
|
2018-02-27 17:07:02 +01:00
|
|
|
};
|
2018-08-06 13:20:36 +02:00
|
|
|
|
2019-04-24 15:13:26 +02:00
|
|
|
// Deprecated, use GoogCcFactoryConfig to enable feedback only mode instead.
|
2018-08-06 13:20:36 +02:00
|
|
|
// Factory to create packet feedback only GoogCC, this can be used for
|
|
|
|
|
// connections providing packet receive time feedback but no other reports.
|
2019-04-24 15:13:26 +02:00
|
|
|
class RTC_DEPRECATED GoogCcFeedbackNetworkControllerFactory
|
2019-04-15 15:42:25 +02:00
|
|
|
: public GoogCcNetworkControllerFactory {
|
2018-08-06 13:20:36 +02:00
|
|
|
public:
|
2019-04-10 13:48:24 +02:00
|
|
|
explicit GoogCcFeedbackNetworkControllerFactory(RtcEventLog* event_log);
|
2018-08-06 13:20:36 +02:00
|
|
|
};
|
2019-04-15 15:42:25 +02:00
|
|
|
|
2018-02-27 17:07:02 +01:00
|
|
|
} // namespace webrtc
|
|
|
|
|
|
2018-10-09 19:02:03 +02:00
|
|
|
#endif // API_TRANSPORT_GOOG_CC_FACTORY_H_
|