• 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 #include "call/adaptation/test/fake_adaptation_constraint.h"
12 
13 #include <utility>
14 
15 namespace webrtc {
16 
FakeAdaptationConstraint(std::string name)17 FakeAdaptationConstraint::FakeAdaptationConstraint(std::string name)
18     : name_(std::move(name)), is_adaptation_up_allowed_(true) {}
19 
~FakeAdaptationConstraint()20 FakeAdaptationConstraint::~FakeAdaptationConstraint() {}
21 
set_is_adaptation_up_allowed(bool is_adaptation_up_allowed)22 void FakeAdaptationConstraint::set_is_adaptation_up_allowed(
23     bool is_adaptation_up_allowed) {
24   is_adaptation_up_allowed_ = is_adaptation_up_allowed;
25 }
26 
Name() const27 std::string FakeAdaptationConstraint::Name() const {
28   return name_;
29 }
30 
IsAdaptationUpAllowed(const VideoStreamInputState & input_state,const VideoSourceRestrictions & restrictions_before,const VideoSourceRestrictions & restrictions_after,rtc::scoped_refptr<Resource> reason_resource) const31 bool FakeAdaptationConstraint::IsAdaptationUpAllowed(
32     const VideoStreamInputState& input_state,
33     const VideoSourceRestrictions& restrictions_before,
34     const VideoSourceRestrictions& restrictions_after,
35     rtc::scoped_refptr<Resource> reason_resource) const {
36   return is_adaptation_up_allowed_;
37 }
38 
39 }  // namespace webrtc
40