cannot send Unity messages when getting hololens video stream
Dear author,
Thank you for your great works. I got an error sending Unity message while getting Hololens video stream. If there is no video stream, message sending works for me. The main issue is that I cannot open video stream client and message client at the same time. There seems to be a conflict between these two clients.
Here is my C++ code:
std::unique_ptrhl2ss::rx_pv client_pv = hl2ss::lnm::rx_pv(host, hl2ss::stream_port::PERSONAL_VIDEO, pv_width, pv_height, pv_fps); std::unique_ptrhl2ss::mt::source source_pv = std::make_uniquehl2ss::mt::source(buffer_size*pv_fps, std::move(client_pv)); source_pv->start();
... std::unique_ptrhl2ss::ipc_umq client = hl2ss::lnm::ipc_umq(host, hl2ss::ipc_port::UNITY_MESSAGE_QUEUE); client->open();
error: Microsoft C++ exception: std::runtime_error at memory location 0x00000042C7AFFAE0. Unhandled exception at 0x00007FFFE529F6FE (ucrtbase.dll) in test_hololens.exe: Fatal program exit requested.
Can you add an C++ example of multi-threading for getting video stream and send messages at the same time? I really have no idea what to do with this error.
Than you very much.
Best regards
Hello, We have added an example: https://github.com/jdibenes/hl2ss/blob/004a8b0219b8c6e78452d9c380f49870f936a60b/extensions/client_cpp/main.cpp#L636 I was unable to reproduce the issue. The C++ client has been updated in recent days, please check that you're using the latest version of the client and server.
After updating the code to the latest version, this issue is solved. Thank you.