// 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. #ifndef CAST_STREAMING_PUBLIC_ANSWER_MESSAGES_H_ #define CAST_STREAMING_PUBLIC_ANSWER_MESSAGES_H_ #include <array> #include <chrono> #include <cstdint> #include <initializer_list> #include <memory> #include <optional> #include <string> #include <utility> #include <vector> #include "cast/streaming/resolution.h" #include "cast/streaming/ssrc.h" #include "json/value.h" #include "platform/base/error.h" #include "util/simple_fraction.h" namespace openscreen::cast { // For each of the below classes, though a number of methods are shared, the use // of a shared base class has intentionally been avoided. This is to improve // readability of the structs provided in this file by cutting down on the // amount of obscuring boilerplate code. For each of the following struct // definitions, the following method definitions are shared: // (1) TryParse. Shall return a boolean indicating whether the out // parameter is in a valid state after checking bounds and restrictions. // (2) ToJson. Should return a proper JSON object. Assumes that IsValid() // has been called already, OSP_CHECKs if not IsValid(). // (3) IsValid. Used by both TryParse and ToJson to ensure that the // object is in a good state. struct AudioConstraints { … }; struct VideoConstraints { … }; struct Constraints { … }; // Decides whether the Sender scales and letterboxes content to 16:9, or if // it may send video frames of any arbitrary size and the Receiver must // handle the presentation details. enum class AspectRatioConstraint : uint8_t { … }; struct AspectRatio { … }; struct DisplayDescription { … }; struct Answer { … }; } // namespace openscreen::cast #endif // CAST_STREAMING_PUBLIC_ANSWER_MESSAGES_H_