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