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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc

Issue 1365043002: Set RtcpSender transport at construction. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Cleanup Created 5 years, 2 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
OLDNEW
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 configuration.audio_messages, 65 configuration.audio_messages,
66 configuration.paced_sender, 66 configuration.paced_sender,
67 configuration.transport_sequence_number_allocator, 67 configuration.transport_sequence_number_allocator,
68 configuration.transport_feedback_callback, 68 configuration.transport_feedback_callback,
69 configuration.send_bitrate_observer, 69 configuration.send_bitrate_observer,
70 configuration.send_frame_count_observer, 70 configuration.send_frame_count_observer,
71 configuration.send_side_delay_observer), 71 configuration.send_side_delay_observer),
72 rtcp_sender_(configuration.audio, 72 rtcp_sender_(configuration.audio,
73 configuration.clock, 73 configuration.clock,
74 configuration.receive_statistics, 74 configuration.receive_statistics,
75 configuration.rtcp_packet_type_counter_observer), 75 configuration.rtcp_packet_type_counter_observer,
76 configuration.outgoing_transport),
76 rtcp_receiver_(configuration.clock, 77 rtcp_receiver_(configuration.clock,
77 configuration.receiver_only, 78 configuration.receiver_only,
78 configuration.rtcp_packet_type_counter_observer, 79 configuration.rtcp_packet_type_counter_observer,
79 configuration.bandwidth_callback, 80 configuration.bandwidth_callback,
80 configuration.intra_frame_callback, 81 configuration.intra_frame_callback,
81 this), 82 this),
82 clock_(configuration.clock), 83 clock_(configuration.clock),
83 audio_(configuration.audio), 84 audio_(configuration.audio),
84 collision_detected_(false), 85 collision_detected_(false),
85 last_process_time_(configuration.clock->TimeInMilliseconds()), 86 last_process_time_(configuration.clock->TimeInMilliseconds()),
86 last_bitrate_process_time_(configuration.clock->TimeInMilliseconds()), 87 last_bitrate_process_time_(configuration.clock->TimeInMilliseconds()),
87 last_rtt_process_time_(configuration.clock->TimeInMilliseconds()), 88 last_rtt_process_time_(configuration.clock->TimeInMilliseconds()),
88 packet_overhead_(28), // IPV4 UDP. 89 packet_overhead_(28), // IPV4 UDP.
89 padding_index_(static_cast<size_t>(-1)), // Start padding at first child. 90 padding_index_(static_cast<size_t>(-1)), // Start padding at first child.
90 nack_method_(kNackOff), 91 nack_method_(kNackOff),
91 nack_last_time_sent_full_(0), 92 nack_last_time_sent_full_(0),
92 nack_last_time_sent_full_prev_(0), 93 nack_last_time_sent_full_prev_(0),
93 nack_last_seq_number_sent_(0), 94 nack_last_seq_number_sent_(0),
94 key_frame_req_method_(kKeyFrameReqFirRtp), 95 key_frame_req_method_(kKeyFrameReqFirRtp),
95 remote_bitrate_(configuration.remote_bitrate_estimator), 96 remote_bitrate_(configuration.remote_bitrate_estimator),
96 rtt_stats_(configuration.rtt_stats), 97 rtt_stats_(configuration.rtt_stats),
97 critical_section_rtt_(CriticalSectionWrapper::CreateCriticalSection()), 98 critical_section_rtt_(CriticalSectionWrapper::CreateCriticalSection()),
98 rtt_ms_(0) { 99 rtt_ms_(0) {
99 send_video_codec_.codecType = kVideoCodecUnknown; 100 send_video_codec_.codecType = kVideoCodecUnknown;
100 101
101 // TODO(pwestin) move to constructors of each rtp/rtcp sender/receiver object.
102 rtcp_sender_.RegisterSendTransport(configuration.outgoing_transport);
103
104 // Make sure that RTCP objects are aware of our SSRC. 102 // Make sure that RTCP objects are aware of our SSRC.
105 uint32_t SSRC = rtp_sender_.SSRC(); 103 uint32_t SSRC = rtp_sender_.SSRC();
106 rtcp_sender_.SetSSRC(SSRC); 104 rtcp_sender_.SetSSRC(SSRC);
107 SetRtcpReceiverSsrcs(SSRC); 105 SetRtcpReceiverSsrcs(SSRC);
108 } 106 }
109 107
110 // Returns the number of milliseconds until the module want a worker thread 108 // Returns the number of milliseconds until the module want a worker thread
111 // to call Process. 109 // to call Process.
112 int64_t ModuleRtpRtcpImpl::TimeUntilNextProcess() { 110 int64_t ModuleRtpRtcpImpl::TimeUntilNextProcess() {
113 const int64_t now = clock_->TimeInMilliseconds(); 111 const int64_t now = clock_->TimeInMilliseconds();
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback( 986 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback(
989 StreamDataCountersCallback* callback) { 987 StreamDataCountersCallback* callback) {
990 rtp_sender_.RegisterRtpStatisticsCallback(callback); 988 rtp_sender_.RegisterRtpStatisticsCallback(callback);
991 } 989 }
992 990
993 StreamDataCountersCallback* 991 StreamDataCountersCallback*
994 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { 992 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const {
995 return rtp_sender_.GetRtpStatisticsCallback(); 993 return rtp_sender_.GetRtpStatisticsCallback();
996 } 994 }
997 } // namespace webrtc 995 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698