| 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 12 matching lines...) Expand all Loading... |
| 23 : incoming_render_thread_(&IncomingVideoStreamThreadFun, | 23 : incoming_render_thread_(&IncomingVideoStreamThreadFun, |
| 24 this, | 24 this, |
| 25 "IncomingVideoStreamThread"), | 25 "IncomingVideoStreamThread"), |
| 26 deliver_buffer_event_(EventTimerWrapper::Create()), | 26 deliver_buffer_event_(EventTimerWrapper::Create()), |
| 27 external_callback_(callback), | 27 external_callback_(callback), |
| 28 render_buffers_(new VideoRenderFrames(delay_ms)) { | 28 render_buffers_(new VideoRenderFrames(delay_ms)) { |
| 29 RTC_DCHECK(external_callback_); | 29 RTC_DCHECK(external_callback_); |
| 30 | 30 |
| 31 render_thread_checker_.DetachFromThread(); | 31 render_thread_checker_.DetachFromThread(); |
| 32 | 32 |
| 33 deliver_buffer_event_->StartTimer(false, kEventStartupTimeMs); |
| 33 incoming_render_thread_.Start(); | 34 incoming_render_thread_.Start(); |
| 34 incoming_render_thread_.SetPriority(rtc::kRealtimePriority); | 35 incoming_render_thread_.SetPriority(rtc::kRealtimePriority); |
| 35 deliver_buffer_event_->StartTimer(false, kEventStartupTimeMs); | |
| 36 } | 36 } |
| 37 | 37 |
| 38 IncomingVideoStream::~IncomingVideoStream() { | 38 IncomingVideoStream::~IncomingVideoStream() { |
| 39 RTC_DCHECK(main_thread_checker_.CalledOnValidThread()); | 39 RTC_DCHECK(main_thread_checker_.CalledOnValidThread()); |
| 40 | 40 |
| 41 { | 41 { |
| 42 rtc::CritScope cs(&buffer_critsect_); | 42 rtc::CritScope cs(&buffer_critsect_); |
| 43 render_buffers_.reset(); | 43 render_buffers_.reset(); |
| 44 } | 44 } |
| 45 | 45 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 deliver_buffer_event_->StartTimer(false, wait_time); | 88 deliver_buffer_event_->StartTimer(false, wait_time); |
| 89 | 89 |
| 90 if (frame_to_render) { | 90 if (frame_to_render) { |
| 91 external_callback_->OnFrame(*frame_to_render); | 91 external_callback_->OnFrame(*frame_to_render); |
| 92 } | 92 } |
| 93 } | 93 } |
| 94 return true; | 94 return true; |
| 95 } | 95 } |
| 96 | 96 |
| 97 } // namespace webrtc | 97 } // namespace webrtc |
| OLD | NEW |