#include "cast/streaming/public/offer_messages.h"
#include <inttypes.h>
#include <algorithm>
#include <limits>
#include <string>
#include <string_view>
#include <utility>
#include "absl/strings/str_split.h"
#include "cast/streaming/public/constants.h"
#include "platform/base/error.h"
#include "util/big_endian.h"
#include "util/enum_name_table.h"
#include "util/json/json_helpers.h"
#include "util/json/json_serialization.h"
#include "util/osp_logging.h"
#include "util/string_util.h"
#include "util/stringprintf.h"
namespace openscreen::cast {
namespace {
constexpr char kSupportedStreams[] = …;
constexpr char kAudioSourceType[] = …;
constexpr char kVideoSourceType[] = …;
constexpr char kStreamType[] = …;
bool CodecParameterIsValid(VideoCodec codec,
const std::string& codec_parameter) { … }
bool CodecParameterIsValid(AudioCodec codec,
const std::string& codec_parameter) { … }
EnumNameTable<CastMode, 2> kCastModeNames{ … };
bool TryParseRtpPayloadType(const Json::Value& value, RtpPayloadType* out) { … }
bool TryParseRtpTimebase(const Json::Value& value, int* out) { … }
constexpr int kHexDigitsPerByte = …;
constexpr int kAesBytesSize = …;
constexpr int kAesStringLength = …;
bool TryParseAesHexBytes(const Json::Value& value,
std::array<uint8_t, kAesBytesSize>* out) { … }
std::string_view ToString(Stream::Type type) { … }
bool TryParseResolutions(const Json::Value& value,
std::vector<Resolution>* out) { … }
}
Error Stream::TryParse(const Json::Value& value,
Stream::Type type,
Stream* out) { … }
Json::Value Stream::ToJson() const { … }
bool Stream::IsValid() const { … }
Error AudioStream::TryParse(const Json::Value& value, AudioStream* out) { … }
Json::Value AudioStream::ToJson() const { … }
bool AudioStream::IsValid() const { … }
Error VideoStream::TryParse(const Json::Value& value, VideoStream* out) { … }
Json::Value VideoStream::ToJson() const { … }
bool VideoStream::IsValid() const { … }
Error Offer::TryParse(const Json::Value& root, Offer* out) { … }
Json::Value Offer::ToJson() const { … }
bool Offer::IsValid() const { … }
}