• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 #ifndef API_TRANSPORT_GOOG_CC_FACTORY_H_
12 #define API_TRANSPORT_GOOG_CC_FACTORY_H_
13 #include <memory>
14 
15 #include "api/network_state_predictor.h"
16 #include "api/transport/network_control.h"
17 #include "rtc_base/deprecation.h"
18 
19 namespace webrtc {
20 class RtcEventLog;
21 
22 struct GoogCcFactoryConfig {
23   std::unique_ptr<NetworkStateEstimatorFactory>
24       network_state_estimator_factory = nullptr;
25   NetworkStatePredictorFactoryInterface* network_state_predictor_factory =
26       nullptr;
27   bool feedback_only = false;
28 };
29 
30 class GoogCcNetworkControllerFactory
31     : public NetworkControllerFactoryInterface {
32  public:
33   GoogCcNetworkControllerFactory() = default;
34   explicit RTC_DEPRECATED GoogCcNetworkControllerFactory(
35       RtcEventLog* event_log);
36   explicit GoogCcNetworkControllerFactory(
37       NetworkStatePredictorFactoryInterface* network_state_predictor_factory);
38 
39   explicit GoogCcNetworkControllerFactory(GoogCcFactoryConfig config);
40   std::unique_ptr<NetworkControllerInterface> Create(
41       NetworkControllerConfig config) override;
42   TimeDelta GetProcessInterval() const override;
43 
44  protected:
45   RtcEventLog* const event_log_ = nullptr;
46   GoogCcFactoryConfig factory_config_;
47 };
48 
49 // Deprecated, use GoogCcFactoryConfig to enable feedback only mode instead.
50 // Factory to create packet feedback only GoogCC, this can be used for
51 // connections providing packet receive time feedback but no other reports.
52 class RTC_DEPRECATED GoogCcFeedbackNetworkControllerFactory
53     : public GoogCcNetworkControllerFactory {
54  public:
55   explicit GoogCcFeedbackNetworkControllerFactory(RtcEventLog* event_log);
56 };
57 
58 }  // namespace webrtc
59 
60 #endif  // API_TRANSPORT_GOOG_CC_FACTORY_H_
61