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

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

Issue 1725363003: Move RTP module activation into PayloadRouter. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 padding_index_(static_cast<size_t>(-1)), // Start padding at first child. 94 padding_index_(static_cast<size_t>(-1)), // Start padding at first child.
95 nack_method_(kNackOff), 95 nack_method_(kNackOff),
96 nack_last_time_sent_full_(0), 96 nack_last_time_sent_full_(0),
97 nack_last_time_sent_full_prev_(0), 97 nack_last_time_sent_full_prev_(0),
98 nack_last_seq_number_sent_(0), 98 nack_last_seq_number_sent_(0),
99 key_frame_req_method_(kKeyFrameReqPliRtcp), 99 key_frame_req_method_(kKeyFrameReqPliRtcp),
100 remote_bitrate_(configuration.remote_bitrate_estimator), 100 remote_bitrate_(configuration.remote_bitrate_estimator),
101 rtt_stats_(configuration.rtt_stats), 101 rtt_stats_(configuration.rtt_stats),
102 critical_section_rtt_(CriticalSectionWrapper::CreateCriticalSection()), 102 critical_section_rtt_(CriticalSectionWrapper::CreateCriticalSection()),
103 rtt_ms_(0) { 103 rtt_ms_(0) {
104 send_video_codec_.codecType = kVideoCodecUnknown;
105
106 // Make sure that RTCP objects are aware of our SSRC. 104 // Make sure that RTCP objects are aware of our SSRC.
107 uint32_t SSRC = rtp_sender_.SSRC(); 105 uint32_t SSRC = rtp_sender_.SSRC();
108 rtcp_sender_.SetSSRC(SSRC); 106 rtcp_sender_.SetSSRC(SSRC);
109 SetRtcpReceiverSsrcs(SSRC); 107 SetRtcpReceiverSsrcs(SSRC);
110 } 108 }
111 109
112 // Returns the number of milliseconds until the module want a worker thread 110 // Returns the number of milliseconds until the module want a worker thread
113 // to call Process. 111 // to call Process.
114 int64_t ModuleRtpRtcpImpl::TimeUntilNextProcess() { 112 int64_t ModuleRtpRtcpImpl::TimeUntilNextProcess() {
115 const int64_t now = clock_->TimeInMilliseconds(); 113 const int64_t now = clock_->TimeInMilliseconds();
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 const CodecInst& voice_codec) { 244 const CodecInst& voice_codec) {
247 return rtp_sender_.RegisterPayload( 245 return rtp_sender_.RegisterPayload(
248 voice_codec.plname, 246 voice_codec.plname,
249 voice_codec.pltype, 247 voice_codec.pltype,
250 voice_codec.plfreq, 248 voice_codec.plfreq,
251 voice_codec.channels, 249 voice_codec.channels,
252 (voice_codec.rate < 0) ? 0 : voice_codec.rate); 250 (voice_codec.rate < 0) ? 0 : voice_codec.rate);
253 } 251 }
254 252
255 int32_t ModuleRtpRtcpImpl::RegisterSendPayload(const VideoCodec& video_codec) { 253 int32_t ModuleRtpRtcpImpl::RegisterSendPayload(const VideoCodec& video_codec) {
256 send_video_codec_ = video_codec;
257 return rtp_sender_.RegisterPayload(video_codec.plName, video_codec.plType, 254 return rtp_sender_.RegisterPayload(video_codec.plName, video_codec.plType,
stefan-webrtc 2016/02/26 14:49:07 Call RegisterVideoSendPayload()
pbos-webrtc 2016/02/26 14:58:55 Other method is CHECKed, don't dare doing that rig
258 90000, 0, 0); 255 90000, 0, 0);
259 } 256 }
260 257
258 void ModuleRtpRtcpImpl::RegisterVideoSendPayload(int payload_type,
259 const char* payload_name) {
260 RTC_CHECK_EQ(
261 0, rtp_sender_.RegisterPayload(payload_name, payload_type, 90000, 0, 0));
262 }
263
261 int32_t ModuleRtpRtcpImpl::DeRegisterSendPayload(const int8_t payload_type) { 264 int32_t ModuleRtpRtcpImpl::DeRegisterSendPayload(const int8_t payload_type) {
262 return rtp_sender_.DeRegisterSendPayload(payload_type); 265 return rtp_sender_.DeRegisterSendPayload(payload_type);
263 } 266 }
264 267
265 int8_t ModuleRtpRtcpImpl::SendPayloadType() const { 268 int8_t ModuleRtpRtcpImpl::SendPayloadType() const {
266 return rtp_sender_.SendPayloadType(); 269 return rtp_sender_.SendPayloadType();
267 } 270 }
268 271
269 uint32_t ModuleRtpRtcpImpl::StartTimestamp() const { 272 uint32_t ModuleRtpRtcpImpl::StartTimestamp() const {
270 return rtp_sender_.StartTimestamp(); 273 return rtp_sender_.StartTimestamp();
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback( 981 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback(
979 StreamDataCountersCallback* callback) { 982 StreamDataCountersCallback* callback) {
980 rtp_sender_.RegisterRtpStatisticsCallback(callback); 983 rtp_sender_.RegisterRtpStatisticsCallback(callback);
981 } 984 }
982 985
983 StreamDataCountersCallback* 986 StreamDataCountersCallback*
984 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { 987 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const {
985 return rtp_sender_.GetRtpStatisticsCallback(); 988 return rtp_sender_.GetRtpStatisticsCallback();
986 } 989 }
987 } // namespace webrtc 990 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698