OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 configuration.outgoing_transport = outgoing_transport; | 57 configuration.outgoing_transport = outgoing_transport; |
58 configuration.intra_frame_callback = intra_frame_callback; | 58 configuration.intra_frame_callback = intra_frame_callback; |
59 configuration.rtt_stats = rtt_stats; | 59 configuration.rtt_stats = rtt_stats; |
60 configuration.rtcp_packet_type_counter_observer = stats_proxy; | 60 configuration.rtcp_packet_type_counter_observer = stats_proxy; |
61 configuration.paced_sender = paced_sender; | 61 configuration.paced_sender = paced_sender; |
62 configuration.transport_sequence_number_allocator = | 62 configuration.transport_sequence_number_allocator = |
63 transport_sequence_number_allocator; | 63 transport_sequence_number_allocator; |
64 configuration.send_bitrate_observer = stats_proxy; | 64 configuration.send_bitrate_observer = stats_proxy; |
65 configuration.send_frame_count_observer = stats_proxy; | 65 configuration.send_frame_count_observer = stats_proxy; |
66 configuration.send_side_delay_observer = stats_proxy; | 66 configuration.send_side_delay_observer = stats_proxy; |
| 67 configuration.send_packet_observer = stats_proxy; |
67 configuration.bandwidth_callback = bandwidth_callback; | 68 configuration.bandwidth_callback = bandwidth_callback; |
68 configuration.transport_feedback_callback = transport_feedback_callback; | 69 configuration.transport_feedback_callback = transport_feedback_callback; |
69 | 70 |
70 std::vector<RtpRtcp*> modules; | 71 std::vector<RtpRtcp*> modules; |
71 for (size_t i = 0; i < num_modules; ++i) { | 72 for (size_t i = 0; i < num_modules; ++i) { |
72 RtpRtcp* rtp_rtcp = RtpRtcp::CreateRtpRtcp(configuration); | 73 RtpRtcp* rtp_rtcp = RtpRtcp::CreateRtpRtcp(configuration); |
73 rtp_rtcp->SetSendingStatus(false); | 74 rtp_rtcp->SetSendingStatus(false); |
74 rtp_rtcp->SetSendingMediaStatus(false); | 75 rtp_rtcp->SetSendingMediaStatus(false); |
75 rtp_rtcp->SetRTCPStatus(RtcpMode::kCompound); | 76 rtp_rtcp->SetRTCPStatus(RtcpMode::kCompound); |
76 modules.push_back(rtp_rtcp); | 77 modules.push_back(rtp_rtcp); |
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 int VideoSendStream::GetPaddingNeededBps() const { | 698 int VideoSendStream::GetPaddingNeededBps() const { |
698 return vie_encoder_.GetPaddingNeededBps(); | 699 return vie_encoder_.GetPaddingNeededBps(); |
699 } | 700 } |
700 | 701 |
701 void VideoSendStream::OnBitrateUpdated(uint32_t bitrate_bps, | 702 void VideoSendStream::OnBitrateUpdated(uint32_t bitrate_bps, |
702 uint8_t fraction_loss, | 703 uint8_t fraction_loss, |
703 int64_t rtt) { | 704 int64_t rtt) { |
704 vie_encoder_.OnBitrateUpdated(bitrate_bps, fraction_loss, rtt); | 705 vie_encoder_.OnBitrateUpdated(bitrate_bps, fraction_loss, rtt); |
705 } | 706 } |
706 | 707 |
| 708 bool VideoSendStream::OnSentPacket(int packet_id) { |
| 709 return stats_proxy_.OnSentPacket(packet_id); |
| 710 } |
| 711 |
707 int VideoSendStream::ProtectionRequest(const FecProtectionParams* delta_params, | 712 int VideoSendStream::ProtectionRequest(const FecProtectionParams* delta_params, |
708 const FecProtectionParams* key_params, | 713 const FecProtectionParams* key_params, |
709 uint32_t* sent_video_rate_bps, | 714 uint32_t* sent_video_rate_bps, |
710 uint32_t* sent_nack_rate_bps, | 715 uint32_t* sent_nack_rate_bps, |
711 uint32_t* sent_fec_rate_bps) { | 716 uint32_t* sent_fec_rate_bps) { |
712 *sent_video_rate_bps = 0; | 717 *sent_video_rate_bps = 0; |
713 *sent_nack_rate_bps = 0; | 718 *sent_nack_rate_bps = 0; |
714 *sent_fec_rate_bps = 0; | 719 *sent_fec_rate_bps = 0; |
715 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { | 720 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { |
716 uint32_t not_used = 0; | 721 uint32_t not_used = 0; |
717 uint32_t module_video_rate = 0; | 722 uint32_t module_video_rate = 0; |
718 uint32_t module_fec_rate = 0; | 723 uint32_t module_fec_rate = 0; |
719 uint32_t module_nack_rate = 0; | 724 uint32_t module_nack_rate = 0; |
720 rtp_rtcp->SetFecParameters(delta_params, key_params); | 725 rtp_rtcp->SetFecParameters(delta_params, key_params); |
721 rtp_rtcp->BitrateSent(¬_used, &module_video_rate, &module_fec_rate, | 726 rtp_rtcp->BitrateSent(¬_used, &module_video_rate, &module_fec_rate, |
722 &module_nack_rate); | 727 &module_nack_rate); |
723 *sent_video_rate_bps += module_video_rate; | 728 *sent_video_rate_bps += module_video_rate; |
724 *sent_nack_rate_bps += module_nack_rate; | 729 *sent_nack_rate_bps += module_nack_rate; |
725 *sent_fec_rate_bps += module_fec_rate; | 730 *sent_fec_rate_bps += module_fec_rate; |
726 } | 731 } |
727 return 0; | 732 return 0; |
728 } | 733 } |
729 | 734 |
730 } // namespace internal | 735 } // namespace internal |
731 } // namespace webrtc | 736 } // namespace webrtc |
OLD | NEW |