• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
31   bool has_input() const;
32   absl::optional<int> frame_size_pixels() const;
33   int frames_per_second() const;
34   VideoCodecType video_codec_type() const;
35   int min_pixels_per_frame() const;
36 
37   bool HasInputFrameSizeAndFramesPerSecond() const;
38 
39  private:
40   bool has_input_;
41   absl::optional<int> frame_size_pixels_;
42   int frames_per_second_;
43   VideoCodecType video_codec_type_;
44   int min_pixels_per_frame_;
45 };
46 
47 }  // namespace webrtc
48 
49 #endif  // CALL_ADAPTATION_VIDEO_STREAM_INPUT_STATE_H_
50