blob: 4dbee5bd4b2cf5e91e9c0b8a14bdd479d285708c [file] [log] [blame]
Niels Möllerc0a9f352022-05-20 11:38:491/*
2 * Copyright (c) 2022 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#ifndef API_VIDEO_CODECS_SIMULCAST_STREAM_H_
12#define API_VIDEO_CODECS_SIMULCAST_STREAM_H_
13
Florent Castelli8037fc62024-08-29 13:00:4014#include <optional>
15
Niels Möller79924572022-07-05 12:22:2716#include "api/video_codecs/scalability_mode.h"
Dor Hend7d940e2024-08-19 08:13:3117#include "rtc_base/system/rtc_export.h"
Niels Möller79924572022-07-05 12:22:2718
Niels Möllerc0a9f352022-05-20 11:38:4919namespace webrtc {
20
21// TODO(bugs.webrtc.org/6883): Unify with struct VideoStream, part of
22// VideoEncoderConfig.
Hirokazu Honda48ae22f2024-05-20 23:14:5523struct RTC_EXPORT SimulcastStream {
Niels Möller79924572022-07-05 12:22:2724 // Temporary utility methods for transition from numberOfTemporalLayers
25 // setting to ScalabilityMode.
26 unsigned char GetNumberOfTemporalLayers() const;
Florent Castelli8037fc62024-08-29 13:00:4027 std::optional<ScalabilityMode> GetScalabilityMode() const;
Niels Möllerf2d090a2022-07-18 11:43:2328 void SetNumberOfTemporalLayers(unsigned char n);
Niels Möller79924572022-07-05 12:22:2729
Sergey Silkin29d40622024-05-08 06:51:4430 bool operator==(const SimulcastStream& other) const;
31 bool operator!=(const SimulcastStream& other) const {
32 return !(*this == other);
33 }
34
Niels Möller865e45d2022-07-04 15:16:5235 int width = 0;
36 int height = 0;
37 float maxFramerate = 0; // fps.
38 unsigned char numberOfTemporalLayers = 1;
39 unsigned int maxBitrate = 0; // kilobits/sec.
40 unsigned int targetBitrate = 0; // kilobits/sec.
41 unsigned int minBitrate = 0; // kilobits/sec.
42 unsigned int qpMax = 0; // minimum quality
43 bool active = false; // encoded and sent.
Niels Möllerc4b5f4d2022-05-20 13:18:2144};
Niels Möllerc0a9f352022-05-20 11:38:4945
46} // namespace webrtc
47#endif // API_VIDEO_CODECS_SIMULCAST_STREAM_H_