Add ability to specify if rate controller of video encoder is trusted.
If rate controller is trusted, we disable the frame dropper in the media optimization module. This is a re-land of https://webrtc-review.googlesource.com/c/src/+/105020 Bug: webrtc:9890 Change-Id: I418e47a43a1a98cb2fd5295c03360b954f2288f2 Reviewed-on: https://webrtc-review.googlesource.com/c/109141 Commit-Queue: Erik Språng <sprang@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25570}
This commit is contained in:
@ -112,7 +112,18 @@ class VideoSender {
|
||||
VCMEncodedFrameCallback _encodedFrameCallback RTC_GUARDED_BY(encoder_crit_);
|
||||
EncodedImageCallback* const post_encode_callback_;
|
||||
VCMEncoderDataBase _codecDataBase RTC_GUARDED_BY(encoder_crit_);
|
||||
bool frame_dropper_enabled_ RTC_GUARDED_BY(encoder_crit_);
|
||||
|
||||
// |frame_dropper_requested_| specifies if the user of this class has
|
||||
// requested frame dropping to be enabled, via EnableFrameDropper().
|
||||
// Depending on video encoder configuration, this setting may be overridden
|
||||
// and the frame dropper be force disabled. If so,
|
||||
// |force_disable_frame_dropper_| will be set to true.
|
||||
// If frame dropper is requested, and is not force disabled, frame dropping
|
||||
// might still be disabled if VideoEncoder::GetEncoderInfo() indicates that
|
||||
// the encoder has a trusted rate controller. This is determined on a
|
||||
// per-frame basis, as the encoder behavior might dynamically change.
|
||||
bool frame_dropper_requested_ RTC_GUARDED_BY(encoder_crit_);
|
||||
bool force_disable_frame_dropper_ RTC_GUARDED_BY(encoder_crit_);
|
||||
|
||||
// Must be accessed on the construction thread of VideoSender.
|
||||
VideoCodec current_codec_;
|
||||
|
Reference in New Issue
Block a user