xref: /aosp_15_r20/external/webrtc/api/video_codecs/simulcast_stream.h (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1 /*
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 
14 #include "api/video_codecs/scalability_mode.h"
15 
16 namespace webrtc {
17 
18 // TODO(bugs.webrtc.org/6883): Unify with struct VideoStream, part of
19 // VideoEncoderConfig.
20 struct SimulcastStream {
21   // Temporary utility methods for transition from numberOfTemporalLayers
22   // setting to ScalabilityMode.
23   unsigned char GetNumberOfTemporalLayers() const;
24   ScalabilityMode GetScalabilityMode() const;
25   void SetNumberOfTemporalLayers(unsigned char n);
26 
27   int width = 0;
28   int height = 0;
29   float maxFramerate = 0;  // fps.
30   unsigned char numberOfTemporalLayers = 1;
31   unsigned int maxBitrate = 0;     // kilobits/sec.
32   unsigned int targetBitrate = 0;  // kilobits/sec.
33   unsigned int minBitrate = 0;     // kilobits/sec.
34   unsigned int qpMax = 0;          // minimum quality
35   bool active = false;             // encoded and sent.
36 };
37 
38 }  // namespace webrtc
39 #endif  // API_VIDEO_CODECS_SIMULCAST_STREAM_H_
40