| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 DeliverFrame(video_frame); | 83 DeliverFrame(video_frame); |
| 84 } else { | 84 } else { |
| 85 rtc::CritScope csB(&buffer_critsect_); | 85 rtc::CritScope csB(&buffer_critsect_); |
| 86 if (render_buffers_->AddFrame(video_frame) == 1) { | 86 if (render_buffers_->AddFrame(video_frame) == 1) { |
| 87 deliver_buffer_event_->Set(); | 87 deliver_buffer_event_->Set(); |
| 88 } | 88 } |
| 89 } | 89 } |
| 90 return 0; | 90 return 0; |
| 91 } | 91 } |
| 92 | 92 |
| 93 void IncomingVideoStream::SetStartImage(const VideoFrame& video_frame) { | 93 int32_t IncomingVideoStream::SetStartImage(const VideoFrame& video_frame) { |
| 94 rtc::CritScope csS(&thread_critsect_); | 94 rtc::CritScope csS(&thread_critsect_); |
| 95 start_image_.CopyFrame(video_frame); | 95 return start_image_.CopyFrame(video_frame); |
| 96 } | 96 } |
| 97 | 97 |
| 98 void IncomingVideoStream::SetTimeoutImage(const VideoFrame& video_frame, | 98 int32_t IncomingVideoStream::SetTimeoutImage(const VideoFrame& video_frame, |
| 99 const uint32_t timeout) { | 99 const uint32_t timeout) { |
| 100 rtc::CritScope csS(&thread_critsect_); | 100 rtc::CritScope csS(&thread_critsect_); |
| 101 timeout_time_ = timeout; | 101 timeout_time_ = timeout; |
| 102 timeout_image_.CopyFrame(video_frame); | 102 return timeout_image_.CopyFrame(video_frame); |
| 103 } | 103 } |
| 104 | 104 |
| 105 void IncomingVideoStream::SetRenderCallback( | 105 void IncomingVideoStream::SetRenderCallback( |
| 106 VideoRenderCallback* render_callback) { | 106 VideoRenderCallback* render_callback) { |
| 107 rtc::CritScope cs(&thread_critsect_); | 107 rtc::CritScope cs(&thread_critsect_); |
| 108 render_callback_ = render_callback; | 108 render_callback_ = render_callback; |
| 109 } | 109 } |
| 110 | 110 |
| 111 int32_t IncomingVideoStream::SetExpectedRenderDelay( | 111 int32_t IncomingVideoStream::SetExpectedRenderDelay( |
| 112 int32_t delay_ms) { | 112 int32_t delay_ms) { |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 external_callback_->RenderFrame(stream_id_, video_frame); | 250 external_callback_->RenderFrame(stream_id_, video_frame); |
| 251 } else if (render_callback_) { | 251 } else if (render_callback_) { |
| 252 render_callback_->RenderFrame(stream_id_, video_frame); | 252 render_callback_->RenderFrame(stream_id_, video_frame); |
| 253 } | 253 } |
| 254 | 254 |
| 255 // We're done with this frame. | 255 // We're done with this frame. |
| 256 last_render_time_ms_ = video_frame.render_time_ms(); | 256 last_render_time_ms_ = video_frame.render_time_ms(); |
| 257 } | 257 } |
| 258 | 258 |
| 259 } // namespace webrtc | 259 } // namespace webrtc |
| OLD | NEW |