chromium/third_party/openscreen/src/cast/streaming/public/offer_messages.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/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) {}

// For a hex byte, the conversion is 4 bits to 1 character, e.g.
// 0b11110001 becomes F1, so 1 byte is two characters.
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) {}

}  // namespace

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 {}

// static
Error Offer::TryParse(const Json::Value& root, Offer* out) {}

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

bool Offer::IsValid() const {}
}  // namespace openscreen::cast