Added OnResolutionChange to EncoderSelectorInterface.

Bug: webrtc:12406
Change-Id: I0160636d93ad0a33caf7ae7443cefe321a191406
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258442
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36517}
This commit is contained in:
philipel
2022-04-11 10:48:28 +02:00
committed by WebRTC LUCI CQ
parent 9797dcd1a7
commit 6daa3048fc
7 changed files with 89 additions and 0 deletions

View File

@ -24,6 +24,16 @@ public interface VideoEncoderFactory {
*/
@Nullable @CalledByNative("VideoEncoderSelector") VideoCodecInfo onAvailableBitrate(int kbps);
/**
* Called every time the encoder input resolution change. Returns null if the encoder selector
* prefers to keep the current encoder or a VideoCodecInfo if a new encoder is preferred.
*/
@Nullable
@CalledByNative("VideoEncoderSelector")
default VideoCodecInfo onResolutionChange(int widht, int height) {
return null;
}
/**
* Called when the currently used encoder signal itself as broken. Returns null if the encoder
* selector prefers to keep the current encoder or a VideoCodecInfo if a new encoder is