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:
@ -17,6 +17,7 @@
|
||||
|
||||
#include "absl/types/optional.h"
|
||||
#include "api/units/data_rate.h"
|
||||
#include "api/video/render_resolution.h"
|
||||
#include "api/video_codecs/sdp_video_format.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -47,6 +48,13 @@ class VideoEncoderFactory {
|
||||
virtual absl::optional<SdpVideoFormat> OnAvailableBitrate(
|
||||
const DataRate& rate) = 0;
|
||||
|
||||
// Called every time the encoder input resolution change. Should return a
|
||||
// non-empty if an encoder switch should be performed.
|
||||
virtual absl::optional<SdpVideoFormat> OnResolutionChange(
|
||||
const RenderResolution& resolution) {
|
||||
return absl::nullopt;
|
||||
}
|
||||
|
||||
// Called if the currently used encoder reports itself as broken. Should
|
||||
// return a non-empty if an encoder switch should be performed.
|
||||
virtual absl::optional<SdpVideoFormat> OnEncoderBroken() = 0;
|
||||
|
||||
Reference in New Issue
Block a user