OLD | NEW |
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 | 10 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 const std::map<uint32_t, RtpState>& suspended_ssrcs) | 110 const std::map<uint32_t, RtpState>& suspended_ssrcs) |
111 : transport_adapter_(config.send_transport), | 111 : transport_adapter_(config.send_transport), |
112 encoded_frame_proxy_(config.post_encode_callback), | 112 encoded_frame_proxy_(config.post_encode_callback), |
113 config_(config), | 113 config_(config), |
114 suspended_ssrcs_(suspended_ssrcs), | 114 suspended_ssrcs_(suspended_ssrcs), |
115 module_process_thread_(module_process_thread), | 115 module_process_thread_(module_process_thread), |
116 channel_group_(channel_group), | 116 channel_group_(channel_group), |
117 channel_id_(channel_id), | 117 channel_id_(channel_id), |
118 use_config_bitrate_(true), | 118 use_config_bitrate_(true), |
119 stats_proxy_(Clock::GetRealTimeClock(), config) { | 119 stats_proxy_(Clock::GetRealTimeClock(), config) { |
120 DCHECK(!config_.rtp.ssrcs.empty()); | 120 RTC_DCHECK(!config_.rtp.ssrcs.empty()); |
121 CHECK(channel_group->CreateSendChannel(channel_id_, 0, &transport_adapter_, | 121 RTC_CHECK(channel_group->CreateSendChannel( |
122 num_cpu_cores, config_.rtp.ssrcs)); | 122 channel_id_, 0, &transport_adapter_, num_cpu_cores, config_.rtp.ssrcs)); |
123 vie_channel_ = channel_group_->GetChannel(channel_id_); | 123 vie_channel_ = channel_group_->GetChannel(channel_id_); |
124 vie_encoder_ = channel_group_->GetEncoder(channel_id_); | 124 vie_encoder_ = channel_group_->GetEncoder(channel_id_); |
125 | 125 |
126 for (size_t i = 0; i < config_.rtp.extensions.size(); ++i) { | 126 for (size_t i = 0; i < config_.rtp.extensions.size(); ++i) { |
127 const std::string& extension = config_.rtp.extensions[i].name; | 127 const std::string& extension = config_.rtp.extensions[i].name; |
128 int id = config_.rtp.extensions[i].id; | 128 int id = config_.rtp.extensions[i].id; |
129 // One-byte-extension local identifiers are in the range 1-14 inclusive. | 129 // One-byte-extension local identifiers are in the range 1-14 inclusive. |
130 DCHECK_GE(id, 1); | 130 RTC_DCHECK_GE(id, 1); |
131 DCHECK_LE(id, 14); | 131 RTC_DCHECK_LE(id, 14); |
132 if (extension == RtpExtension::kTOffset) { | 132 if (extension == RtpExtension::kTOffset) { |
133 CHECK_EQ(0, vie_channel_->SetSendTimestampOffsetStatus(true, id)); | 133 RTC_CHECK_EQ(0, vie_channel_->SetSendTimestampOffsetStatus(true, id)); |
134 } else if (extension == RtpExtension::kAbsSendTime) { | 134 } else if (extension == RtpExtension::kAbsSendTime) { |
135 CHECK_EQ(0, vie_channel_->SetSendAbsoluteSendTimeStatus(true, id)); | 135 RTC_CHECK_EQ(0, vie_channel_->SetSendAbsoluteSendTimeStatus(true, id)); |
136 } else if (extension == RtpExtension::kVideoRotation) { | 136 } else if (extension == RtpExtension::kVideoRotation) { |
137 CHECK_EQ(0, vie_channel_->SetSendVideoRotationStatus(true, id)); | 137 RTC_CHECK_EQ(0, vie_channel_->SetSendVideoRotationStatus(true, id)); |
138 } else if (extension == RtpExtension::kTransportSequenceNumber) { | 138 } else if (extension == RtpExtension::kTransportSequenceNumber) { |
139 CHECK_EQ(0, vie_channel_->SetSendTransportSequenceNumber(true, id)); | 139 RTC_CHECK_EQ(0, vie_channel_->SetSendTransportSequenceNumber(true, id)); |
140 } else { | 140 } else { |
141 RTC_NOTREACHED() << "Registering unsupported RTP extension."; | 141 RTC_NOTREACHED() << "Registering unsupported RTP extension."; |
142 } | 142 } |
143 } | 143 } |
144 | 144 |
145 // TODO(pbos): Consider configuring REMB in Call. | 145 // TODO(pbos): Consider configuring REMB in Call. |
146 channel_group_->SetChannelRembStatus(true, false, vie_channel_); | 146 channel_group_->SetChannelRembStatus(true, false, vie_channel_); |
147 | 147 |
148 // Enable NACK, FEC or both. | 148 // Enable NACK, FEC or both. |
149 const bool enable_protection_nack = config_.rtp.nack.rtp_history_ms > 0; | 149 const bool enable_protection_nack = config_.rtp.nack.rtp_history_ms > 0; |
150 const bool enable_protection_fec = config_.rtp.fec.red_payload_type != -1; | 150 const bool enable_protection_fec = config_.rtp.fec.red_payload_type != -1; |
151 // TODO(changbin): Should set RTX for RED mapping in RTP sender in future. | 151 // TODO(changbin): Should set RTX for RED mapping in RTP sender in future. |
152 vie_channel_->SetProtectionMode(enable_protection_nack, enable_protection_fec, | 152 vie_channel_->SetProtectionMode(enable_protection_nack, enable_protection_fec, |
153 config_.rtp.fec.red_payload_type, | 153 config_.rtp.fec.red_payload_type, |
154 config_.rtp.fec.ulpfec_payload_type); | 154 config_.rtp.fec.ulpfec_payload_type); |
155 vie_encoder_->UpdateProtectionMethod(enable_protection_nack, | 155 vie_encoder_->UpdateProtectionMethod(enable_protection_nack, |
156 enable_protection_fec); | 156 enable_protection_fec); |
157 | 157 |
158 ConfigureSsrcs(); | 158 ConfigureSsrcs(); |
159 | 159 |
160 vie_channel_->SetRTCPCName(config_.rtp.c_name.c_str()); | 160 vie_channel_->SetRTCPCName(config_.rtp.c_name.c_str()); |
161 | 161 |
162 input_.reset(new internal::VideoCaptureInput( | 162 input_.reset(new internal::VideoCaptureInput( |
163 module_process_thread_, vie_encoder_, config_.local_renderer, | 163 module_process_thread_, vie_encoder_, config_.local_renderer, |
164 &stats_proxy_, this)); | 164 &stats_proxy_, this)); |
165 | 165 |
166 // 28 to match packet overhead in ModuleRtpRtcpImpl. | 166 // 28 to match packet overhead in ModuleRtpRtcpImpl. |
167 DCHECK_LE(config_.rtp.max_packet_size, static_cast<size_t>(0xFFFF - 28)); | 167 RTC_DCHECK_LE(config_.rtp.max_packet_size, static_cast<size_t>(0xFFFF - 28)); |
168 vie_channel_->SetMTU(static_cast<uint16_t>(config_.rtp.max_packet_size + 28)); | 168 vie_channel_->SetMTU(static_cast<uint16_t>(config_.rtp.max_packet_size + 28)); |
169 | 169 |
170 DCHECK(config.encoder_settings.encoder != nullptr); | 170 RTC_DCHECK(config.encoder_settings.encoder != nullptr); |
171 DCHECK_GE(config.encoder_settings.payload_type, 0); | 171 RTC_DCHECK_GE(config.encoder_settings.payload_type, 0); |
172 DCHECK_LE(config.encoder_settings.payload_type, 127); | 172 RTC_DCHECK_LE(config.encoder_settings.payload_type, 127); |
173 CHECK_EQ(0, vie_encoder_->RegisterExternalEncoder( | 173 RTC_CHECK_EQ(0, vie_encoder_->RegisterExternalEncoder( |
174 config.encoder_settings.encoder, | 174 config.encoder_settings.encoder, |
175 config.encoder_settings.payload_type, | 175 config.encoder_settings.payload_type, |
176 config.encoder_settings.internal_source)); | 176 config.encoder_settings.internal_source)); |
177 | 177 |
178 CHECK(ReconfigureVideoEncoder(encoder_config)); | 178 RTC_CHECK(ReconfigureVideoEncoder(encoder_config)); |
179 | 179 |
180 vie_channel_->RegisterSendSideDelayObserver(&stats_proxy_); | 180 vie_channel_->RegisterSendSideDelayObserver(&stats_proxy_); |
181 vie_encoder_->RegisterSendStatisticsProxy(&stats_proxy_); | 181 vie_encoder_->RegisterSendStatisticsProxy(&stats_proxy_); |
182 | 182 |
183 vie_encoder_->RegisterPreEncodeCallback(config_.pre_encode_callback); | 183 vie_encoder_->RegisterPreEncodeCallback(config_.pre_encode_callback); |
184 if (config_.post_encode_callback) | 184 if (config_.post_encode_callback) |
185 vie_encoder_->RegisterPostEncodeImageCallback(&encoded_frame_proxy_); | 185 vie_encoder_->RegisterPostEncodeImageCallback(&encoded_frame_proxy_); |
186 | 186 |
187 if (config_.suspend_below_min_bitrate) { | 187 if (config_.suspend_below_min_bitrate) { |
188 vie_encoder_->SuspendBelowMinBitrate(); | 188 vie_encoder_->SuspendBelowMinBitrate(); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 vie_channel_->StopSend(); | 244 vie_channel_->StopSend(); |
245 vie_channel_->StopReceive(); | 245 vie_channel_->StopReceive(); |
246 transport_adapter_.Disable(); | 246 transport_adapter_.Disable(); |
247 } | 247 } |
248 | 248 |
249 bool VideoSendStream::ReconfigureVideoEncoder( | 249 bool VideoSendStream::ReconfigureVideoEncoder( |
250 const VideoEncoderConfig& config) { | 250 const VideoEncoderConfig& config) { |
251 TRACE_EVENT0("webrtc", "VideoSendStream::(Re)configureVideoEncoder"); | 251 TRACE_EVENT0("webrtc", "VideoSendStream::(Re)configureVideoEncoder"); |
252 LOG(LS_INFO) << "(Re)configureVideoEncoder: " << config.ToString(); | 252 LOG(LS_INFO) << "(Re)configureVideoEncoder: " << config.ToString(); |
253 const std::vector<VideoStream>& streams = config.streams; | 253 const std::vector<VideoStream>& streams = config.streams; |
254 DCHECK(!streams.empty()); | 254 RTC_DCHECK(!streams.empty()); |
255 DCHECK_GE(config_.rtp.ssrcs.size(), streams.size()); | 255 RTC_DCHECK_GE(config_.rtp.ssrcs.size(), streams.size()); |
256 | 256 |
257 VideoCodec video_codec; | 257 VideoCodec video_codec; |
258 memset(&video_codec, 0, sizeof(video_codec)); | 258 memset(&video_codec, 0, sizeof(video_codec)); |
259 if (config_.encoder_settings.payload_name == "VP8") { | 259 if (config_.encoder_settings.payload_name == "VP8") { |
260 video_codec.codecType = kVideoCodecVP8; | 260 video_codec.codecType = kVideoCodecVP8; |
261 } else if (config_.encoder_settings.payload_name == "VP9") { | 261 } else if (config_.encoder_settings.payload_name == "VP9") { |
262 video_codec.codecType = kVideoCodecVP9; | 262 video_codec.codecType = kVideoCodecVP9; |
263 } else if (config_.encoder_settings.payload_name == "H264") { | 263 } else if (config_.encoder_settings.payload_name == "H264") { |
264 video_codec.codecType = kVideoCodecH264; | 264 video_codec.codecType = kVideoCodecH264; |
265 } else { | 265 } else { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 video_codec.codecSpecific.VP9.numberOfTemporalLayers = | 304 video_codec.codecSpecific.VP9.numberOfTemporalLayers = |
305 static_cast<unsigned char>( | 305 static_cast<unsigned char>( |
306 streams.back().temporal_layer_thresholds_bps.size() + 1); | 306 streams.back().temporal_layer_thresholds_bps.size() + 1); |
307 } else if (video_codec.codecType == kVideoCodecH264) { | 307 } else if (video_codec.codecType == kVideoCodecH264) { |
308 if (config.encoder_specific_settings != nullptr) { | 308 if (config.encoder_specific_settings != nullptr) { |
309 video_codec.codecSpecific.H264 = *reinterpret_cast<const VideoCodecH264*>( | 309 video_codec.codecSpecific.H264 = *reinterpret_cast<const VideoCodecH264*>( |
310 config.encoder_specific_settings); | 310 config.encoder_specific_settings); |
311 } | 311 } |
312 } else { | 312 } else { |
313 // TODO(pbos): Support encoder_settings codec-agnostically. | 313 // TODO(pbos): Support encoder_settings codec-agnostically. |
314 DCHECK(config.encoder_specific_settings == nullptr) | 314 RTC_DCHECK(config.encoder_specific_settings == nullptr) |
315 << "Encoder-specific settings for codec type not wired up."; | 315 << "Encoder-specific settings for codec type not wired up."; |
316 } | 316 } |
317 | 317 |
318 strncpy(video_codec.plName, | 318 strncpy(video_codec.plName, |
319 config_.encoder_settings.payload_name.c_str(), | 319 config_.encoder_settings.payload_name.c_str(), |
320 kPayloadNameSize - 1); | 320 kPayloadNameSize - 1); |
321 video_codec.plName[kPayloadNameSize - 1] = '\0'; | 321 video_codec.plName[kPayloadNameSize - 1] = '\0'; |
322 video_codec.plType = config_.encoder_settings.payload_type; | 322 video_codec.plType = config_.encoder_settings.payload_type; |
323 video_codec.numberOfSimulcastStreams = | 323 video_codec.numberOfSimulcastStreams = |
324 static_cast<unsigned char>(streams.size()); | 324 static_cast<unsigned char>(streams.size()); |
325 video_codec.minBitrate = streams[0].min_bitrate_bps / 1000; | 325 video_codec.minBitrate = streams[0].min_bitrate_bps / 1000; |
326 DCHECK_LE(streams.size(), static_cast<size_t>(kMaxSimulcastStreams)); | 326 RTC_DCHECK_LE(streams.size(), static_cast<size_t>(kMaxSimulcastStreams)); |
327 for (size_t i = 0; i < streams.size(); ++i) { | 327 for (size_t i = 0; i < streams.size(); ++i) { |
328 SimulcastStream* sim_stream = &video_codec.simulcastStream[i]; | 328 SimulcastStream* sim_stream = &video_codec.simulcastStream[i]; |
329 DCHECK_GT(streams[i].width, 0u); | 329 RTC_DCHECK_GT(streams[i].width, 0u); |
330 DCHECK_GT(streams[i].height, 0u); | 330 RTC_DCHECK_GT(streams[i].height, 0u); |
331 DCHECK_GT(streams[i].max_framerate, 0); | 331 RTC_DCHECK_GT(streams[i].max_framerate, 0); |
332 // Different framerates not supported per stream at the moment. | 332 // Different framerates not supported per stream at the moment. |
333 DCHECK_EQ(streams[i].max_framerate, streams[0].max_framerate); | 333 RTC_DCHECK_EQ(streams[i].max_framerate, streams[0].max_framerate); |
334 DCHECK_GE(streams[i].min_bitrate_bps, 0); | 334 RTC_DCHECK_GE(streams[i].min_bitrate_bps, 0); |
335 DCHECK_GE(streams[i].target_bitrate_bps, streams[i].min_bitrate_bps); | 335 RTC_DCHECK_GE(streams[i].target_bitrate_bps, streams[i].min_bitrate_bps); |
336 DCHECK_GE(streams[i].max_bitrate_bps, streams[i].target_bitrate_bps); | 336 RTC_DCHECK_GE(streams[i].max_bitrate_bps, streams[i].target_bitrate_bps); |
337 DCHECK_GE(streams[i].max_qp, 0); | 337 RTC_DCHECK_GE(streams[i].max_qp, 0); |
338 | 338 |
339 sim_stream->width = static_cast<unsigned short>(streams[i].width); | 339 sim_stream->width = static_cast<unsigned short>(streams[i].width); |
340 sim_stream->height = static_cast<unsigned short>(streams[i].height); | 340 sim_stream->height = static_cast<unsigned short>(streams[i].height); |
341 sim_stream->minBitrate = streams[i].min_bitrate_bps / 1000; | 341 sim_stream->minBitrate = streams[i].min_bitrate_bps / 1000; |
342 sim_stream->targetBitrate = streams[i].target_bitrate_bps / 1000; | 342 sim_stream->targetBitrate = streams[i].target_bitrate_bps / 1000; |
343 sim_stream->maxBitrate = streams[i].max_bitrate_bps / 1000; | 343 sim_stream->maxBitrate = streams[i].max_bitrate_bps / 1000; |
344 sim_stream->qpMax = streams[i].max_qp; | 344 sim_stream->qpMax = streams[i].max_qp; |
345 sim_stream->numberOfTemporalLayers = static_cast<unsigned char>( | 345 sim_stream->numberOfTemporalLayers = static_cast<unsigned char>( |
346 streams[i].temporal_layer_thresholds_bps.size() + 1); | 346 streams[i].temporal_layer_thresholds_bps.size() + 1); |
347 | 347 |
348 video_codec.width = std::max(video_codec.width, | 348 video_codec.width = std::max(video_codec.width, |
349 static_cast<unsigned short>(streams[i].width)); | 349 static_cast<unsigned short>(streams[i].width)); |
350 video_codec.height = std::max( | 350 video_codec.height = std::max( |
351 video_codec.height, static_cast<unsigned short>(streams[i].height)); | 351 video_codec.height, static_cast<unsigned short>(streams[i].height)); |
352 video_codec.minBitrate = | 352 video_codec.minBitrate = |
353 std::min(video_codec.minBitrate, | 353 std::min(video_codec.minBitrate, |
354 static_cast<unsigned int>(streams[i].min_bitrate_bps / 1000)); | 354 static_cast<unsigned int>(streams[i].min_bitrate_bps / 1000)); |
355 video_codec.maxBitrate += streams[i].max_bitrate_bps / 1000; | 355 video_codec.maxBitrate += streams[i].max_bitrate_bps / 1000; |
356 video_codec.qpMax = std::max(video_codec.qpMax, | 356 video_codec.qpMax = std::max(video_codec.qpMax, |
357 static_cast<unsigned int>(streams[i].max_qp)); | 357 static_cast<unsigned int>(streams[i].max_qp)); |
358 } | 358 } |
359 | 359 |
360 // Set to zero to not update the bitrate controller from ViEEncoder, as | 360 // Set to zero to not update the bitrate controller from ViEEncoder, as |
361 // the bitrate controller is already set from Call. | 361 // the bitrate controller is already set from Call. |
362 video_codec.startBitrate = 0; | 362 video_codec.startBitrate = 0; |
363 | 363 |
364 DCHECK_GT(streams[0].max_framerate, 0); | 364 RTC_DCHECK_GT(streams[0].max_framerate, 0); |
365 video_codec.maxFramerate = streams[0].max_framerate; | 365 video_codec.maxFramerate = streams[0].max_framerate; |
366 | 366 |
367 if (!SetSendCodec(video_codec)) | 367 if (!SetSendCodec(video_codec)) |
368 return false; | 368 return false; |
369 | 369 |
370 // Clear stats for disabled layers. | 370 // Clear stats for disabled layers. |
371 for (size_t i = video_codec.numberOfSimulcastStreams; | 371 for (size_t i = video_codec.numberOfSimulcastStreams; |
372 i < config_.rtp.ssrcs.size(); ++i) { | 372 i < config_.rtp.ssrcs.size(); ++i) { |
373 stats_proxy_.OnInactiveSsrc(config_.rtp.ssrcs[i]); | 373 stats_proxy_.OnInactiveSsrc(config_.rtp.ssrcs[i]); |
374 } | 374 } |
375 | 375 |
376 DCHECK_GE(config.min_transmit_bitrate_bps, 0); | 376 RTC_DCHECK_GE(config.min_transmit_bitrate_bps, 0); |
377 vie_encoder_->SetMinTransmitBitrate(config.min_transmit_bitrate_bps / 1000); | 377 vie_encoder_->SetMinTransmitBitrate(config.min_transmit_bitrate_bps / 1000); |
378 | 378 |
379 encoder_config_ = config; | 379 encoder_config_ = config; |
380 use_config_bitrate_ = false; | 380 use_config_bitrate_ = false; |
381 return true; | 381 return true; |
382 } | 382 } |
383 | 383 |
384 bool VideoSendStream::DeliverRtcp(const uint8_t* packet, size_t length) { | 384 bool VideoSendStream::DeliverRtcp(const uint8_t* packet, size_t length) { |
385 return vie_channel_->ReceivedRTCPPacket(packet, length) == 0; | 385 return vie_channel_->ReceivedRTCPPacket(packet, length) == 0; |
386 } | 386 } |
(...skipping 21 matching lines...) Expand all Loading... |
408 RtpStateMap::iterator it = suspended_ssrcs_.find(ssrc); | 408 RtpStateMap::iterator it = suspended_ssrcs_.find(ssrc); |
409 if (it != suspended_ssrcs_.end()) | 409 if (it != suspended_ssrcs_.end()) |
410 vie_channel_->SetRtpStateForSsrc(ssrc, it->second); | 410 vie_channel_->SetRtpStateForSsrc(ssrc, it->second); |
411 } | 411 } |
412 | 412 |
413 if (config_.rtp.rtx.ssrcs.empty()) { | 413 if (config_.rtp.rtx.ssrcs.empty()) { |
414 return; | 414 return; |
415 } | 415 } |
416 | 416 |
417 // Set up RTX. | 417 // Set up RTX. |
418 DCHECK_EQ(config_.rtp.rtx.ssrcs.size(), config_.rtp.ssrcs.size()); | 418 RTC_DCHECK_EQ(config_.rtp.rtx.ssrcs.size(), config_.rtp.ssrcs.size()); |
419 for (size_t i = 0; i < config_.rtp.rtx.ssrcs.size(); ++i) { | 419 for (size_t i = 0; i < config_.rtp.rtx.ssrcs.size(); ++i) { |
420 uint32_t ssrc = config_.rtp.rtx.ssrcs[i]; | 420 uint32_t ssrc = config_.rtp.rtx.ssrcs[i]; |
421 vie_channel_->SetSSRC(config_.rtp.rtx.ssrcs[i], kViEStreamTypeRtx, | 421 vie_channel_->SetSSRC(config_.rtp.rtx.ssrcs[i], kViEStreamTypeRtx, |
422 static_cast<unsigned char>(i)); | 422 static_cast<unsigned char>(i)); |
423 RtpStateMap::iterator it = suspended_ssrcs_.find(ssrc); | 423 RtpStateMap::iterator it = suspended_ssrcs_.find(ssrc); |
424 if (it != suspended_ssrcs_.end()) | 424 if (it != suspended_ssrcs_.end()) |
425 vie_channel_->SetRtpStateForSsrc(ssrc, it->second); | 425 vie_channel_->SetRtpStateForSsrc(ssrc, it->second); |
426 } | 426 } |
427 | 427 |
428 DCHECK_GE(config_.rtp.rtx.payload_type, 0); | 428 RTC_DCHECK_GE(config_.rtp.rtx.payload_type, 0); |
429 vie_channel_->SetRtxSendPayloadType(config_.rtp.rtx.payload_type, | 429 vie_channel_->SetRtxSendPayloadType(config_.rtp.rtx.payload_type, |
430 config_.encoder_settings.payload_type); | 430 config_.encoder_settings.payload_type); |
431 } | 431 } |
432 | 432 |
433 std::map<uint32_t, RtpState> VideoSendStream::GetRtpStates() const { | 433 std::map<uint32_t, RtpState> VideoSendStream::GetRtpStates() const { |
434 std::map<uint32_t, RtpState> rtp_states; | 434 std::map<uint32_t, RtpState> rtp_states; |
435 for (size_t i = 0; i < config_.rtp.ssrcs.size(); ++i) { | 435 for (size_t i = 0; i < config_.rtp.ssrcs.size(); ++i) { |
436 uint32_t ssrc = config_.rtp.ssrcs[i]; | 436 uint32_t ssrc = config_.rtp.ssrcs[i]; |
437 rtp_states[ssrc] = vie_channel_->GetRtpStateForSsrc( ssrc); | 437 rtp_states[ssrc] = vie_channel_->GetRtpStateForSsrc( ssrc); |
438 } | 438 } |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 vie_channel_->IsSendingFecEnabled()); | 510 vie_channel_->IsSendingFecEnabled()); |
511 | 511 |
512 // Restart the media flow | 512 // Restart the media flow |
513 vie_encoder_->Restart(); | 513 vie_encoder_->Restart(); |
514 | 514 |
515 return true; | 515 return true; |
516 } | 516 } |
517 | 517 |
518 } // namespace internal | 518 } // namespace internal |
519 } // namespace webrtc | 519 } // namespace webrtc |
OLD | NEW |