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

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

Issue 2146883002: Avoid race in VideoReceiveStream shutdown (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: JitterBuffer not resetting frame buffers on Stop Created 4 years, 5 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) 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 // Register the channel to receive stats updates. 260 // Register the channel to receive stats updates.
261 call_stats_->RegisterStatsObserver(video_stream_decoder_.get()); 261 call_stats_->RegisterStatsObserver(video_stream_decoder_.get());
262 // Start the decode thread 262 // Start the decode thread
263 decode_thread_.Start(); 263 decode_thread_.Start();
264 decode_thread_.SetPriority(rtc::kHighestPriority); 264 decode_thread_.SetPriority(rtc::kHighestPriority);
265 rtp_stream_receiver_.StartReceive(); 265 rtp_stream_receiver_.StartReceive();
266 } 266 }
267 267
268 void VideoReceiveStream::Stop() { 268 void VideoReceiveStream::Stop() {
269 rtp_stream_receiver_.StopReceive(); 269 rtp_stream_receiver_.StopReceive();
270 video_receiver_.TriggerDecoderShutdown(); 270 video_receiver_.TriggerDecoderShutdown(); // Releases waiting decoder thread.
pbos-webrtc 2016/07/13 16:43:05 Put something to the effect of this making decode_
sprang_webrtc 2016/07/13 16:51:32 Done.
271 decode_thread_.Stop(); 271 decode_thread_.Stop();
272 call_stats_->DeregisterStatsObserver(video_stream_decoder_.get()); 272 call_stats_->DeregisterStatsObserver(video_stream_decoder_.get());
273 video_stream_decoder_.reset(); 273 video_stream_decoder_.reset();
274 incoming_video_stream_.reset(); 274 incoming_video_stream_.reset();
275 transport_adapter_.Disable(); 275 transport_adapter_.Disable();
276 } 276 }
277 277
278 void VideoReceiveStream::SetSyncChannel(VoiceEngine* voice_engine, 278 void VideoReceiveStream::SetSyncChannel(VoiceEngine* voice_engine,
279 int audio_channel_id) { 279 int audio_channel_id) {
280 if (voice_engine && audio_channel_id != -1) { 280 if (voice_engine && audio_channel_id != -1) {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 const std::vector<uint16_t>& sequence_numbers) { 359 const std::vector<uint16_t>& sequence_numbers) {
360 rtp_stream_receiver_.RequestPacketRetransmit(sequence_numbers); 360 rtp_stream_receiver_.RequestPacketRetransmit(sequence_numbers);
361 } 361 }
362 362
363 void VideoReceiveStream::RequestKeyFrame() { 363 void VideoReceiveStream::RequestKeyFrame() {
364 rtp_stream_receiver_.RequestKeyFrame(); 364 rtp_stream_receiver_.RequestKeyFrame();
365 } 365 }
366 366
367 } // namespace internal 367 } // namespace internal
368 } // namespace webrtc 368 } // namespace webrtc
OLDNEW
« webrtc/modules/video_coding/jitter_buffer.cc ('K') | « webrtc/modules/video_coding/jitter_buffer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698