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 LOG(LS_INFO) << "VideoSendStream: " << config_.ToString(); |
120 RTC_DCHECK(!config_.rtp.ssrcs.empty()); | 121 RTC_DCHECK(!config_.rtp.ssrcs.empty()); |
121 RTC_CHECK(channel_group->CreateSendChannel( | 122 RTC_CHECK(channel_group->CreateSendChannel( |
122 channel_id_, &transport_adapter_, &stats_proxy_, | 123 channel_id_, &transport_adapter_, &stats_proxy_, |
123 config.pre_encode_callback, num_cpu_cores, config_)); | 124 config.pre_encode_callback, num_cpu_cores, config_)); |
124 vie_channel_ = channel_group_->GetChannel(channel_id_); | 125 vie_channel_ = channel_group_->GetChannel(channel_id_); |
125 vie_encoder_ = channel_group_->GetEncoder(channel_id_); | 126 vie_encoder_ = channel_group_->GetEncoder(channel_id_); |
126 | 127 |
127 for (size_t i = 0; i < config_.rtp.extensions.size(); ++i) { | 128 for (size_t i = 0; i < config_.rtp.extensions.size(); ++i) { |
128 const std::string& extension = config_.rtp.extensions[i].name; | 129 const std::string& extension = config_.rtp.extensions[i].name; |
129 int id = config_.rtp.extensions[i].id; | 130 int id = config_.rtp.extensions[i].id; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 vie_encoder_->SuspendBelowMinBitrate(); | 188 vie_encoder_->SuspendBelowMinBitrate(); |
188 | 189 |
189 vie_channel_->RegisterSendChannelRtcpStatisticsCallback(&stats_proxy_); | 190 vie_channel_->RegisterSendChannelRtcpStatisticsCallback(&stats_proxy_); |
190 vie_channel_->RegisterSendChannelRtpStatisticsCallback(&stats_proxy_); | 191 vie_channel_->RegisterSendChannelRtpStatisticsCallback(&stats_proxy_); |
191 vie_channel_->RegisterRtcpPacketTypeCounterObserver(&stats_proxy_); | 192 vie_channel_->RegisterRtcpPacketTypeCounterObserver(&stats_proxy_); |
192 vie_channel_->RegisterSendBitrateObserver(&stats_proxy_); | 193 vie_channel_->RegisterSendBitrateObserver(&stats_proxy_); |
193 vie_channel_->RegisterSendFrameCountObserver(&stats_proxy_); | 194 vie_channel_->RegisterSendFrameCountObserver(&stats_proxy_); |
194 } | 195 } |
195 | 196 |
196 VideoSendStream::~VideoSendStream() { | 197 VideoSendStream::~VideoSendStream() { |
| 198 LOG(LS_INFO) << "~VideoSendStream: " << config_.ToString(); |
197 vie_channel_->RegisterSendFrameCountObserver(nullptr); | 199 vie_channel_->RegisterSendFrameCountObserver(nullptr); |
198 vie_channel_->RegisterSendBitrateObserver(nullptr); | 200 vie_channel_->RegisterSendBitrateObserver(nullptr); |
199 vie_channel_->RegisterRtcpPacketTypeCounterObserver(nullptr); | 201 vie_channel_->RegisterRtcpPacketTypeCounterObserver(nullptr); |
200 vie_channel_->RegisterSendChannelRtpStatisticsCallback(nullptr); | 202 vie_channel_->RegisterSendChannelRtpStatisticsCallback(nullptr); |
201 vie_channel_->RegisterSendChannelRtcpStatisticsCallback(nullptr); | 203 vie_channel_->RegisterSendChannelRtcpStatisticsCallback(nullptr); |
202 | 204 |
203 // Remove capture input (thread) so that it's not running after the current | 205 // Remove capture input (thread) so that it's not running after the current |
204 // channel is deleted. | 206 // channel is deleted. |
205 input_.reset(); | 207 input_.reset(); |
206 | 208 |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 vie_channel_->IsSendingFecEnabled()); | 498 vie_channel_->IsSendingFecEnabled()); |
497 | 499 |
498 // Restart the media flow | 500 // Restart the media flow |
499 vie_encoder_->Restart(); | 501 vie_encoder_->Restart(); |
500 | 502 |
501 return true; | 503 return true; |
502 } | 504 } |
503 | 505 |
504 } // namespace internal | 506 } // namespace internal |
505 } // namespace webrtc | 507 } // namespace webrtc |
OLD | NEW |