| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 184   DCHECK(!remb_->InUse()); | 184   DCHECK(!remb_->InUse()); | 
| 185   DCHECK(vie_encoder_map_.empty()); | 185   DCHECK(vie_encoder_map_.empty()); | 
| 186 } | 186 } | 
| 187 | 187 | 
| 188 bool ChannelGroup::CreateSendChannel(int channel_id, | 188 bool ChannelGroup::CreateSendChannel(int channel_id, | 
| 189                                      int engine_id, | 189                                      int engine_id, | 
| 190                                      Transport* transport, | 190                                      Transport* transport, | 
| 191                                      int number_of_cores, | 191                                      int number_of_cores, | 
| 192                                      const std::vector<uint32_t>& ssrcs) { | 192                                      const std::vector<uint32_t>& ssrcs) { | 
| 193   DCHECK(!ssrcs.empty()); | 193   DCHECK(!ssrcs.empty()); | 
| 194   rtc::scoped_ptr<ViEEncoder> vie_encoder(new ViEEncoder( | 194   rtc::scoped_ptr<ViEEncoder> vie_encoder( | 
| 195       channel_id, number_of_cores, *process_thread_, pacer_.get(), | 195       new ViEEncoder(channel_id, number_of_cores, *process_thread_, | 
| 196       bitrate_allocator_.get(), bitrate_controller_.get())); | 196                      pacer_.get(), bitrate_allocator_.get())); | 
| 197   if (!vie_encoder->Init()) { | 197   if (!vie_encoder->Init()) { | 
| 198     return false; | 198     return false; | 
| 199   } | 199   } | 
| 200   ViEEncoder* encoder = vie_encoder.get(); | 200   ViEEncoder* encoder = vie_encoder.get(); | 
| 201   if (!CreateChannel(channel_id, engine_id, transport, number_of_cores, | 201   if (!CreateChannel(channel_id, engine_id, transport, number_of_cores, | 
| 202                      vie_encoder.release(), ssrcs.size(), true)) { | 202                      vie_encoder.release(), ssrcs.size(), true)) { | 
| 203     return false; | 203     return false; | 
| 204   } | 204   } | 
| 205   ViEChannel* channel = channel_map_[channel_id]; | 205   ViEChannel* channel = channel_map_[channel_id]; | 
| 206   // Connect the encoder with the send packet router, to enable sending. | 206   // Connect the encoder with the send packet router, to enable sending. | 
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 363     rtc::CritScope lock(&encoder_map_crit_); | 363     rtc::CritScope lock(&encoder_map_crit_); | 
| 364     for (const auto& encoder : vie_encoder_map_) | 364     for (const auto& encoder : vie_encoder_map_) | 
| 365       pad_up_to_bitrate_bps += encoder.second->GetPaddingNeededBps(); | 365       pad_up_to_bitrate_bps += encoder.second->GetPaddingNeededBps(); | 
| 366   } | 366   } | 
| 367   pacer_->UpdateBitrate( | 367   pacer_->UpdateBitrate( | 
| 368       target_bitrate_bps / 1000, | 368       target_bitrate_bps / 1000, | 
| 369       PacedSender::kDefaultPaceMultiplier * target_bitrate_bps / 1000, | 369       PacedSender::kDefaultPaceMultiplier * target_bitrate_bps / 1000, | 
| 370       pad_up_to_bitrate_bps / 1000); | 370       pad_up_to_bitrate_bps / 1000); | 
| 371 } | 371 } | 
| 372 }  // namespace webrtc | 372 }  // namespace webrtc | 
| OLD | NEW | 
|---|