| 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 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 IncomingVideoStreamMap::const_iterator item = | 784 IncomingVideoStreamMap::const_iterator item = |
| 785 _streamRenderMap.find(streamId); | 785 _streamRenderMap.find(streamId); |
| 786 if (item == _streamRenderMap.end()) | 786 if (item == _streamRenderMap.end()) |
| 787 { | 787 { |
| 788 // This stream doesn't exist | 788 // This stream doesn't exist |
| 789 WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id, | 789 WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id, |
| 790 "%s: stream doesn't exist", __FUNCTION__); | 790 "%s: stream doesn't exist", __FUNCTION__); |
| 791 return -1; | 791 return -1; |
| 792 } | 792 } |
| 793 assert (item->second != NULL); | 793 assert (item->second != NULL); |
| 794 item->second->SetStartImage(videoFrame); | 794 return item->second->SetStartImage(videoFrame); |
| 795 return 0; | |
| 796 | 795 |
| 797 } | 796 } |
| 798 | 797 |
| 799 int32_t ModuleVideoRenderImpl::SetTimeoutImage(const uint32_t streamId, | 798 int32_t ModuleVideoRenderImpl::SetTimeoutImage(const uint32_t streamId, |
| 800 const VideoFrame& videoFrame, | 799 const VideoFrame& videoFrame, |
| 801 const uint32_t timeout) { | 800 const uint32_t timeout) { |
| 802 CriticalSectionScoped cs(&_moduleCrit); | 801 CriticalSectionScoped cs(&_moduleCrit); |
| 803 | 802 |
| 804 if (!_ptrRenderer) | 803 if (!_ptrRenderer) |
| 805 { | 804 { |
| 806 WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id, | 805 WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id, |
| 807 "%s: No renderer", __FUNCTION__); | 806 "%s: No renderer", __FUNCTION__); |
| 808 return -1; | 807 return -1; |
| 809 } | 808 } |
| 810 | 809 |
| 811 IncomingVideoStreamMap::const_iterator item = | 810 IncomingVideoStreamMap::const_iterator item = |
| 812 _streamRenderMap.find(streamId); | 811 _streamRenderMap.find(streamId); |
| 813 if (item == _streamRenderMap.end()) | 812 if (item == _streamRenderMap.end()) |
| 814 { | 813 { |
| 815 // This stream doesn't exist | 814 // This stream doesn't exist |
| 816 WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id, | 815 WEBRTC_TRACE(kTraceError, kTraceVideoRenderer, _id, |
| 817 "%s: stream doesn't exist", __FUNCTION__); | 816 "%s: stream doesn't exist", __FUNCTION__); |
| 818 return -1; | 817 return -1; |
| 819 } | 818 } |
| 820 assert(item->second != NULL); | 819 assert(item->second != NULL); |
| 821 item->second->SetTimeoutImage(videoFrame, timeout); | 820 return item->second->SetTimeoutImage(videoFrame, timeout); |
| 822 return 0; | |
| 823 } | 821 } |
| 824 | 822 |
| 825 } // namespace webrtc | 823 } // namespace webrtc |
| OLD | NEW |