VideoStreamEncoder report VideoLayersAllocation for simulcast

Adds support for Vp8 simulcast.

Bug: webrtc:12000
Change-Id: Ib24fd0542642b023ec35f7a7bdc4880d72365edf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/187341
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32416}
This commit is contained in:
Per Kjellander
2020-10-15 17:53:22 +02:00
committed by Commit Bot
parent 4244b5f6b4
commit a94348440b
8 changed files with 229 additions and 1 deletions

View File

@ -21,7 +21,6 @@ rtc_library("video_rtp_headers") {
"hdr_metadata.h",
"video_content_type.cc",
"video_content_type.h",
"video_layers_allocation.h",
"video_rotation.h",
"video_timing.cc",
"video_timing.h",
@ -182,6 +181,13 @@ rtc_library("video_bitrate_allocation") {
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
}
rtc_source_set("video_layers_allocation") {
visibility = [ "*" ]
sources = [ "video_layers_allocation.h" ]
deps = [ "../units:data_rate" ]
absl_deps = [ "//third_party/abseil-cpp/absl/container:inlined_vector" ]
}
rtc_library("video_bitrate_allocator") {
visibility = [ "*" ]
sources = [
@ -264,6 +270,7 @@ rtc_source_set("video_stream_encoder") {
":video_bitrate_allocator_factory",
":video_codec_constants",
":video_frame",
":video_layers_allocation",
"..:rtp_parameters",
"..:scoped_refptr",
"../:fec_controller_api",

View File

@ -19,6 +19,7 @@
#include "api/scoped_refptr.h"
#include "api/units/data_rate.h"
#include "api/video/video_bitrate_allocator.h"
#include "api/video/video_layers_allocation.h"
#include "api/video/video_sink_interface.h"
#include "api/video/video_source_interface.h"
#include "api/video_codecs/video_encoder.h"
@ -52,6 +53,9 @@ class VideoStreamEncoderInterface : public rtc::VideoSinkInterface<VideoFrame> {
virtual void OnBitrateAllocationUpdated(
const VideoBitrateAllocation& allocation) = 0;
virtual void OnVideoLayersAllocationUpdated(
VideoLayersAllocation allocation) = 0;
};
// If the resource is overusing, the VideoStreamEncoder will try to reduce