1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MEDIA_CAST_RTCP_RTCP_DEFINES_H_
6 #define MEDIA_CAST_RTCP_RTCP_DEFINES_H_
12 #include "media/cast/cast_config.h"
13 #include "media/cast/cast_defines.h"
18 class RtcpCastMessage {
20 explicit RtcpCastMessage(uint32 media_ssrc);
25 MissingFramesAndPacketsMap missing_frames_and_packets_;
28 struct RtcpSenderInfo {
29 // First three members are used for lipsync.
30 // First two members are used for rtt.
34 uint32 send_packet_count;
35 size_t send_octet_count;
38 struct RtcpReportBlock {
39 uint32 remote_ssrc; // SSRC of sender of this report.
40 uint32 media_ssrc; // SSRC of the RTP packet sender.
42 uint32 cumulative_lost; // 24 bits valid.
43 uint32 extended_high_sequence_number;
46 uint32 delay_since_last_sr;
49 struct RtcpRpsiMessage {
55 class RtcpNackMessage {
61 std::list<uint16> nack_list;
64 class RtcpRembMessage {
70 std::list<uint32> remb_ssrcs;
73 struct RtcpReceiverReferenceTimeReport {
79 struct RtcpDlrrReportBlock {
81 uint32 delay_since_last_rr;
84 inline bool operator==(RtcpReportBlock lhs, RtcpReportBlock rhs) {
85 return lhs.remote_ssrc == rhs.remote_ssrc &&
86 lhs.media_ssrc == rhs.media_ssrc &&
87 lhs.fraction_lost == rhs.fraction_lost &&
88 lhs.cumulative_lost == rhs.cumulative_lost &&
89 lhs.extended_high_sequence_number == rhs.extended_high_sequence_number &&
90 lhs.jitter == rhs.jitter &&
91 lhs.last_sr == rhs.last_sr &&
92 lhs.delay_since_last_sr == rhs.delay_since_last_sr;
95 inline bool operator==(RtcpSenderInfo lhs, RtcpSenderInfo rhs) {
96 return lhs.ntp_seconds == rhs.ntp_seconds &&
97 lhs.ntp_fraction == rhs.ntp_fraction &&
98 lhs.rtp_timestamp == rhs.rtp_timestamp &&
99 lhs.send_packet_count == rhs.send_packet_count &&
100 lhs.send_octet_count == rhs.send_octet_count;
103 inline bool operator==(RtcpReceiverReferenceTimeReport lhs,
104 RtcpReceiverReferenceTimeReport rhs) {
105 return lhs.remote_ssrc == rhs.remote_ssrc &&
106 lhs.ntp_seconds == rhs.ntp_seconds &&
107 lhs.ntp_fraction == rhs.ntp_fraction;
113 #endif // MEDIA_CAST_RTCP_RTCP_DEFINES_H_