Chromium Code Reviews| 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 int32_t IncomingVideoStream::SetStartImage(const VideoFrame& video_frame) { | 93 int32_t IncomingVideoStream::SetStartImage(const VideoFrame& video_frame) { |
|
pbos-webrtc
2016/02/09 15:18:14
Can we make this void?
nisse-webrtc
2016/02/09 15:31:33
Maybe. I have no idea what this code does or from
pbos-webrtc
2016/02/09 15:36:10
All of our error codes were int32 historically. We
| |
| 94 rtc::CritScope csS(&thread_critsect_); | 94 rtc::CritScope csS(&thread_critsect_); |
| 95 return start_image_.CopyFrame(video_frame); | 95 start_image_.CopyFrame(video_frame); |
| 96 return 0; | |
| 96 } | 97 } |
| 97 | 98 |
| 98 int32_t IncomingVideoStream::SetTimeoutImage(const VideoFrame& video_frame, | 99 int32_t IncomingVideoStream::SetTimeoutImage(const VideoFrame& video_frame, |
| 99 const uint32_t timeout) { | 100 const uint32_t timeout) { |
| 100 rtc::CritScope csS(&thread_critsect_); | 101 rtc::CritScope csS(&thread_critsect_); |
| 101 timeout_time_ = timeout; | 102 timeout_time_ = timeout; |
| 102 return timeout_image_.CopyFrame(video_frame); | 103 timeout_image_.CopyFrame(video_frame); |
| 104 return 0; | |
| 103 } | 105 } |
| 104 | 106 |
| 105 void IncomingVideoStream::SetRenderCallback( | 107 void IncomingVideoStream::SetRenderCallback( |
| 106 VideoRenderCallback* render_callback) { | 108 VideoRenderCallback* render_callback) { |
| 107 rtc::CritScope cs(&thread_critsect_); | 109 rtc::CritScope cs(&thread_critsect_); |
| 108 render_callback_ = render_callback; | 110 render_callback_ = render_callback; |
| 109 } | 111 } |
| 110 | 112 |
| 111 int32_t IncomingVideoStream::SetExpectedRenderDelay( | 113 int32_t IncomingVideoStream::SetExpectedRenderDelay( |
| 112 int32_t delay_ms) { | 114 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); | 252 external_callback_->RenderFrame(stream_id_, video_frame); |
| 251 } else if (render_callback_) { | 253 } else if (render_callback_) { |
| 252 render_callback_->RenderFrame(stream_id_, video_frame); | 254 render_callback_->RenderFrame(stream_id_, video_frame); |
| 253 } | 255 } |
| 254 | 256 |
| 255 // We're done with this frame. | 257 // We're done with this frame. |
| 256 last_render_time_ms_ = video_frame.render_time_ms(); | 258 last_render_time_ms_ = video_frame.render_time_ms(); |
| 257 } | 259 } |
| 258 | 260 |
| 259 } // namespace webrtc | 261 } // namespace webrtc |
| OLD | NEW |