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 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
863 counter.Add(counter_map[vie_receiver_.GetRemoteSsrc()]); | 864 counter.Add(counter_map[vie_receiver_.GetRemoteSsrc()]); |
864 | 865 |
865 *packet_counter = counter; | 866 *packet_counter = counter; |
866 } | 867 } |
867 | 868 |
868 void ViEChannel::RegisterSendSideDelayObserver( | 869 void ViEChannel::RegisterSendSideDelayObserver( |
869 SendSideDelayObserver* observer) { | 870 SendSideDelayObserver* observer) { |
870 send_side_delay_observer_.Set(observer); | 871 send_side_delay_observer_.Set(observer); |
871 } | 872 } |
872 | 873 |
| 874 void ViEChannel::RegisterSendPacketObserver(SendPacketObserver* observer) { |
| 875 send_packet_observer_.Set(observer); |
| 876 } |
| 877 |
873 void ViEChannel::RegisterSendBitrateObserver( | 878 void ViEChannel::RegisterSendBitrateObserver( |
874 BitrateStatisticsObserver* observer) { | 879 BitrateStatisticsObserver* observer) { |
875 send_bitrate_observer_.Set(observer); | 880 send_bitrate_observer_.Set(observer); |
876 } | 881 } |
877 | 882 |
878 int32_t ViEChannel::StartSend() { | 883 int32_t ViEChannel::StartSend() { |
879 CriticalSectionScoped cs(crit_.get()); | 884 CriticalSectionScoped cs(crit_.get()); |
880 | 885 |
881 if (rtp_rtcp_modules_[0]->Sending()) | 886 if (rtp_rtcp_modules_[0]->Sending()) |
882 return -1; | 887 return -1; |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1083 RtcpBandwidthObserver* bandwidth_callback, | 1088 RtcpBandwidthObserver* bandwidth_callback, |
1084 TransportFeedbackObserver* transport_feedback_callback, | 1089 TransportFeedbackObserver* transport_feedback_callback, |
1085 RtcpRttStats* rtt_stats, | 1090 RtcpRttStats* rtt_stats, |
1086 RtcpPacketTypeCounterObserver* rtcp_packet_type_counter_observer, | 1091 RtcpPacketTypeCounterObserver* rtcp_packet_type_counter_observer, |
1087 RemoteBitrateEstimator* remote_bitrate_estimator, | 1092 RemoteBitrateEstimator* remote_bitrate_estimator, |
1088 RtpPacketSender* paced_sender, | 1093 RtpPacketSender* paced_sender, |
1089 TransportSequenceNumberAllocator* transport_sequence_number_allocator, | 1094 TransportSequenceNumberAllocator* transport_sequence_number_allocator, |
1090 BitrateStatisticsObserver* send_bitrate_observer, | 1095 BitrateStatisticsObserver* send_bitrate_observer, |
1091 FrameCountObserver* send_frame_count_observer, | 1096 FrameCountObserver* send_frame_count_observer, |
1092 SendSideDelayObserver* send_side_delay_observer, | 1097 SendSideDelayObserver* send_side_delay_observer, |
| 1098 SendPacketObserver* send_packet_observer, |
1093 size_t num_modules) { | 1099 size_t num_modules) { |
1094 RTC_DCHECK_GT(num_modules, 0u); | 1100 RTC_DCHECK_GT(num_modules, 0u); |
1095 RtpRtcp::Configuration configuration; | 1101 RtpRtcp::Configuration configuration; |
1096 ReceiveStatistics* null_receive_statistics = configuration.receive_statistics; | 1102 ReceiveStatistics* null_receive_statistics = configuration.receive_statistics; |
1097 configuration.audio = false; | 1103 configuration.audio = false; |
1098 configuration.receiver_only = receiver_only; | 1104 configuration.receiver_only = receiver_only; |
1099 configuration.receive_statistics = receive_statistics; | 1105 configuration.receive_statistics = receive_statistics; |
1100 configuration.outgoing_transport = outgoing_transport; | 1106 configuration.outgoing_transport = outgoing_transport; |
1101 configuration.intra_frame_callback = intra_frame_callback; | 1107 configuration.intra_frame_callback = intra_frame_callback; |
1102 configuration.rtt_stats = rtt_stats; | 1108 configuration.rtt_stats = rtt_stats; |
1103 configuration.rtcp_packet_type_counter_observer = | 1109 configuration.rtcp_packet_type_counter_observer = |
1104 rtcp_packet_type_counter_observer; | 1110 rtcp_packet_type_counter_observer; |
1105 configuration.paced_sender = paced_sender; | 1111 configuration.paced_sender = paced_sender; |
1106 configuration.transport_sequence_number_allocator = | 1112 configuration.transport_sequence_number_allocator = |
1107 transport_sequence_number_allocator; | 1113 transport_sequence_number_allocator; |
1108 configuration.send_bitrate_observer = send_bitrate_observer; | 1114 configuration.send_bitrate_observer = send_bitrate_observer; |
1109 configuration.send_frame_count_observer = send_frame_count_observer; | 1115 configuration.send_frame_count_observer = send_frame_count_observer; |
1110 configuration.send_side_delay_observer = send_side_delay_observer; | 1116 configuration.send_side_delay_observer = send_side_delay_observer; |
| 1117 configuration.send_packet_observer = send_packet_observer; |
1111 configuration.bandwidth_callback = bandwidth_callback; | 1118 configuration.bandwidth_callback = bandwidth_callback; |
1112 configuration.transport_feedback_callback = transport_feedback_callback; | 1119 configuration.transport_feedback_callback = transport_feedback_callback; |
1113 | 1120 |
1114 std::vector<RtpRtcp*> modules; | 1121 std::vector<RtpRtcp*> modules; |
1115 for (size_t i = 0; i < num_modules; ++i) { | 1122 for (size_t i = 0; i < num_modules; ++i) { |
1116 RtpRtcp* rtp_rtcp = RtpRtcp::CreateRtpRtcp(configuration); | 1123 RtpRtcp* rtp_rtcp = RtpRtcp::CreateRtpRtcp(configuration); |
1117 rtp_rtcp->SetSendingStatus(false); | 1124 rtp_rtcp->SetSendingStatus(false); |
1118 rtp_rtcp->SetSendingMediaStatus(false); | 1125 rtp_rtcp->SetSendingMediaStatus(false); |
1119 rtp_rtcp->SetRTCPStatus(RtcpMode::kCompound); | 1126 rtp_rtcp->SetRTCPStatus(RtcpMode::kCompound); |
1120 modules.push_back(rtp_rtcp); | 1127 modules.push_back(rtp_rtcp); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1194 CriticalSectionScoped cs(crit_.get()); | 1201 CriticalSectionScoped cs(crit_.get()); |
1195 receive_stats_callback_ = receive_statistics_proxy; | 1202 receive_stats_callback_ = receive_statistics_proxy; |
1196 } | 1203 } |
1197 | 1204 |
1198 void ViEChannel::SetIncomingVideoStream( | 1205 void ViEChannel::SetIncomingVideoStream( |
1199 IncomingVideoStream* incoming_video_stream) { | 1206 IncomingVideoStream* incoming_video_stream) { |
1200 CriticalSectionScoped cs(crit_.get()); | 1207 CriticalSectionScoped cs(crit_.get()); |
1201 incoming_video_stream_ = incoming_video_stream; | 1208 incoming_video_stream_ = incoming_video_stream; |
1202 } | 1209 } |
1203 } // namespace webrtc | 1210 } // namespace webrtc |
OLD | NEW |