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

Side by Side Diff: webrtc/video/video_send_stream.cc

Issue 1411723002: Move ownership of receive ViEChannel to VideoReceiveStream. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: pbos review 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
« no previous file with comments | « webrtc/video/video_receive_stream.cc ('k') | webrtc/video_engine/vie_channel_group.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 channel_id, num_cpu_cores, module_process_thread_, &stats_proxy_, 143 channel_id, num_cpu_cores, module_process_thread_, &stats_proxy_,
144 config.pre_encode_callback, channel_group_->pacer(), 144 config.pre_encode_callback, channel_group_->pacer(),
145 channel_group_->bitrate_allocator())); 145 channel_group_->bitrate_allocator()));
146 RTC_CHECK(vie_encoder_->Init()); 146 RTC_CHECK(vie_encoder_->Init());
147 147
148 vie_channel_.reset(new ViEChannel( 148 vie_channel_.reset(new ViEChannel(
149 num_cpu_cores, config.send_transport, module_process_thread_, 149 num_cpu_cores, config.send_transport, module_process_thread_,
150 channel_group_->GetRtcpIntraFrameObserver(), 150 channel_group_->GetRtcpIntraFrameObserver(),
151 channel_group_->GetBitrateController()->CreateRtcpBandwidthObserver(), 151 channel_group_->GetBitrateController()->CreateRtcpBandwidthObserver(),
152 transport_feedback_observer, 152 transport_feedback_observer,
153 channel_group_->GetRemoteBitrateEstimator(), 153 channel_group_->GetRemoteBitrateEstimator(false),
154 channel_group_->GetCallStats()->rtcp_rtt_stats(), channel_group_->pacer(), 154 channel_group_->GetCallStats()->rtcp_rtt_stats(), channel_group_->pacer(),
155 channel_group_->packet_router(), ssrcs.size(), true)); 155 channel_group_->packet_router(), ssrcs.size(), true));
156 RTC_CHECK(vie_channel_->Init() == 0); 156 RTC_CHECK(vie_channel_->Init() == 0);
157 157
158 vie_encoder_->StartThreadsAndSetSharedMembers( 158 vie_encoder_->StartThreadsAndSetSharedMembers(
159 vie_channel_->send_payload_router(), 159 vie_channel_->send_payload_router(),
160 vie_channel_->vcm_protection_callback()); 160 vie_channel_->vcm_protection_callback());
161 161
162 std::vector<uint32_t> first_ssrc(1, ssrcs[0]); 162 std::vector<uint32_t> first_ssrc(1, ssrcs[0]);
163 vie_encoder_->SetSsrcs(first_ssrc); 163 vie_encoder_->SetSsrcs(first_ssrc);
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 channel_group_->GetCallStats()->DeregisterStatsObserver( 251 channel_group_->GetCallStats()->DeregisterStatsObserver(
252 vie_channel_->GetStatsObserver()); 252 vie_channel_->GetStatsObserver());
253 channel_group_->SetChannelRembStatus(false, false, vie_channel_.get()); 253 channel_group_->SetChannelRembStatus(false, false, vie_channel_.get());
254 254
255 // Remove the feedback, stop all encoding threads and processing. This must be 255 // Remove the feedback, stop all encoding threads and processing. This must be
256 // done before deleting the channel. 256 // done before deleting the channel.
257 channel_group_->RemoveEncoder(vie_encoder_.get()); 257 channel_group_->RemoveEncoder(vie_encoder_.get());
258 vie_encoder_->StopThreadsAndRemoveSharedMembers(); 258 vie_encoder_->StopThreadsAndRemoveSharedMembers();
259 259
260 uint32_t remote_ssrc = vie_channel_->GetRemoteSSRC(); 260 uint32_t remote_ssrc = vie_channel_->GetRemoteSSRC();
261 channel_group_->GetRemoteBitrateEstimator()->RemoveStream(remote_ssrc); 261 channel_group_->GetRemoteBitrateEstimator(false)->RemoveStream(remote_ssrc);
262 } 262 }
263 263
264 VideoCaptureInput* VideoSendStream::Input() { 264 VideoCaptureInput* VideoSendStream::Input() {
265 return input_.get(); 265 return input_.get();
266 } 266 }
267 267
268 void VideoSendStream::Start() { 268 void VideoSendStream::Start() {
269 transport_adapter_.Enable(); 269 transport_adapter_.Enable();
270 vie_encoder_->Pause(); 270 vie_encoder_->Pause();
271 if (vie_channel_->StartSend() == 0) { 271 if (vie_channel_->StartSend() == 0) {
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 vie_channel_->IsSendingFecEnabled()); 547 vie_channel_->IsSendingFecEnabled());
548 548
549 // Restart the media flow 549 // Restart the media flow
550 vie_encoder_->Restart(); 550 vie_encoder_->Restart();
551 551
552 return true; 552 return true;
553 } 553 }
554 554
555 } // namespace internal 555 } // namespace internal
556 } // namespace webrtc 556 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/video_receive_stream.cc ('k') | webrtc/video_engine/vie_channel_group.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698