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