webrtc/api/video_codecs
Erik Språng 4d9df38d82 Add new more flexible VideoEncoder::SetRate() method.
This CL changes the API for webrtc::VideoEncoder.

There is a legacy method called SetRates(). This is indicated as being
deprecated, but there seem to be a number of usages still left.

Then there is the new SetRateAllocation() method which takes a
VideoBitrateAllocation instance instead of a single target bitrate.

This CL adds a new version of SetRates() which moves all the existing
parameters in a RateControlParameters struct, and adds a bandwidth
allocation signal. The intent of this signal is to allow the encoder
to know how close to the target it needs to stay. If the encoder rate
is network restricted, it will need to be more aggressive in keep the
rate down and possibly drop frames. If there is some margin for
overshoot, it might do different trade-offs.

Furthermore, the frame rate signal is changes from an integer to a
floating point type in order to get more precise rates at low frame
rates and the return type has been changed to void since the only use
of the previous values to log it and that is better done inside encoder
where the error condition originates.

The intent is to properly deprecate the "old" SetRates() /
SetRateAllocation() methods, send out a PSA and then remove them in two
weeks. Changes required by users should be trivial, as using the new
headroom signal is optional.

Bug: webrtc:10155, webrtc:10481
Change-Id: I4f797b0b0c73086111869ef4ee5f42bf530f5fde
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129724
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@{#27314}
2019-03-27 14:31:11 +00:00
..
test Make VideoFrameType an enum class, and move to separate file and target 2019-03-22 12:44:51 +00:00
bitstream_parser.h Add interface class for bitstream parser. 2019-03-22 12:14:41 +00:00
BUILD.gn Add new more flexible VideoEncoder::SetRate() method. 2019-03-27 14:31:11 +00:00
builtin_video_decoder_factory.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
builtin_video_decoder_factory.h Export symbols needed by the Chromium component build (part 6). 2018-10-23 06:48:51 +00:00
builtin_video_encoder_factory.cc Use EncoderSimulcastProxy for all codecs 2019-01-23 15:59:54 +00:00
builtin_video_encoder_factory.h Export symbols needed by the Chromium component build (part 6). 2018-10-23 06:48:51 +00:00
OWNERS Add magjed/nisse/sprang/brandtr as api/video_codecs owners 2018-11-08 15:43:03 +00:00
sdp_video_format.cc Add copy and move operations to SdpVideoFormat. 2018-03-28 09:46:26 +00:00
sdp_video_format.h Export symbols needed by the Chromium component build (part 6). 2018-10-23 06:48:51 +00:00
video_codec.cc Delete unused constant kVideoCodecI420 2019-01-11 09:04:56 +00:00
video_codec.h H.264 temporal layers w/frame marking (PART 2/3) 2019-02-09 16:47:09 +00:00
video_decoder.cc Revert "Delete CodecSpecificInfo argument from VideoDecoder::Decode" 2019-03-07 19:40:17 +00:00
video_decoder.h Revert "Delete CodecSpecificInfo argument from VideoDecoder::Decode" 2019-03-07 19:40:17 +00:00
video_decoder_factory.cc Add receive stream id argument to CreateDecoder() method 2018-09-11 08:47:04 +00:00
video_decoder_factory.h Add receive stream id argument to CreateDecoder() method 2018-09-11 08:47:04 +00:00
video_decoder_software_fallback_wrapper.cc Revert "Delete CodecSpecificInfo argument from VideoDecoder::Decode" 2019-03-07 19:40:17 +00:00
video_decoder_software_fallback_wrapper.h Make rtc_software_fallback_wrappers target visible. 2018-06-12 12:51:34 +00:00
video_encoder.cc Add new more flexible VideoEncoder::SetRate() method. 2019-03-27 14:31:11 +00:00
video_encoder.h Add new more flexible VideoEncoder::SetRate() method. 2019-03-27 14:31:11 +00:00
video_encoder_config.cc Implement the encoding RtpParameter scaleResolutionDownBy 2019-01-29 14:32:17 +00:00
video_encoder_config.h Implement the encoding RtpParameter scaleResolutionDownBy 2019-01-29 14:32:17 +00:00
video_encoder_factory.h Revert "Replace VideoEncoderFactory::QueryVideoEncoder with VideoEncoder::GetEncoderInfo" 2018-12-10 10:36:00 +00:00
video_encoder_software_fallback_wrapper.cc Prepare for splitting FrameType into AudioFrameType and VideoFrameType 2019-03-07 10:12:57 +00:00
video_encoder_software_fallback_wrapper.h Make rtc_software_fallback_wrappers target visible. 2018-06-12 12:51:34 +00:00
vp8_frame_buffer_controller.h Use single FrameBufferController in VP8, created by a factory. 2019-03-20 11:54:02 +00:00
vp8_frame_config.cc Break FrameConfig out of Vp8TemporalLayers 2019-01-29 14:13:55 +00:00
vp8_frame_config.h Break FrameConfig out of Vp8TemporalLayers 2019-01-29 14:13:55 +00:00
vp8_temporal_layers.cc Use Abseil container algorithms in api/ 2019-03-25 22:11:06 +00:00
vp8_temporal_layers.h Use single FrameBufferController in VP8, created by a factory. 2019-03-20 11:54:02 +00:00
vp8_temporal_layers_factory.cc Use single FrameBufferController in VP8, created by a factory. 2019-03-20 11:54:02 +00:00
vp8_temporal_layers_factory.h Use single FrameBufferController in VP8, created by a factory. 2019-03-20 11:54:02 +00:00