mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-17 15:47:53 +01:00

* Simplified ctor. Get settings (max_qp, content_type, etc) from encoder_config passed to CreateEncoderStreams(). * Some tests assigned VideoEncoderConfig::video_stream_factory to EncoderStreamFactory they created. That's not really needed. VideoStreamEncoder creates the factory if video_stream_factory is not provided [1]. Removed video_stream_factory initialization in tests. [1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/video/video_stream_encoder.cc;l=1002;drc=1d7d0e6e2c5002815853be251ce43fe88779ac85 Bug: b/347150850, webrtc:42233936 Change-Id: Ie0322abb6c48e1a9bd10e9ed3879e3ed484fea5d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355321 Reviewed-by: Erik Språng <sprang@webrtc.org> Reviewed-by: Björn Terelius <terelius@webrtc.org> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org> Cr-Commit-Position: refs/heads/main@{#42608}
36 lines
1.3 KiB
C++
36 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 <stdint.h>
|
|
|
|
#include "api/video_codecs/video_codec.h"
|
|
#include "video/config/video_encoder_config.h"
|
|
|
|
namespace webrtc {
|
|
|
|
class SimulcastUtility {
|
|
public:
|
|
static uint32_t SumStreamMaxBitrate(int streams, const VideoCodec& codec);
|
|
static int NumberOfSimulcastStreams(const VideoCodec& codec);
|
|
static bool ValidSimulcastParameters(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);
|
|
static bool IsConferenceModeScreenshare(
|
|
const VideoEncoderConfig& encoder_config);
|
|
};
|
|
|
|
} // namespace webrtc
|
|
|
|
#endif // MODULES_VIDEO_CODING_UTILITY_SIMULCAST_UTILITY_H_
|