Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: webrtc/video/video_send_stream.cc

Issue 2960363002: Implement RTP keepalive in native stack. (Closed)
Patch Set: Cleanup Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/video/replay.cc ('k') | webrtc/video/video_send_stream_tests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "webrtc/video/video_send_stream.h" 10 #include "webrtc/video/video_send_stream.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 RtcpIntraFrameObserver* intra_frame_callback, 50 RtcpIntraFrameObserver* intra_frame_callback,
51 RtcpBandwidthObserver* bandwidth_callback, 51 RtcpBandwidthObserver* bandwidth_callback,
52 RtpTransportControllerSendInterface* transport, 52 RtpTransportControllerSendInterface* transport,
53 RtcpRttStats* rtt_stats, 53 RtcpRttStats* rtt_stats,
54 FlexfecSender* flexfec_sender, 54 FlexfecSender* flexfec_sender,
55 SendStatisticsProxy* stats_proxy, 55 SendStatisticsProxy* stats_proxy,
56 SendDelayStats* send_delay_stats, 56 SendDelayStats* send_delay_stats,
57 RtcEventLog* event_log, 57 RtcEventLog* event_log,
58 RateLimiter* retransmission_rate_limiter, 58 RateLimiter* retransmission_rate_limiter,
59 OverheadObserver* overhead_observer, 59 OverheadObserver* overhead_observer,
60 size_t num_modules) { 60 size_t num_modules,
61 RtpKeepAliveConfig keepalive_config) {
61 RTC_DCHECK_GT(num_modules, 0); 62 RTC_DCHECK_GT(num_modules, 0);
62 RtpRtcp::Configuration configuration; 63 RtpRtcp::Configuration configuration;
63 ReceiveStatistics* null_receive_statistics = configuration.receive_statistics; 64 ReceiveStatistics* null_receive_statistics = configuration.receive_statistics;
64 configuration.audio = false; 65 configuration.audio = false;
65 configuration.receiver_only = false; 66 configuration.receiver_only = false;
66 configuration.flexfec_sender = flexfec_sender; 67 configuration.flexfec_sender = flexfec_sender;
67 configuration.receive_statistics = null_receive_statistics; 68 configuration.receive_statistics = null_receive_statistics;
68 configuration.outgoing_transport = outgoing_transport; 69 configuration.outgoing_transport = outgoing_transport;
69 configuration.intra_frame_callback = intra_frame_callback; 70 configuration.intra_frame_callback = intra_frame_callback;
70 configuration.bandwidth_callback = bandwidth_callback; 71 configuration.bandwidth_callback = bandwidth_callback;
71 configuration.transport_feedback_callback = 72 configuration.transport_feedback_callback =
72 transport->transport_feedback_observer(); 73 transport->transport_feedback_observer();
73 configuration.rtt_stats = rtt_stats; 74 configuration.rtt_stats = rtt_stats;
74 configuration.rtcp_packet_type_counter_observer = stats_proxy; 75 configuration.rtcp_packet_type_counter_observer = stats_proxy;
75 configuration.paced_sender = transport->packet_sender(); 76 configuration.paced_sender = transport->packet_sender();
76 configuration.transport_sequence_number_allocator = 77 configuration.transport_sequence_number_allocator =
77 transport->packet_router(); 78 transport->packet_router();
78 configuration.send_bitrate_observer = stats_proxy; 79 configuration.send_bitrate_observer = stats_proxy;
79 configuration.send_frame_count_observer = stats_proxy; 80 configuration.send_frame_count_observer = stats_proxy;
80 configuration.send_side_delay_observer = stats_proxy; 81 configuration.send_side_delay_observer = stats_proxy;
81 configuration.send_packet_observer = send_delay_stats; 82 configuration.send_packet_observer = send_delay_stats;
82 configuration.event_log = event_log; 83 configuration.event_log = event_log;
83 configuration.retransmission_rate_limiter = retransmission_rate_limiter; 84 configuration.retransmission_rate_limiter = retransmission_rate_limiter;
84 configuration.overhead_observer = overhead_observer; 85 configuration.overhead_observer = overhead_observer;
86 configuration.keepalive_config = keepalive_config;
85 std::vector<RtpRtcp*> modules; 87 std::vector<RtpRtcp*> modules;
86 for (size_t i = 0; i < num_modules; ++i) { 88 for (size_t i = 0; i < num_modules; ++i) {
87 RtpRtcp* rtp_rtcp = RtpRtcp::CreateRtpRtcp(configuration); 89 RtpRtcp* rtp_rtcp = RtpRtcp::CreateRtpRtcp(configuration);
88 rtp_rtcp->SetSendingStatus(false); 90 rtp_rtcp->SetSendingStatus(false);
89 rtp_rtcp->SetSendingMediaStatus(false); 91 rtp_rtcp->SetSendingMediaStatus(false);
90 rtp_rtcp->SetRTCPStatus(RtcpMode::kCompound); 92 rtp_rtcp->SetRTCPStatus(RtcpMode::kCompound);
91 modules.push_back(rtp_rtcp); 93 modules.push_back(rtp_rtcp);
92 } 94 }
93 return modules; 95 return modules;
94 } 96 }
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 &encoder_feedback_, 790 &encoder_feedback_,
789 bandwidth_observer_.get(), 791 bandwidth_observer_.get(),
790 transport, 792 transport,
791 call_stats_->rtcp_rtt_stats(), 793 call_stats_->rtcp_rtt_stats(),
792 flexfec_sender_.get(), 794 flexfec_sender_.get(),
793 stats_proxy_, 795 stats_proxy_,
794 send_delay_stats, 796 send_delay_stats,
795 event_log, 797 event_log,
796 transport->send_side_cc()->GetRetransmissionRateLimiter(), 798 transport->send_side_cc()->GetRetransmissionRateLimiter(),
797 this, 799 this,
798 config_->rtp.ssrcs.size())), 800 config_->rtp.ssrcs.size(),
801 config_->rtp.keep_alive)),
799 payload_router_(rtp_rtcp_modules_, 802 payload_router_(rtp_rtcp_modules_,
800 config_->encoder_settings.payload_type), 803 config_->encoder_settings.payload_type),
801 weak_ptr_factory_(this), 804 weak_ptr_factory_(this),
802 overhead_bytes_per_packet_(0), 805 overhead_bytes_per_packet_(0),
803 transport_overhead_bytes_per_packet_(0) { 806 transport_overhead_bytes_per_packet_(0) {
804 RTC_DCHECK_RUN_ON(worker_queue_); 807 RTC_DCHECK_RUN_ON(worker_queue_);
805 LOG(LS_INFO) << "VideoSendStreamInternal: " << config_->ToString(); 808 LOG(LS_INFO) << "VideoSendStreamInternal: " << config_->ToString();
806 weak_ptr_ = weak_ptr_factory_.GetWeakPtr(); 809 weak_ptr_ = weak_ptr_factory_.GetWeakPtr();
807 module_process_thread_checker_.DetachFromThread(); 810 module_process_thread_checker_.DetachFromThread();
808 811
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
1341 std::min(config_->rtp.max_packet_size, 1344 std::min(config_->rtp.max_packet_size,
1342 kPathMTU - transport_overhead_bytes_per_packet_); 1345 kPathMTU - transport_overhead_bytes_per_packet_);
1343 1346
1344 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { 1347 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) {
1345 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size); 1348 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size);
1346 } 1349 }
1347 } 1350 }
1348 1351
1349 } // namespace internal 1352 } // namespace internal
1350 } // namespace webrtc 1353 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/replay.cc ('k') | webrtc/video/video_send_stream_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698