#include "cast/streaming/impl/compound_rtcp_parser.h"
#include <algorithm>
#include <utility>
#include "cast/streaming/impl/packet_util.h"
#include "cast/streaming/impl/rtcp_session.h"
#include "util/chrono_helpers.h"
#include "util/osp_logging.h"
#include "util/std_util.h"
namespace openscreen::cast {
namespace {
constexpr auto kNullTimePoint = …;
constexpr uint32_t kCastName = …;
constexpr uint32_t kTimeSyncRequestName = …;
void CanonicalizePacketNackVector(std::vector<PacketNack>* packets) { … }
StatisticsEventType ToEventTypeFromWire(uint8_t wire_event) { … }
}
CompoundRtcpParser::CompoundRtcpParser(RtcpSession& session,
CompoundRtcpParser::Client& client)
: … { … }
CompoundRtcpParser::~CompoundRtcpParser() = default;
bool CompoundRtcpParser::Parse(ByteView buffer, FrameId max_feedback_frame_id) { … }
bool CompoundRtcpParser::ParseReceiverReport(
ByteView in,
int num_report_blocks,
std::optional<RtcpReportBlock>& receiver_report) { … }
bool CompoundRtcpParser::ParseApplicationDefined(
RtcpSubtype subtype,
ByteView in,
std::vector<RtcpReceiverFrameLogMessage>& messages) { … }
bool CompoundRtcpParser::ParseFrameLogMessages(
ByteView in,
std::vector<RtcpReceiverFrameLogMessage>& messages) { … }
bool CompoundRtcpParser::ParseFeedback(ByteView in,
FrameId max_feedback_frame_id,
FrameId* checkpoint_frame_id,
milliseconds* target_playout_delay,
std::vector<FrameId>* received_frames,
std::vector<PacketNack>& packet_nacks) { … }
bool CompoundRtcpParser::ParseExtendedReports(
ByteView in,
Clock::time_point& receiver_reference_time) { … }
bool CompoundRtcpParser::ParsePictureLossIndicator(
ByteView in,
bool& picture_loss_indicator) { … }
CompoundRtcpParser::Client::Client() = default;
CompoundRtcpParser::Client::~Client() = default;
void CompoundRtcpParser::Client::OnReceiverReferenceTimeAdvanced(
Clock::time_point reference_time) { … }
void CompoundRtcpParser::Client::OnReceiverReport(
const RtcpReportBlock& receiver_report) { … }
void CompoundRtcpParser::Client::OnCastReceiverFrameLogMessages(
std::vector<RtcpReceiverFrameLogMessage> messages) { … }
void CompoundRtcpParser::Client::OnReceiverIndicatesPictureLoss() { … }
void CompoundRtcpParser::Client::OnReceiverCheckpoint(
FrameId frame_id,
milliseconds playout_delay) { … }
void CompoundRtcpParser::Client::OnReceiverHasFrames(
std::vector<FrameId> acks) { … }
void CompoundRtcpParser::Client::OnReceiverIsMissingPackets(
std::vector<PacketNack> nacks) { … }
}