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