#include "call/adaptation/video_source_restrictions.h"
#include <algorithm>
#include <limits>
#include "rtc_base/checks.h"
#include "rtc_base/strings/string_builder.h"
namespace webrtc {
VideoSourceRestrictions::VideoSourceRestrictions()
: … { … }
VideoSourceRestrictions::VideoSourceRestrictions(
absl::optional<size_t> max_pixels_per_frame,
absl::optional<size_t> target_pixels_per_frame,
absl::optional<double> max_frame_rate)
: … { … }
std::string VideoSourceRestrictions::ToString() const { … }
const absl::optional<size_t>& VideoSourceRestrictions::max_pixels_per_frame()
const { … }
const absl::optional<size_t>& VideoSourceRestrictions::target_pixels_per_frame()
const { … }
const absl::optional<double>& VideoSourceRestrictions::max_frame_rate() const { … }
void VideoSourceRestrictions::set_max_pixels_per_frame(
absl::optional<size_t> max_pixels_per_frame) { … }
void VideoSourceRestrictions::set_target_pixels_per_frame(
absl::optional<size_t> target_pixels_per_frame) { … }
void VideoSourceRestrictions::set_max_frame_rate(
absl::optional<double> max_frame_rate) { … }
void VideoSourceRestrictions::UpdateMin(const VideoSourceRestrictions& other) { … }
bool DidRestrictionsIncrease(VideoSourceRestrictions before,
VideoSourceRestrictions after) { … }
bool DidRestrictionsDecrease(VideoSourceRestrictions before,
VideoSourceRestrictions after) { … }
bool DidIncreaseResolution(VideoSourceRestrictions restrictions_before,
VideoSourceRestrictions restrictions_after) { … }
bool DidDecreaseResolution(VideoSourceRestrictions restrictions_before,
VideoSourceRestrictions restrictions_after) { … }
bool DidIncreaseFrameRate(VideoSourceRestrictions restrictions_before,
VideoSourceRestrictions restrictions_after) { … }
bool DidDecreaseFrameRate(VideoSourceRestrictions restrictions_before,
VideoSourceRestrictions restrictions_after) { … }
}