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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 bandwidth_observer_.get(), | 113 bandwidth_observer_.get(), |
114 transport_feedback_observer_, | 114 transport_feedback_observer_, |
115 rtt_stats_, | 115 rtt_stats_, |
116 &rtcp_packet_type_counter_observer_, | 116 &rtcp_packet_type_counter_observer_, |
117 remote_bitrate_estimator, | 117 remote_bitrate_estimator, |
118 paced_sender_, | 118 paced_sender_, |
119 packet_router_, | 119 packet_router_, |
120 &send_bitrate_observer_, | 120 &send_bitrate_observer_, |
121 &send_frame_count_observer_, | 121 &send_frame_count_observer_, |
122 &send_side_delay_observer_, | 122 &send_side_delay_observer_, |
| 123 &send_packet_observer_, |
123 max_rtp_streams)) { | 124 max_rtp_streams)) { |
124 vie_receiver_.Init(rtp_rtcp_modules_); | 125 vie_receiver_.Init(rtp_rtcp_modules_); |
125 if (sender_) { | 126 if (sender_) { |
126 RTC_DCHECK(send_payload_router_); | 127 RTC_DCHECK(send_payload_router_); |
127 RTC_DCHECK(!vcm_); | 128 RTC_DCHECK(!vcm_); |
128 } else { | 129 } else { |
129 RTC_DCHECK(!send_payload_router_); | 130 RTC_DCHECK(!send_payload_router_); |
130 RTC_DCHECK(vcm_); | 131 RTC_DCHECK(vcm_); |
131 vcm_->SetNackSettings(kMaxNackListSize, max_nack_reordering_threshold_, 0); | 132 vcm_->SetNackSettings(kMaxNackListSize, max_nack_reordering_threshold_, 0); |
132 } | 133 } |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 rtp_counters->Add(rtp_data); | 281 rtp_counters->Add(rtp_data); |
281 rtx_counters->Add(rtx_data); | 282 rtx_counters->Add(rtx_data); |
282 } | 283 } |
283 } | 284 } |
284 | 285 |
285 void ViEChannel::RegisterSendSideDelayObserver( | 286 void ViEChannel::RegisterSendSideDelayObserver( |
286 SendSideDelayObserver* observer) { | 287 SendSideDelayObserver* observer) { |
287 send_side_delay_observer_.Set(observer); | 288 send_side_delay_observer_.Set(observer); |
288 } | 289 } |
289 | 290 |
| 291 void ViEChannel::RegisterSendPacketObserver(SendPacketObserver* observer) { |
| 292 send_packet_observer_.Set(observer); |
| 293 } |
| 294 |
290 void ViEChannel::RegisterSendBitrateObserver( | 295 void ViEChannel::RegisterSendBitrateObserver( |
291 BitrateStatisticsObserver* observer) { | 296 BitrateStatisticsObserver* observer) { |
292 send_bitrate_observer_.Set(observer); | 297 send_bitrate_observer_.Set(observer); |
293 } | 298 } |
294 | 299 |
295 const std::vector<RtpRtcp*>& ViEChannel::rtp_rtcp() const { | 300 const std::vector<RtpRtcp*>& ViEChannel::rtp_rtcp() const { |
296 return rtp_rtcp_modules_; | 301 return rtp_rtcp_modules_; |
297 } | 302 } |
298 | 303 |
299 ViEReceiver* ViEChannel::vie_receiver() { | 304 ViEReceiver* ViEChannel::vie_receiver() { |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 RtcpBandwidthObserver* bandwidth_callback, | 433 RtcpBandwidthObserver* bandwidth_callback, |
429 TransportFeedbackObserver* transport_feedback_callback, | 434 TransportFeedbackObserver* transport_feedback_callback, |
430 RtcpRttStats* rtt_stats, | 435 RtcpRttStats* rtt_stats, |
431 RtcpPacketTypeCounterObserver* rtcp_packet_type_counter_observer, | 436 RtcpPacketTypeCounterObserver* rtcp_packet_type_counter_observer, |
432 RemoteBitrateEstimator* remote_bitrate_estimator, | 437 RemoteBitrateEstimator* remote_bitrate_estimator, |
433 RtpPacketSender* paced_sender, | 438 RtpPacketSender* paced_sender, |
434 TransportSequenceNumberAllocator* transport_sequence_number_allocator, | 439 TransportSequenceNumberAllocator* transport_sequence_number_allocator, |
435 BitrateStatisticsObserver* send_bitrate_observer, | 440 BitrateStatisticsObserver* send_bitrate_observer, |
436 FrameCountObserver* send_frame_count_observer, | 441 FrameCountObserver* send_frame_count_observer, |
437 SendSideDelayObserver* send_side_delay_observer, | 442 SendSideDelayObserver* send_side_delay_observer, |
| 443 SendPacketObserver* send_packet_observer, |
438 size_t num_modules) { | 444 size_t num_modules) { |
439 RTC_DCHECK_GT(num_modules, 0u); | 445 RTC_DCHECK_GT(num_modules, 0u); |
440 RtpRtcp::Configuration configuration; | 446 RtpRtcp::Configuration configuration; |
441 ReceiveStatistics* null_receive_statistics = configuration.receive_statistics; | 447 ReceiveStatistics* null_receive_statistics = configuration.receive_statistics; |
442 configuration.audio = false; | 448 configuration.audio = false; |
443 configuration.receiver_only = receiver_only; | 449 configuration.receiver_only = receiver_only; |
444 configuration.receive_statistics = receive_statistics; | 450 configuration.receive_statistics = receive_statistics; |
445 configuration.outgoing_transport = outgoing_transport; | 451 configuration.outgoing_transport = outgoing_transport; |
446 configuration.intra_frame_callback = intra_frame_callback; | 452 configuration.intra_frame_callback = intra_frame_callback; |
447 configuration.rtt_stats = rtt_stats; | 453 configuration.rtt_stats = rtt_stats; |
448 configuration.rtcp_packet_type_counter_observer = | 454 configuration.rtcp_packet_type_counter_observer = |
449 rtcp_packet_type_counter_observer; | 455 rtcp_packet_type_counter_observer; |
450 configuration.paced_sender = paced_sender; | 456 configuration.paced_sender = paced_sender; |
451 configuration.transport_sequence_number_allocator = | 457 configuration.transport_sequence_number_allocator = |
452 transport_sequence_number_allocator; | 458 transport_sequence_number_allocator; |
453 configuration.send_bitrate_observer = send_bitrate_observer; | 459 configuration.send_bitrate_observer = send_bitrate_observer; |
454 configuration.send_frame_count_observer = send_frame_count_observer; | 460 configuration.send_frame_count_observer = send_frame_count_observer; |
455 configuration.send_side_delay_observer = send_side_delay_observer; | 461 configuration.send_side_delay_observer = send_side_delay_observer; |
| 462 configuration.send_packet_observer = send_packet_observer; |
456 configuration.bandwidth_callback = bandwidth_callback; | 463 configuration.bandwidth_callback = bandwidth_callback; |
457 configuration.transport_feedback_callback = transport_feedback_callback; | 464 configuration.transport_feedback_callback = transport_feedback_callback; |
458 | 465 |
459 std::vector<RtpRtcp*> modules; | 466 std::vector<RtpRtcp*> modules; |
460 for (size_t i = 0; i < num_modules; ++i) { | 467 for (size_t i = 0; i < num_modules; ++i) { |
461 RtpRtcp* rtp_rtcp = RtpRtcp::CreateRtpRtcp(configuration); | 468 RtpRtcp* rtp_rtcp = RtpRtcp::CreateRtpRtcp(configuration); |
462 rtp_rtcp->SetSendingStatus(false); | 469 rtp_rtcp->SetSendingStatus(false); |
463 rtp_rtcp->SetSendingMediaStatus(false); | 470 rtp_rtcp->SetSendingMediaStatus(false); |
464 rtp_rtcp->SetRTCPStatus(RtcpMode::kCompound); | 471 rtp_rtcp->SetRTCPStatus(RtcpMode::kCompound); |
465 modules.push_back(rtp_rtcp); | 472 modules.push_back(rtp_rtcp); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 rtc::CritScope lock(&crit_); | 513 rtc::CritScope lock(&crit_); |
507 receive_stats_callback_ = receive_statistics_proxy; | 514 receive_stats_callback_ = receive_statistics_proxy; |
508 } | 515 } |
509 | 516 |
510 void ViEChannel::SetIncomingVideoStream( | 517 void ViEChannel::SetIncomingVideoStream( |
511 IncomingVideoStream* incoming_video_stream) { | 518 IncomingVideoStream* incoming_video_stream) { |
512 rtc::CritScope lock(&crit_); | 519 rtc::CritScope lock(&crit_); |
513 incoming_video_stream_ = incoming_video_stream; | 520 incoming_video_stream_ = incoming_video_stream; |
514 } | 521 } |
515 } // namespace webrtc | 522 } // namespace webrtc |
OLD | NEW |