Report errors from ChromiumEnv::GetChildren in Posix.
[chromium-blink-merge.git] / media / cast / rtcp / rtcp_defines.h
blobf0635f8ca8f047d000d838e92c8cd880e6f4f7c9
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_
8 #include <list>
9 #include <map>
10 #include <set>
12 #include "media/cast/cast_config.h"
13 #include "media/cast/cast_defines.h"
15 namespace media {
16 namespace cast {
18 class RtcpCastMessage {
19 public:
20 explicit RtcpCastMessage(uint32 media_ssrc);
21 ~RtcpCastMessage();
23 uint32 media_ssrc_;
24 uint8 ack_frame_id_;
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.
31 uint32 ntp_seconds;
32 uint32 ntp_fraction;
33 uint32 rtp_timestamp;
34 uint32 send_packet_count;
35 uint32 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.
41 uint8 fraction_lost;
42 uint32 cumulative_lost; // 24 bits valid.
43 uint32 extended_high_sequence_number;
44 uint32 jitter;
45 uint32 last_sr;
46 uint32 delay_since_last_sr;
49 struct RtcpRpsiMessage {
50 uint32 remote_ssrc;
51 uint8 payload_type;
52 uint64 picture_id;
55 class RtcpNackMessage {
56 public:
57 RtcpNackMessage();
58 ~RtcpNackMessage();
60 uint32 remote_ssrc;
61 std::list<uint16> nack_list;
64 class RtcpRembMessage {
65 public:
66 RtcpRembMessage();
67 ~RtcpRembMessage();
69 uint32 remb_bitrate;
70 std::list<uint32> remb_ssrcs;
73 struct RtcpReceiverReferenceTimeReport {
74 uint32 remote_ssrc;
75 uint32 ntp_seconds;
76 uint32 ntp_fraction;
79 struct RtcpDlrrReportBlock {
80 uint32 last_rr;
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;
110 } // namespace cast
111 } // namespace media
113 #endif // MEDIA_CAST_RTCP_RTCP_DEFINES_H_