| 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 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 IncomingVideoStreamMap::const_iterator item = | 561 IncomingVideoStreamMap::const_iterator item = |
| 562 _streamRenderMap.find(streamId); | 562 _streamRenderMap.find(streamId); |
| 563 if (item == _streamRenderMap.end()) | 563 if (item == _streamRenderMap.end()) |
| 564 { | 564 { |
| 565 // This stream doesn't exist | 565 // This stream doesn't exist |
| 566 WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id, | 566 WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id, |
| 567 "%s: stream doesn't exist", __FUNCTION__); | 567 "%s: stream doesn't exist", __FUNCTION__); |
| 568 return -1; | 568 return -1; |
| 569 } | 569 } |
| 570 assert (item->second != NULL); | 570 assert (item->second != NULL); |
| 571 item->second->SetStartImage(videoFrame); | 571 return item->second->SetStartImage(videoFrame); |
| 572 return 0; | |
| 573 | 572 |
| 574 } | 573 } |
| 575 | 574 |
| 576 int32_t ModuleVideoRenderImpl::SetTimeoutImage(const uint32_t streamId, | 575 int32_t ModuleVideoRenderImpl::SetTimeoutImage(const uint32_t streamId, |
| 577 const VideoFrame& videoFrame, | 576 const VideoFrame& videoFrame, |
| 578 const uint32_t timeout) { | 577 const uint32_t timeout) { |
| 579 CriticalSectionScoped cs(&_moduleCrit); | 578 CriticalSectionScoped cs(&_moduleCrit); |
| 580 | 579 |
| 581 if (!_ptrRenderer) | 580 if (!_ptrRenderer) |
| 582 { | 581 { |
| 583 WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id, | 582 WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id, |
| 584 "%s: No renderer", __FUNCTION__); | 583 "%s: No renderer", __FUNCTION__); |
| 585 return -1; | 584 return -1; |
| 586 } | 585 } |
| 587 | 586 |
| 588 IncomingVideoStreamMap::const_iterator item = | 587 IncomingVideoStreamMap::const_iterator item = |
| 589 _streamRenderMap.find(streamId); | 588 _streamRenderMap.find(streamId); |
| 590 if (item == _streamRenderMap.end()) | 589 if (item == _streamRenderMap.end()) |
| 591 { | 590 { |
| 592 // This stream doesn't exist | 591 // This stream doesn't exist |
| 593 WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id, | 592 WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id, |
| 594 "%s: stream doesn't exist", __FUNCTION__); | 593 "%s: stream doesn't exist", __FUNCTION__); |
| 595 return -1; | 594 return -1; |
| 596 } | 595 } |
| 597 assert(item->second != NULL); | 596 assert(item->second != NULL); |
| 598 item->second->SetTimeoutImage(videoFrame, timeout); | 597 return item->second->SetTimeoutImage(videoFrame, timeout); |
| 599 return 0; | |
| 600 } | 598 } |
| 601 | 599 |
| 602 } // namespace webrtc | 600 } // namespace webrtc |
| OLD | NEW |