tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

simulcast_stream.h (1873B)


      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 <optional>
     15 
     16 #include "api/video_codecs/scalability_mode.h"
     17 #include "api/video_codecs/sdp_video_format.h"
     18 #include "rtc_base/system/rtc_export.h"
     19 
     20 namespace webrtc {
     21 
     22 // TODO(bugs.webrtc.org/6883): Unify with struct VideoStream, part of
     23 // VideoEncoderConfig.
     24 struct RTC_EXPORT SimulcastStream {
     25  // Temporary utility methods for transition from numberOfTemporalLayers
     26  // setting to ScalabilityMode.
     27  unsigned char GetNumberOfTemporalLayers() const;
     28  std::optional<ScalabilityMode> GetScalabilityMode() const;
     29  void SetNumberOfTemporalLayers(unsigned char n);
     30 
     31  bool operator==(const SimulcastStream& other) const;
     32  bool operator!=(const SimulcastStream& other) const {
     33    return !(*this == other);
     34  }
     35 
     36  int width = 0;
     37  int height = 0;
     38  float maxFramerate = 0;  // fps.
     39  unsigned char numberOfTemporalLayers = 1;
     40  unsigned int maxBitrate = 0;     // kilobits/sec.
     41  unsigned int targetBitrate = 0;  // kilobits/sec.
     42  unsigned int minBitrate = 0;     // kilobits/sec.
     43  unsigned int qpMax = 0;          // minimum quality
     44  bool active = false;             // encoded and sent.
     45  // The video format for this stream.
     46  // This should be set for mixed-codec simulcast, while for other cases,
     47  // it is optional and can be unset.
     48  std::optional<SdpVideoFormat> format;
     49 };
     50 
     51 }  // namespace webrtc
     52 #endif  // API_VIDEO_CODECS_SIMULCAST_STREAM_H_