tor-browser

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

video_stream_input_state.h (1719B)


      1 /*
      2 *  Copyright 2020 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 CALL_ADAPTATION_VIDEO_STREAM_INPUT_STATE_H_
     12 #define CALL_ADAPTATION_VIDEO_STREAM_INPUT_STATE_H_
     13 
     14 #include <optional>
     15 
     16 #include "api/video/video_codec_type.h"
     17 
     18 namespace webrtc {
     19 
     20 // The source resolution, frame rate and other properties of a
     21 // VideoStreamEncoder.
     22 class VideoStreamInputState {
     23 public:
     24  VideoStreamInputState();
     25 
     26  void set_has_input(bool has_input);
     27  void set_frame_size_pixels(std::optional<int> frame_size_pixels);
     28  void set_frames_per_second(int frames_per_second);
     29  void set_video_codec_type(VideoCodecType video_codec_type);
     30  void set_min_pixels_per_frame(int min_pixels_per_frame);
     31  void set_single_active_stream_pixels(
     32      std::optional<int> single_active_stream_pixels);
     33 
     34  bool has_input() const;
     35  std::optional<int> frame_size_pixels() const;
     36  int frames_per_second() const;
     37  VideoCodecType video_codec_type() const;
     38  int min_pixels_per_frame() const;
     39  std::optional<int> single_active_stream_pixels() const;
     40 
     41  bool HasInputFrameSizeAndFramesPerSecond() const;
     42 
     43 private:
     44  bool has_input_;
     45  std::optional<int> frame_size_pixels_;
     46  int frames_per_second_;
     47  VideoCodecType video_codec_type_;
     48  int min_pixels_per_frame_;
     49  std::optional<int> single_active_stream_pixels_;
     50 };
     51 
     52 }  // namespace webrtc
     53 
     54 #endif  // CALL_ADAPTATION_VIDEO_STREAM_INPUT_STATE_H_