Move definition of SpatialLayer to api/video_codecs/spatial_layer.h
Bug: webrtc:7660 Change-Id: I54009ebc5f65b6875a8c079ab5264e0c5ce9f654 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181500 Reviewed-by: Erik Språng <sprang@webrtc.org> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31942}
This commit is contained in:
@ -67,7 +67,7 @@ void ConfigureSimulcast(VideoCodec* codec_settings) {
|
||||
/* is_screenshare = */ false, true);
|
||||
|
||||
for (size_t i = 0; i < streams.size(); ++i) {
|
||||
SimulcastStream* ss = &codec_settings->simulcastStream[i];
|
||||
SpatialLayer* ss = &codec_settings->simulcastStream[i];
|
||||
ss->width = static_cast<uint16_t>(streams[i].width);
|
||||
ss->height = static_cast<uint16_t>(streams[i].height);
|
||||
ss->numberOfTemporalLayers =
|
||||
@ -277,8 +277,7 @@ std::string VideoCodecTestFixtureImpl::Config::ToString() const {
|
||||
if (codec_settings.numberOfSimulcastStreams > 1) {
|
||||
for (int i = 0; i < codec_settings.numberOfSimulcastStreams; ++i) {
|
||||
ss << "\n\n--> codec_settings.simulcastStream[" << i << "]";
|
||||
const SimulcastStream& simulcast_stream =
|
||||
codec_settings.simulcastStream[i];
|
||||
const SpatialLayer& simulcast_stream = codec_settings.simulcastStream[i];
|
||||
ss << "\nwidth: " << simulcast_stream.width;
|
||||
ss << "\nheight: " << simulcast_stream.height;
|
||||
ss << "\nnum_temporal_layers: "
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "common_types.h" // NOLINT(build/include)
|
||||
#include "api/video_codecs/spatial_layer.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
|
||||
@ -151,7 +151,7 @@ void SimulcastRateAllocator::DistributeAllocationToSimulcastLayers(
|
||||
size_t top_active_layer = active_layer;
|
||||
// Allocate up to the target bitrate for each active simulcast layer.
|
||||
for (; active_layer < codec_.numberOfSimulcastStreams; ++active_layer) {
|
||||
const SimulcastStream& stream =
|
||||
const SpatialLayer& stream =
|
||||
codec_.simulcastStream[layer_index[active_layer]];
|
||||
if (!stream.active) {
|
||||
stream_enabled_[layer_index[active_layer]] = false;
|
||||
@ -194,7 +194,7 @@ void SimulcastRateAllocator::DistributeAllocationToSimulcastLayers(
|
||||
// TODO(sprang): Allocate up to max bitrate for all layers once we have a
|
||||
// better idea of possible performance implications.
|
||||
if (left_in_total_allocation > DataRate::Zero()) {
|
||||
const SimulcastStream& stream = codec_.simulcastStream[top_active_layer];
|
||||
const SpatialLayer& stream = codec_.simulcastStream[top_active_layer];
|
||||
DataRate initial_layer_rate = DataRate::BitsPerSec(
|
||||
allocated_bitrates->GetSpatialLayerSum(top_active_layer));
|
||||
DataRate additional_allocation = std::min(
|
||||
|
||||
@ -196,7 +196,7 @@ void ConfigureStream(int width,
|
||||
int min_bitrate,
|
||||
int target_bitrate,
|
||||
float max_framerate,
|
||||
SimulcastStream* stream,
|
||||
SpatialLayer* stream,
|
||||
int num_temporal_layers) {
|
||||
assert(stream);
|
||||
stream->width = width;
|
||||
|
||||
@ -95,7 +95,7 @@ VideoCodec VideoCodecInitializer::VideoEncoderConfigToVideoCodec(
|
||||
int max_framerate = 0;
|
||||
|
||||
for (size_t i = 0; i < streams.size(); ++i) {
|
||||
SimulcastStream* sim_stream = &video_codec.simulcastStream[i];
|
||||
SpatialLayer* sim_stream = &video_codec.simulcastStream[i];
|
||||
RTC_DCHECK_GT(streams[i].width, 0);
|
||||
RTC_DCHECK_GT(streams[i].height, 0);
|
||||
RTC_DCHECK_GT(streams[i].max_framerate, 0);
|
||||
|
||||
Reference in New Issue
Block a user