Define FecControllerOverride and plumb it down to VideoEncoder
The purpose of this interface is to allow VideoEncoder to override
the bandwidth allocation set by FecController in RtpVideoSender.
This CL defines the interface and sends it down to VideoSender.
Two upcoming CLs will:
1. Make LibvpxVp8Encoder pass it on to the (injectable)
FrameBufferController, where it might be put to good use.
2. Modify RtpVideoSender to respond to the message sent to it
via this API.
TBR=kwiberg@webrtc.org
Bug: webrtc:10769
Change-Id: I2ef82f0ddcde7fd078e32d8aabf6efe43e0f7f8a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143962
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28416}
diff --git a/api/video/video_stream_encoder_interface.h b/api/video/video_stream_encoder_interface.h
index 4e3c470..5ca54e3 100644
--- a/api/video/video_stream_encoder_interface.h
+++ b/api/video/video_stream_encoder_interface.h
@@ -13,6 +13,7 @@
#include <vector>
+#include "api/fec_controller_override.h"
#include "api/rtp_parameters.h" // For DegradationPreference.
#include "api/units/data_rate.h"
#include "api/video/video_bitrate_allocator.h"
@@ -97,6 +98,13 @@
virtual void SetBitrateAllocationObserver(
VideoBitrateAllocationObserver* bitrate_observer) = 0;
+ // Set a FecControllerOverride, through which the encoder may override
+ // decisions made by FecController.
+ // TODO(bugs.webrtc.org/10769): Update downstream projects and then make this
+ // pure-virtual.
+ virtual void SetFecControllerOverride(
+ FecControllerOverride* fec_controller_override) {}
+
// Creates and configures an encoder with the given |config|. The
// |max_data_payload_length| is used to support single NAL unit
// packetization for H.264.