| 227 | |
| 228 | #ifdef OSVR_COMMON_IN_PROCESS_IMAGING |
| 229 | bool ImagingComponent::m_sendImageDataViaInProcessMemory( |
| 230 | OSVR_ImagingMetadata metadata, OSVR_ImageBufferElement *imageData, |
| 231 | OSVR_ChannelCount sensor, OSVR_TimeValue const ×tamp) { |
| 232 | |
| 233 | auto imageBufferSize = getBufferSize(metadata); |
| 234 | auto imageBufferCopy = reinterpret_cast<OSVR_ImageBufferElement*>(cv::fastMalloc(imageBufferSize)); |
| 235 | memcpy(imageBufferCopy, imageData, imageBufferSize); |
| 236 | |
| 237 | Buffer<> buf; |
| 238 | messages::ImagePlacedInProcessMemory::MessageSerialization serialization( |
| 239 | messages::InProcessMemoryMessage{ metadata, sensor, reinterpret_cast<int>(imageBufferCopy) }); |
| 240 | |
| 241 | serialize(buf, serialization); |
| 242 | m_getParent().packMessage( |
| 243 | buf, imagePlacedInProcessMemory.getMessageType(), timestamp); |
| 244 | |
| 245 | return true; |
| 246 | } |
| 247 | #endif |
| 248 | |
| 249 | bool ImagingComponent::m_sendImageDataViaSharedMemory( |
nothing calls this directly
no test coverage detected