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