How to use dwImageStreamerGL_initializeCrossProcess to send the DW_IMAGE_MEDIA to DW_IMAGE_CUDA

Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version
DRIVE OS Linux 5.2.6
DRIVE OS Linux 5.2.6 and DriveWorks 4.0
[×] DRIVE OS Linux 5.2.0
[×] DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version
other

Target Operating System
[×] Linux
QNX
other

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
[×] NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
other

SDK Manager Version
[×] 1.7.1.8928
other

Host Machine Version
[×] native Ubuntu 18.04
other

Hello Nvidia:
How to send a image (type = DW_IMAGE_MEDIA) to another process (type = DW_IMAGE_CUDA)?
The code in the drive works 3.5 file located at driveworks-3.5/samples/src/image/image_streamer_cross_process/main.c
I modify the code as : CHECK_DW_ERROR(dwImageStreamerGL_initializeCrossProcess(&m_streamerNVM2CUDA, &m_properties, DW_IMAGE_CUDA, {SOCK_NAME, crossProcessMode}, context));
failed at this line .
this parameter means :
|[in]|from The type of the source image and the expected image properties.
|[in]|to The type of the destination image.
|[in]|params Specifies the parameters for cross-process image streamer creation.
|[in]|ctx The DriveWorks context.

By the way can this function work on QNX ?

Thanks
bin

Dear @lb_tusimple,
If you want to stream Nvmedia to CUDA, please use dwImageStreamer_initializeCrossProcess . Note that dwImageStreamerGL_initializeCrossProcess is specific to GL.
Also, please check DriveWorks SDK Reference: Image Streamer Cross-Process and DriveWorks SDK Reference: Image

Hello SivaRamaKrishnaNV:
Yes I tried with CHECK_DW_ERROR(dwImageStreamer_initializeCrossProcess(&m_streamerNVM2CUDA,&m_properties, DW_IMAGE_CUDA,{SOCK_NAME, crossProcessMode},context)); Still failed.

So would you please to show me the sample code to transfer the images cross process to use zero-copy?

And did you try cross process on QNX?for now I do not have QNX version in office,QNX will be ready in two weeks for license.

Thanks
bin

Hi @lb_tusimple
Please share your code snippet, the log, and error messages.

For QNX, this is a forum for devzon releases (not including QNX). Please figure out your QNX support channel and check it with them. But if DriveWorks also works on DRIVE OS QNX, I think dwImageStreamer API should work on QNX too.

Hello VickNV:
The code is here basically from sample_image_streamer_cross,file located at my_prj/drive_works/driveworks-3.5/samples/src/image/image_streamer_cross_process.
Which I modified is :
(1) change all the dwImageStreamerGL_initializeCrossProcess to dwImageStreamer_initializeCrossProcess.
(2) change the param to DW_IMAGE_CUDA.
(3) dwImageProperties m_properties = {DW_IMAGE_NVMEDIA, WINDOW_WIDTH, WINDOW_HEIGHT, DW_IMAGE_FORMAT_RGBA_UINT8};
create a image with DW_IMAGE_NVMEDIA and send to DW_IMAGE_CUDA
Log is :
[24-02-2022 18:42:40] Initialize DriveWorks SDK v3.5.75
[24-02-2022 18:42:40] Release build with GNU 7.3.1 from heads/buildbrain-branch-0-gc61a9a35bd0 against Drive PDK v5.2.0.0
IPC child PID: [24-02-2022 18:42:40] Initialize DriveWorks VisualizationSDK v3.5.75
[24-02-2022 18:42:40] Initialize DriveWorksGL SDK v3.5.75
[24-02-2022 18:42:40] Driveworks exception thrown: DW_NOT_AVAILABLE: The requested cross-process streamer type is not available now

terminate called after throwing an instance of ‘std::runtime_error’
what(): [2022-02-24 18:42:40] DW Error DW_NOT_AVAILABLE executing DW function:
dwImageStreamer_initializeCrossProcess(&m_streamerNVM2GL, &m_properties, DW_IMAGE_CUDA, {SOCK_NAME, crossProcessMode}, context)
at /home/my_prj/drive_works/driveworks-3.5/samples/src/image/image_streamer_cross_process/main.cpp:169
Aborted

Code is here you can compile by replace the main.cpp in drive works 3.5 sample
main.cpp (8.9 KB)

Thanks
bin

NvMedia → CUDA in cross-process isn’t supported.
Please do NvMedia → NvMedia in cross-process and then NvMedia → CUDA on the consumer side.
Thanks.