fake_adaptation_constraint.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. #ifndef CALL_ADAPTATION_TEST_FAKE_ADAPTATION_CONSTRAINT_H_
  11. #define CALL_ADAPTATION_TEST_FAKE_ADAPTATION_CONSTRAINT_H_
  12. #include <string>
  13. #include "call/adaptation/adaptation_constraint.h"
  14. namespace webrtc {
  15. class FakeAdaptationConstraint : public AdaptationConstraint {
  16. public:
  17. explicit FakeAdaptationConstraint(std::string name);
  18. ~FakeAdaptationConstraint() override;
  19. void set_is_adaptation_up_allowed(bool is_adaptation_up_allowed);
  20. // AdaptationConstraint implementation.
  21. std::string Name() const override;
  22. bool IsAdaptationUpAllowed(
  23. const VideoStreamInputState& input_state,
  24. const VideoSourceRestrictions& restrictions_before,
  25. const VideoSourceRestrictions& restrictions_after) const override;
  26. private:
  27. const std::string name_;
  28. bool is_adaptation_up_allowed_;
  29. };
  30. } // namespace webrtc
  31. #endif // CALL_ADAPTATION_TEST_FAKE_ADAPTATION_CONSTRAINT_H_