| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 // Time of event logged. | 119 // Time of event logged. |
| 120 base::TimeTicks timestamp; | 120 base::TimeTicks timestamp; |
| 121 | 121 |
| 122 // Render/playout delay. Only set for FRAME_PLAYOUT events. | 122 // Render/playout delay. Only set for FRAME_PLAYOUT events. |
| 123 base::TimeDelta delay_delta; | 123 base::TimeDelta delay_delta; |
| 124 | 124 |
| 125 // Only set for packet events. | 125 // Only set for packet events. |
| 126 uint16_t packet_id; | 126 uint16_t packet_id; |
| 127 }; | 127 }; |
| 128 | 128 |
| 129 typedef base::Callback<void(const RtcpCastMessage&)> RtcpCastMessageCallback; | |
| 130 typedef base::Callback<void(base::TimeDelta)> RtcpRttCallback; | |
| 131 typedef | |
| 132 base::Callback<void(const RtcpReceiverLogMessage&)> RtcpLogMessageCallback; | |
| 133 typedef base::Callback<void()> RtcpPliCallback; | |
| 134 | |
| 135 // TODO(hubbe): Document members of this struct. | 129 // TODO(hubbe): Document members of this struct. |
| 136 struct RtpReceiverStatistics { | 130 struct RtpReceiverStatistics { |
| 137 RtpReceiverStatistics(); | 131 RtpReceiverStatistics(); |
| 138 uint8_t fraction_lost; | 132 uint8_t fraction_lost; |
| 139 uint32_t cumulative_lost; // 24 bits valid. | 133 uint32_t cumulative_lost; // 24 bits valid. |
| 140 uint32_t extended_high_sequence_number; | 134 uint32_t extended_high_sequence_number; |
| 141 uint32_t jitter; | 135 uint32_t jitter; |
| 142 }; | 136 }; |
| 143 | 137 |
| 144 // Created on a RTP receiver to be passed over IPC. | 138 // Created on a RTP receiver to be passed over IPC. |
| 145 struct RtcpTimeData { | 139 struct RtcpTimeData { |
| 146 uint32_t ntp_seconds; | 140 uint32_t ntp_seconds; |
| 147 uint32_t ntp_fraction; | 141 uint32_t ntp_fraction; |
| 148 base::TimeTicks timestamp; | 142 base::TimeTicks timestamp; |
| 149 }; | 143 }; |
| 150 | 144 |
| 151 // This struct is used to encapsulate all the parameters of the | 145 // This struct is used to encapsulate all the parameters of the |
| 152 // SendRtcpFromRtpReceiver for IPC transportation. | 146 // SendRtcpFromRtpReceiver for IPC transportation. |
| 153 struct SendRtcpFromRtpReceiver_Params { | 147 struct SendRtcpFromRtpReceiver_Params { |
| 154 SendRtcpFromRtpReceiver_Params(); | 148 SendRtcpFromRtpReceiver_Params(); |
| 155 ~SendRtcpFromRtpReceiver_Params(); | 149 ~SendRtcpFromRtpReceiver_Params(); |
| 156 uint32_t ssrc; | 150 uint32_t ssrc; |
| 157 uint32_t sender_ssrc; | 151 uint32_t sender_ssrc; |
| 158 RtcpTimeData time_data; | 152 RtcpTimeData time_data; |
| 159 scoped_ptr<RtcpCastMessage> cast_message; | 153 std::unique_ptr<RtcpCastMessage> cast_message; |
| 160 scoped_ptr<RtcpPliMessage> pli_message; | 154 std::unique_ptr<RtcpPliMessage> pli_message; |
| 161 base::TimeDelta target_delay; | 155 base::TimeDelta target_delay; |
| 162 scoped_ptr<std::vector<std::pair<RtpTimeTicks, RtcpEvent>>> rtcp_events; | 156 std::unique_ptr<std::vector<std::pair<RtpTimeTicks, RtcpEvent>>> rtcp_events; |
| 163 scoped_ptr<RtpReceiverStatistics> rtp_receiver_statistics; | 157 std::unique_ptr<RtpReceiverStatistics> rtp_receiver_statistics; |
| 164 }; | 158 }; |
| 165 | 159 |
| 166 | 160 |
| 167 } // namespace cast | 161 } // namespace cast |
| 168 } // namespace media | 162 } // namespace media |
| 169 | 163 |
| 170 #endif // MEDIA_CAST_NET_RTCP_RTCP_DEFINES_H_ | 164 #endif // MEDIA_CAST_NET_RTCP_RTCP_DEFINES_H_ |
| OLD | NEW |