OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_CAST_NET_RTCP_RTCP_DEFINES_H_ | 5 #ifndef MEDIA_CAST_NET_RTCP_RTCP_DEFINES_H_ |
6 #define MEDIA_CAST_NET_RTCP_RTCP_DEFINES_H_ | 6 #define MEDIA_CAST_NET_RTCP_RTCP_DEFINES_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 30 matching lines...) Expand all Loading... | |
41 kPacketTypeXr = 207, | 41 kPacketTypeXr = 207, |
42 kPacketTypeHigh = 210, // Port Mapping. | 42 kPacketTypeHigh = 210, // Port Mapping. |
43 }; | 43 }; |
44 | 44 |
45 // Handle the per frame ACK and NACK messages. | 45 // Handle the per frame ACK and NACK messages. |
46 struct RtcpCastMessage { | 46 struct RtcpCastMessage { |
47 explicit RtcpCastMessage(uint32_t ssrc); | 47 explicit RtcpCastMessage(uint32_t ssrc); |
48 RtcpCastMessage(); | 48 RtcpCastMessage(); |
49 ~RtcpCastMessage(); | 49 ~RtcpCastMessage(); |
50 | 50 |
51 uint32_t media_ssrc; | 51 uint32_t remote_ssrc; |
52 uint32_t ack_frame_id; | 52 uint32_t ack_frame_id; |
53 uint16_t target_delay_ms; | 53 uint16_t target_delay_ms; |
54 MissingFramesAndPacketsMap missing_frames_and_packets; | 54 MissingFramesAndPacketsMap missing_frames_and_packets; |
55 // This wrap-around counter is incremented by one for each ACK/NACK Cast | 55 // This wrap-around counter is incremented by one for each ACK/NACK Cast |
56 // packet sent. | 56 // packet sent. |
57 uint8_t feedback_count; | 57 uint8_t feedback_count; |
58 // The set of received frames that have frame IDs strictly equal to or larger | 58 // The set of received frames that have frame IDs strictly equal to or larger |
59 // than |ack_frame_id + 2|. | 59 // than |ack_frame_id + 2|. |
60 std::vector<uint32_t> received_later_frames; | 60 std::vector<uint32_t> received_later_frames; |
61 }; | 61 }; |
62 | 62 |
63 struct RtcpPliMessage { | |
64 explicit RtcpPliMessage(uint32_t ssrc); | |
65 RtcpPliMessage(); | |
dcheng
2016/03/01 23:44:13
Is the default ctor necessary?
xjz
2016/03/02 04:24:17
Removed.
xjz
2016/03/16 00:25:50
Re-add the default ctor as it is needed by IPC_MES
| |
66 ~RtcpPliMessage(); | |
dcheng
2016/03/01 23:44:12
Don't need an explicit dtor: this is a trivial cla
xjz
2016/03/02 04:24:17
Done. Removed.
| |
67 | |
68 uint32_t remote_ssrc; | |
69 }; | |
70 | |
63 // Log messages from receiver to sender. | 71 // Log messages from receiver to sender. |
64 struct RtcpReceiverEventLogMessage { | 72 struct RtcpReceiverEventLogMessage { |
65 RtcpReceiverEventLogMessage(); | 73 RtcpReceiverEventLogMessage(); |
66 ~RtcpReceiverEventLogMessage(); | 74 ~RtcpReceiverEventLogMessage(); |
67 | 75 |
68 CastLoggingEvent type; | 76 CastLoggingEvent type; |
69 base::TimeTicks event_timestamp; | 77 base::TimeTicks event_timestamp; |
70 base::TimeDelta delay_delta; | 78 base::TimeDelta delay_delta; |
71 uint16_t packet_id; | 79 uint16_t packet_id; |
72 }; | 80 }; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
116 base::TimeDelta delay_delta; | 124 base::TimeDelta delay_delta; |
117 | 125 |
118 // Only set for packet events. | 126 // Only set for packet events. |
119 uint16_t packet_id; | 127 uint16_t packet_id; |
120 }; | 128 }; |
121 | 129 |
122 typedef base::Callback<void(const RtcpCastMessage&)> RtcpCastMessageCallback; | 130 typedef base::Callback<void(const RtcpCastMessage&)> RtcpCastMessageCallback; |
123 typedef base::Callback<void(base::TimeDelta)> RtcpRttCallback; | 131 typedef base::Callback<void(base::TimeDelta)> RtcpRttCallback; |
124 typedef | 132 typedef |
125 base::Callback<void(const RtcpReceiverLogMessage&)> RtcpLogMessageCallback; | 133 base::Callback<void(const RtcpReceiverLogMessage&)> RtcpLogMessageCallback; |
134 typedef base::Callback<void()> RtcpPliCallback; | |
126 | 135 |
127 // TODO(hubbe): Document members of this struct. | 136 // TODO(hubbe): Document members of this struct. |
128 struct RtpReceiverStatistics { | 137 struct RtpReceiverStatistics { |
129 RtpReceiverStatistics(); | 138 RtpReceiverStatistics(); |
130 uint8_t fraction_lost; | 139 uint8_t fraction_lost; |
131 uint32_t cumulative_lost; // 24 bits valid. | 140 uint32_t cumulative_lost; // 24 bits valid. |
132 uint32_t extended_high_sequence_number; | 141 uint32_t extended_high_sequence_number; |
133 uint32_t jitter; | 142 uint32_t jitter; |
134 }; | 143 }; |
135 | 144 |
136 // Created on a RTP receiver to be passed over IPC. | 145 // Created on a RTP receiver to be passed over IPC. |
137 struct RtcpTimeData { | 146 struct RtcpTimeData { |
138 uint32_t ntp_seconds; | 147 uint32_t ntp_seconds; |
139 uint32_t ntp_fraction; | 148 uint32_t ntp_fraction; |
140 base::TimeTicks timestamp; | 149 base::TimeTicks timestamp; |
141 }; | 150 }; |
142 | 151 |
143 // This struct is used to encapsulate all the parameters of the | 152 // This struct is used to encapsulate all the parameters of the |
144 // SendRtcpFromRtpReceiver for IPC transportation. | 153 // SendRtcpFromRtpReceiver for IPC transportation. |
145 struct SendRtcpFromRtpReceiver_Params { | 154 struct SendRtcpFromRtpReceiver_Params { |
146 SendRtcpFromRtpReceiver_Params(); | 155 SendRtcpFromRtpReceiver_Params(); |
147 ~SendRtcpFromRtpReceiver_Params(); | 156 ~SendRtcpFromRtpReceiver_Params(); |
148 uint32_t ssrc; | 157 uint32_t ssrc; |
149 uint32_t sender_ssrc; | 158 uint32_t sender_ssrc; |
150 RtcpTimeData time_data; | 159 RtcpTimeData time_data; |
151 scoped_ptr<RtcpCastMessage> cast_message; | 160 scoped_ptr<RtcpCastMessage> cast_message; |
161 scoped_ptr<RtcpPliMessage> pli_message; | |
152 base::TimeDelta target_delay; | 162 base::TimeDelta target_delay; |
153 scoped_ptr<std::vector<std::pair<RtpTimeTicks, RtcpEvent>>> rtcp_events; | 163 scoped_ptr<std::vector<std::pair<RtpTimeTicks, RtcpEvent>>> rtcp_events; |
154 scoped_ptr<RtpReceiverStatistics> rtp_receiver_statistics; | 164 scoped_ptr<RtpReceiverStatistics> rtp_receiver_statistics; |
155 }; | 165 }; |
156 | 166 |
157 | 167 |
158 } // namespace cast | 168 } // namespace cast |
159 } // namespace media | 169 } // namespace media |
160 | 170 |
161 #endif // MEDIA_CAST_NET_RTCP_RTCP_DEFINES_H_ | 171 #endif // MEDIA_CAST_NET_RTCP_RTCP_DEFINES_H_ |
OLD | NEW |