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