Get multiple SceneCapture simultaneously to be sent via TCP

scalabro12
Mon, 17 Apr 2023 18:21:22 +0000
Programming & Scripting

Hello there, I’m working on a multicamera system to get frames from Unreal, while receiving some states from a python server to update the pose.
My main bottleneck is how to handle multiple captures to be set simultaneously.

At the moment, I manage to send one texture coming from the render target as:

CAMERA->UpdateContent();
STATIC_TEXTURE = CAMERA->TextureTarget->ConstructTexture2D(this, "CameraImage", EObjectFlags::RF_NoFlags, CTF_DeferCompression);
CAMERA_BUFFERED_DATA = static_cast<const uint8*>(STATIC_TEXTURE ->GetPlatformData()->Mips[0].BulkData.LockReadOnly());
STATIC_TEXTURE ->GetPlatformData()->Mips[0].BulkData.Unlock();
//Unlocks the static texture to allow upadating

The data are then sent through the socket as:

PYTHON_SOCKET->Send(CAMERA_BUFFERED_DATA , OUTPUT_PACKET_SIZE, 0);

How can I send, as I said simultaneously, a second texture acquired in the same manner?

1 post - 1 participant