chromium/third_party/openscreen/src/cast/streaming/resolution.cc

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "cast/streaming/resolution.h"

#include <utility>

#include "absl/strings/str_split.h"
#include "cast/streaming/message_fields.h"
#include "platform/base/error.h"
#include "util/json/json_helpers.h"
#include "util/osp_logging.h"

namespace openscreen::cast {

namespace {

/// Dimension properties.
// Width in pixels.
static constexpr char kWidth[] =;

// Height in pixels.
static constexpr char kHeight[] =;

// Frame rate as a rational decimal number or fraction.
// E.g. 30 and "3000/1001" are both valid representations.
static constexpr char kFrameRate[] =;

// Choice of epsilon for double comparison allows for proper comparison
// for both aspect ratios and frame rates. For frame rates, it is based on the
// broadcast rate of 29.97fps, which is actually 29.976. For aspect ratios, it
// allows for a one-pixel difference at a 4K resolution, we want it to be
// relatively high to avoid false negative comparison results.
bool FrameRateEquals(double a, double b) {}

}  // namespace

bool Resolution::TryParse(const Json::Value& root, Resolution* out) {}

bool Resolution::IsValid() const {}

Json::Value Resolution::ToJson() const {}

bool Resolution::operator==(const Resolution& other) const {}

bool Resolution::operator!=(const Resolution& other) const {}

bool Resolution::IsSupersetOf(const Resolution& other) const {}

bool Dimensions::TryParse(const Json::Value& root, Dimensions* out) {}

bool Dimensions::IsValid() const {}

Json::Value Dimensions::ToJson() const {}

bool Dimensions::operator==(const Dimensions& other) const {}

bool Dimensions::operator!=(const Dimensions& other) const {}

bool Dimensions::IsSupersetOf(const Dimensions& other) const {}

}  // namespace openscreen::cast