| 779 | } |
| 780 | |
| 781 | void OpenCLDepthPacketProcessor::process(const DepthPacket &packet) |
| 782 | { |
| 783 | if (!listener_) |
| 784 | return; |
| 785 | |
| 786 | if(!impl_->programInitialized && !impl_->initProgram()) |
| 787 | { |
| 788 | impl_->runtimeOk = false; |
| 789 | LOG_ERROR << "could not initialize OpenCLDepthPacketProcessor"; |
| 790 | return; |
| 791 | } |
| 792 | |
| 793 | impl_->startTiming(); |
| 794 | |
| 795 | impl_->ir_frame->timestamp = packet.timestamp; |
| 796 | impl_->depth_frame->timestamp = packet.timestamp; |
| 797 | impl_->ir_frame->sequence = packet.sequence; |
| 798 | impl_->depth_frame->sequence = packet.sequence; |
| 799 | |
| 800 | impl_->runtimeOk = impl_->run(packet); |
| 801 | |
| 802 | impl_->stopTiming(LOG_INFO); |
| 803 | |
| 804 | if (!impl_->runtimeOk) |
| 805 | { |
| 806 | impl_->ir_frame->status = 1; |
| 807 | impl_->depth_frame->status = 1; |
| 808 | } |
| 809 | |
| 810 | if(listener_->onNewFrame(Frame::Ir, impl_->ir_frame)) |
| 811 | impl_->newIrFrame(); |
| 812 | if(listener_->onNewFrame(Frame::Depth, impl_->depth_frame)) |
| 813 | impl_->newDepthFrame(); |
| 814 | } |
| 815 | |
| 816 | Allocator *OpenCLDepthPacketProcessor::getAllocator() |
| 817 | { |
nothing calls this directly
no test coverage detected