Add base class NetworkPredictor and NetworkPredictorFactory and wire up.
Add base class NetworkPredictor and NetworkPredictorFactory in /api, make it possible to inject customized NetworkPredictor in PeerConnectionFactory level. The NetworkPredictor object will be pass down to GoogCCNetworkControl and DelayBasedBwe. Bug: webrtc:10492 Change-Id: Iceeadbe1c9388b11ce4ac01ee56554cb0bf64d04 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130201 Commit-Queue: Ying Wang <yinwa@webrtc.org> Reviewed-by: Per Kjellander <perkj@webrtc.org> Reviewed-by: Stefan Holmer <stefan@webrtc.org> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27543}
This commit is contained in:
@ -173,6 +173,7 @@ public class PeerConnectionFactory {
|
||||
@Nullable private VideoDecoderFactory videoDecoderFactory;
|
||||
@Nullable private AudioProcessingFactory audioProcessingFactory;
|
||||
@Nullable private FecControllerFactoryFactoryInterface fecControllerFactoryFactory;
|
||||
@Nullable private NetworkStatePredictorFactoryFactory networkStatePredictorFactoryFactory;
|
||||
@Nullable private MediaTransportFactoryFactory mediaTransportFactoryFactory;
|
||||
|
||||
private Builder() {}
|
||||
@ -232,6 +233,12 @@ public class PeerConnectionFactory {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder NetworkStatePredictorFactoryFactory(
|
||||
NetworkStatePredictorFactoryFactory networkStatePredictorFactoryFactory) {
|
||||
this.networkStatePredictorFactoryFactory = networkStatePredictorFactoryFactory;
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Sets a MediaTransportFactoryFactory for a PeerConnectionFactory. */
|
||||
public Builder setMediaTransportFactoryFactory(
|
||||
MediaTransportFactoryFactory mediaTransportFactoryFactory) {
|
||||
@ -252,6 +259,9 @@ public class PeerConnectionFactory {
|
||||
videoDecoderFactory,
|
||||
audioProcessingFactory == null ? 0 : audioProcessingFactory.createNative(),
|
||||
fecControllerFactoryFactory == null ? 0 : fecControllerFactoryFactory.createNative(),
|
||||
networkStatePredictorFactoryFactory == null
|
||||
? 0
|
||||
: networkStatePredictorFactoryFactory.createNativeNetworkStatePredictorFactory(),
|
||||
mediaTransportFactoryFactory == null
|
||||
? 0
|
||||
: mediaTransportFactoryFactory.createNativeMediaTransportFactory());
|
||||
@ -575,7 +585,8 @@ public class PeerConnectionFactory {
|
||||
Options options, long nativeAudioDeviceModule, long audioEncoderFactory,
|
||||
long audioDecoderFactory, VideoEncoderFactory encoderFactory,
|
||||
VideoDecoderFactory decoderFactory, long nativeAudioProcessor,
|
||||
long nativeFecControllerFactory, long mediaTransportFactory);
|
||||
long nativeFecControllerFactory, long nativeNetworkStatePredictorFactory,
|
||||
long mediaTransportFactory);
|
||||
|
||||
private static native long nativeCreatePeerConnection(long factory,
|
||||
PeerConnection.RTCConfiguration rtcConfig, MediaConstraints constraints, long nativeObserver,
|
||||
|
||||
Reference in New Issue
Block a user