xref: /aosp_15_r20/external/webrtc/call/adaptation/test/fake_video_stream_input_state_provider.cc (revision d9f758449e529ab9291ac668be2861e7a55c2422)
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 #include "call/adaptation/test/fake_video_stream_input_state_provider.h"
12 
13 namespace webrtc {
14 
FakeVideoStreamInputStateProvider()15 FakeVideoStreamInputStateProvider::FakeVideoStreamInputStateProvider()
16     : VideoStreamInputStateProvider(nullptr) {}
17 
18 FakeVideoStreamInputStateProvider::~FakeVideoStreamInputStateProvider() =
19     default;
20 
SetInputState(int input_pixels,int input_fps,int min_pixels_per_frame)21 void FakeVideoStreamInputStateProvider::SetInputState(
22     int input_pixels,
23     int input_fps,
24     int min_pixels_per_frame) {
25   fake_input_state_.set_has_input(true);
26   fake_input_state_.set_frame_size_pixels(input_pixels);
27   fake_input_state_.set_frames_per_second(input_fps);
28   fake_input_state_.set_min_pixels_per_frame(min_pixels_per_frame);
29 }
30 
InputState()31 VideoStreamInputState FakeVideoStreamInputStateProvider::InputState() {
32   return fake_input_state_;
33 }
34 
35 }  // namespace webrtc
36