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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 bandwidth_observer_.get(), | 128 bandwidth_observer_.get(), |
129 transport_feedback_observer_, | 129 transport_feedback_observer_, |
130 rtt_stats_, | 130 rtt_stats_, |
131 &rtcp_packet_type_counter_observer_, | 131 &rtcp_packet_type_counter_observer_, |
132 remote_bitrate_estimator, | 132 remote_bitrate_estimator, |
133 paced_sender_, | 133 paced_sender_, |
134 packet_router_, | 134 packet_router_, |
135 &send_bitrate_observer_, | 135 &send_bitrate_observer_, |
136 &send_frame_count_observer_, | 136 &send_frame_count_observer_, |
137 &send_side_delay_observer_, | 137 &send_side_delay_observer_, |
| 138 &send_packet_observer_, |
138 max_rtp_streams)), | 139 max_rtp_streams)), |
139 num_active_rtp_rtcp_modules_(1) { | 140 num_active_rtp_rtcp_modules_(1) { |
140 vie_receiver_.SetRtpRtcpModule(rtp_rtcp_modules_[0]); | 141 vie_receiver_.SetRtpRtcpModule(rtp_rtcp_modules_[0]); |
141 vcm_->SetNackSettings(kMaxNackListSize, max_nack_reordering_threshold_, 0); | 142 vcm_->SetNackSettings(kMaxNackListSize, max_nack_reordering_threshold_, 0); |
142 } | 143 } |
143 | 144 |
144 int32_t ViEChannel::Init() { | 145 int32_t ViEChannel::Init() { |
145 static const int kDefaultRenderDelayMs = 10; | 146 static const int kDefaultRenderDelayMs = 10; |
146 module_process_thread_->RegisterModule(vie_receiver_.GetReceiveStatistics()); | 147 module_process_thread_->RegisterModule(vie_receiver_.GetReceiveStatistics()); |
147 | 148 |
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
876 counter.Add(counter_map[vie_receiver_.GetRemoteSsrc()]); | 877 counter.Add(counter_map[vie_receiver_.GetRemoteSsrc()]); |
877 | 878 |
878 *packet_counter = counter; | 879 *packet_counter = counter; |
879 } | 880 } |
880 | 881 |
881 void ViEChannel::RegisterSendSideDelayObserver( | 882 void ViEChannel::RegisterSendSideDelayObserver( |
882 SendSideDelayObserver* observer) { | 883 SendSideDelayObserver* observer) { |
883 send_side_delay_observer_.Set(observer); | 884 send_side_delay_observer_.Set(observer); |
884 } | 885 } |
885 | 886 |
| 887 void ViEChannel::RegisterSendPacketObserver(SendPacketObserver* observer) { |
| 888 send_packet_observer_.Set(observer); |
| 889 } |
| 890 |
886 void ViEChannel::RegisterSendBitrateObserver( | 891 void ViEChannel::RegisterSendBitrateObserver( |
887 BitrateStatisticsObserver* observer) { | 892 BitrateStatisticsObserver* observer) { |
888 send_bitrate_observer_.Set(observer); | 893 send_bitrate_observer_.Set(observer); |
889 } | 894 } |
890 | 895 |
891 int32_t ViEChannel::StartSend() { | 896 int32_t ViEChannel::StartSend() { |
892 CriticalSectionScoped cs(crit_.get()); | 897 CriticalSectionScoped cs(crit_.get()); |
893 | 898 |
894 if (rtp_rtcp_modules_[0]->Sending()) | 899 if (rtp_rtcp_modules_[0]->Sending()) |
895 return -1; | 900 return -1; |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1096 RtcpBandwidthObserver* bandwidth_callback, | 1101 RtcpBandwidthObserver* bandwidth_callback, |
1097 TransportFeedbackObserver* transport_feedback_callback, | 1102 TransportFeedbackObserver* transport_feedback_callback, |
1098 RtcpRttStats* rtt_stats, | 1103 RtcpRttStats* rtt_stats, |
1099 RtcpPacketTypeCounterObserver* rtcp_packet_type_counter_observer, | 1104 RtcpPacketTypeCounterObserver* rtcp_packet_type_counter_observer, |
1100 RemoteBitrateEstimator* remote_bitrate_estimator, | 1105 RemoteBitrateEstimator* remote_bitrate_estimator, |
1101 RtpPacketSender* paced_sender, | 1106 RtpPacketSender* paced_sender, |
1102 TransportSequenceNumberAllocator* transport_sequence_number_allocator, | 1107 TransportSequenceNumberAllocator* transport_sequence_number_allocator, |
1103 BitrateStatisticsObserver* send_bitrate_observer, | 1108 BitrateStatisticsObserver* send_bitrate_observer, |
1104 FrameCountObserver* send_frame_count_observer, | 1109 FrameCountObserver* send_frame_count_observer, |
1105 SendSideDelayObserver* send_side_delay_observer, | 1110 SendSideDelayObserver* send_side_delay_observer, |
| 1111 SendPacketObserver* send_packet_observer, |
1106 size_t num_modules) { | 1112 size_t num_modules) { |
1107 RTC_DCHECK_GT(num_modules, 0u); | 1113 RTC_DCHECK_GT(num_modules, 0u); |
1108 RtpRtcp::Configuration configuration; | 1114 RtpRtcp::Configuration configuration; |
1109 ReceiveStatistics* null_receive_statistics = configuration.receive_statistics; | 1115 ReceiveStatistics* null_receive_statistics = configuration.receive_statistics; |
1110 configuration.audio = false; | 1116 configuration.audio = false; |
1111 configuration.receiver_only = receiver_only; | 1117 configuration.receiver_only = receiver_only; |
1112 configuration.receive_statistics = receive_statistics; | 1118 configuration.receive_statistics = receive_statistics; |
1113 configuration.outgoing_transport = outgoing_transport; | 1119 configuration.outgoing_transport = outgoing_transport; |
1114 configuration.intra_frame_callback = intra_frame_callback; | 1120 configuration.intra_frame_callback = intra_frame_callback; |
1115 configuration.rtt_stats = rtt_stats; | 1121 configuration.rtt_stats = rtt_stats; |
1116 configuration.rtcp_packet_type_counter_observer = | 1122 configuration.rtcp_packet_type_counter_observer = |
1117 rtcp_packet_type_counter_observer; | 1123 rtcp_packet_type_counter_observer; |
1118 configuration.paced_sender = paced_sender; | 1124 configuration.paced_sender = paced_sender; |
1119 configuration.transport_sequence_number_allocator = | 1125 configuration.transport_sequence_number_allocator = |
1120 transport_sequence_number_allocator; | 1126 transport_sequence_number_allocator; |
1121 configuration.send_bitrate_observer = send_bitrate_observer; | 1127 configuration.send_bitrate_observer = send_bitrate_observer; |
1122 configuration.send_frame_count_observer = send_frame_count_observer; | 1128 configuration.send_frame_count_observer = send_frame_count_observer; |
1123 configuration.send_side_delay_observer = send_side_delay_observer; | 1129 configuration.send_side_delay_observer = send_side_delay_observer; |
| 1130 configuration.send_packet_observer = send_packet_observer; |
1124 configuration.bandwidth_callback = bandwidth_callback; | 1131 configuration.bandwidth_callback = bandwidth_callback; |
1125 configuration.transport_feedback_callback = transport_feedback_callback; | 1132 configuration.transport_feedback_callback = transport_feedback_callback; |
1126 | 1133 |
1127 std::vector<RtpRtcp*> modules; | 1134 std::vector<RtpRtcp*> modules; |
1128 for (size_t i = 0; i < num_modules; ++i) { | 1135 for (size_t i = 0; i < num_modules; ++i) { |
1129 RtpRtcp* rtp_rtcp = RtpRtcp::CreateRtpRtcp(configuration); | 1136 RtpRtcp* rtp_rtcp = RtpRtcp::CreateRtpRtcp(configuration); |
1130 rtp_rtcp->SetSendingStatus(false); | 1137 rtp_rtcp->SetSendingStatus(false); |
1131 rtp_rtcp->SetSendingMediaStatus(false); | 1138 rtp_rtcp->SetSendingMediaStatus(false); |
1132 rtp_rtcp->SetRTCPStatus(RtcpMode::kCompound); | 1139 rtp_rtcp->SetRTCPStatus(RtcpMode::kCompound); |
1133 modules.push_back(rtp_rtcp); | 1140 modules.push_back(rtp_rtcp); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1207 CriticalSectionScoped cs(crit_.get()); | 1214 CriticalSectionScoped cs(crit_.get()); |
1208 receive_stats_callback_ = receive_statistics_proxy; | 1215 receive_stats_callback_ = receive_statistics_proxy; |
1209 } | 1216 } |
1210 | 1217 |
1211 void ViEChannel::SetIncomingVideoStream( | 1218 void ViEChannel::SetIncomingVideoStream( |
1212 IncomingVideoStream* incoming_video_stream) { | 1219 IncomingVideoStream* incoming_video_stream) { |
1213 CriticalSectionScoped cs(crit_.get()); | 1220 CriticalSectionScoped cs(crit_.get()); |
1214 incoming_video_stream_ = incoming_video_stream; | 1221 incoming_video_stream_ = incoming_video_stream; |
1215 } | 1222 } |
1216 } // namespace webrtc | 1223 } // namespace webrtc |
OLD | NEW |