webrtc/modules/video_coding/utility/simulcast_utility.h
Erik Språng 8abd56cfdf Split TemporalLayers and TemporalLayers checker, clean up header.
This CL is a step towards making the TemporalLayers landable in api/ :
* It splits TemporalLayers from TemporalLayersChecker
* It initially renames temporal_layer.h to vp8_temporal_layers.h and
  moved it into the include/ folder
* It removes the dependency on VideoCodec, which was essentially only
  used to determine if screenshare_layers or default_temporal_layers
  should be used, and the number of temporal temporal layers to use.

Subsequent CLs will make further cleanup before attempting a move to api

Bug: webrtc:9012
Change-Id: I87ea7aac66d39284eaebd86aa9d015aba2eaaaea
Reviewed-on: https://webrtc-review.googlesource.com/94156
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24920}
2018-10-02 07:52:02 +00:00

33 lines
1.3 KiB
C++

/*
* Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef MODULES_VIDEO_CODING_UTILITY_SIMULCAST_UTILITY_H_
#define MODULES_VIDEO_CODING_UTILITY_SIMULCAST_UTILITY_H_
#include "api/video_codecs/video_encoder.h"
namespace webrtc {
class SimulcastUtility {
public:
static uint32_t SumStreamMaxBitrate(int streams, const VideoCodec& codec);
static int NumberOfSimulcastStreams(const VideoCodec& codec);
static bool ValidSimulcastResolutions(const VideoCodec& codec,
int num_streams);
static bool ValidSimulcastTemporalLayers(const VideoCodec& codec,
int num_streams);
static int NumberOfTemporalLayers(const VideoCodec& codec, int spatial_id);
// TODO(sprang): Remove this hack when ScreenshareLayers is gone.
static bool IsConferenceModeScreenshare(const VideoCodec& codec);
};
} // namespace webrtc
#endif // MODULES_VIDEO_CODING_UTILITY_SIMULCAST_UTILITY_H_