OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 void ModuleRtpRtcpImpl::RegisterVideoSendPayload(int payload_type, | 252 void ModuleRtpRtcpImpl::RegisterVideoSendPayload(int payload_type, |
253 const char* payload_name) { | 253 const char* payload_name) { |
254 RTC_CHECK_EQ( | 254 RTC_CHECK_EQ( |
255 0, rtp_sender_.RegisterPayload(payload_name, payload_type, 90000, 0, 0)); | 255 0, rtp_sender_.RegisterPayload(payload_name, payload_type, 90000, 0, 0)); |
256 } | 256 } |
257 | 257 |
258 int32_t ModuleRtpRtcpImpl::DeRegisterSendPayload(const int8_t payload_type) { | 258 int32_t ModuleRtpRtcpImpl::DeRegisterSendPayload(const int8_t payload_type) { |
259 return rtp_sender_.DeRegisterSendPayload(payload_type); | 259 return rtp_sender_.DeRegisterSendPayload(payload_type); |
260 } | 260 } |
261 | 261 |
262 int8_t ModuleRtpRtcpImpl::SendPayloadType() const { | |
263 return rtp_sender_.SendPayloadType(); | |
264 } | |
265 | |
266 uint32_t ModuleRtpRtcpImpl::StartTimestamp() const { | 262 uint32_t ModuleRtpRtcpImpl::StartTimestamp() const { |
267 return rtp_sender_.TimestampOffset(); | 263 return rtp_sender_.TimestampOffset(); |
268 } | 264 } |
269 | 265 |
270 // Configure start timestamp, default is a random number. | 266 // Configure start timestamp, default is a random number. |
271 void ModuleRtpRtcpImpl::SetStartTimestamp(const uint32_t timestamp) { | 267 void ModuleRtpRtcpImpl::SetStartTimestamp(const uint32_t timestamp) { |
272 rtcp_sender_.SetTimestampOffset(timestamp); | 268 rtcp_sender_.SetTimestampOffset(timestamp); |
273 rtp_sender_.SetTimestampOffset(timestamp); | 269 rtp_sender_.SetTimestampOffset(timestamp); |
274 } | 270 } |
275 | 271 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 } | 311 } |
316 | 312 |
317 // TODO(pbos): Handle media and RTX streams separately (separate RTCP | 313 // TODO(pbos): Handle media and RTX streams separately (separate RTCP |
318 // feedbacks). | 314 // feedbacks). |
319 RTCPSender::FeedbackState ModuleRtpRtcpImpl::GetFeedbackState() { | 315 RTCPSender::FeedbackState ModuleRtpRtcpImpl::GetFeedbackState() { |
320 StreamDataCounters rtp_stats; | 316 StreamDataCounters rtp_stats; |
321 StreamDataCounters rtx_stats; | 317 StreamDataCounters rtx_stats; |
322 rtp_sender_.GetDataCounters(&rtp_stats, &rtx_stats); | 318 rtp_sender_.GetDataCounters(&rtp_stats, &rtx_stats); |
323 | 319 |
324 RTCPSender::FeedbackState state; | 320 RTCPSender::FeedbackState state; |
325 state.send_payload_type = SendPayloadType(); | 321 state.send_payload_type = rtp_sender_.SendPayloadType(); |
326 state.packets_sent = rtp_stats.transmitted.packets + | 322 state.packets_sent = rtp_stats.transmitted.packets + |
327 rtx_stats.transmitted.packets; | 323 rtx_stats.transmitted.packets; |
328 state.media_bytes_sent = rtp_stats.transmitted.payload_bytes + | 324 state.media_bytes_sent = rtp_stats.transmitted.payload_bytes + |
329 rtx_stats.transmitted.payload_bytes; | 325 rtx_stats.transmitted.payload_bytes; |
330 state.module = this; | 326 state.module = this; |
331 | 327 |
332 LastReceivedNTP(&state.last_rr_ntp_secs, | 328 LastReceivedNTP(&state.last_rr_ntp_secs, |
333 &state.last_rr_ntp_frac, | 329 &state.last_rr_ntp_frac, |
334 &state.remote_sr); | 330 &state.remote_sr); |
335 | 331 |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
878 StreamDataCountersCallback* | 874 StreamDataCountersCallback* |
879 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { | 875 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { |
880 return rtp_sender_.GetRtpStatisticsCallback(); | 876 return rtp_sender_.GetRtpStatisticsCallback(); |
881 } | 877 } |
882 | 878 |
883 void ModuleRtpRtcpImpl::SetVideoBitrateAllocation( | 879 void ModuleRtpRtcpImpl::SetVideoBitrateAllocation( |
884 const BitrateAllocation& bitrate) { | 880 const BitrateAllocation& bitrate) { |
885 rtcp_sender_.SetVideoBitrateAllocation(bitrate); | 881 rtcp_sender_.SetVideoBitrateAllocation(bitrate); |
886 } | 882 } |
887 } // namespace webrtc | 883 } // namespace webrtc |
OLD | NEW |