Sal_handle_ and context_handle_ for multiple cameras in Drive OS 5.2.0

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.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

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

Hi!

I’m writing an application that runs multiple gmsl cameras, my code fails here:
NvMediaStatus nvStatus = NvMediaIJPEFeedFrame(camera.NvMediaIjpe, image_nvmedia->img, 70);

NvMediaIJPEFeedFrame() failed: 1

This only happens when I try to run 2 or more cameras, and the error appears with the second camera. I understand that for DriveWorks 3.5 each camera requires a different sensor handle (4 Camera setup with dwSensorHandle_t only finds 1)
I initialize the ContextHandle and then the Sal_Handle, I use the same Sal_Handle to create all the sensor:
result = dwSAL_createSensor(&sensor_handle, sensor_params, sal);
I wonder if this is the problem or could be causing the NVMediaIJPEFeedFrame to fail?

Thanks

Dear @jber4282,
Each camera is expected to have seperate dwSensorHandle_t handle. Could you check DW’s sample_camera code sample for your use case.

The error code indicates NvMediaIJPEFeedFrame is fed with bad parameter.

Hi @SivaRamaKrishnaNV

I have a separate dwSensorHandle_t for each camera, my code is consistant with the sample_camera at the moment. I just don’t know yet what’s the meaning of the error “1” in NvMediaIJPEFeedFrame().

It passes, dwSensorCamera_readFrame, dwSensorCamera_getImage, dwImage_create, dwImage_copyConvert, dwSensorCamera_returnFrame, dwImage_getTimestamp, dwImage_getNvMedia, but when it reach to NvMediaIJPEFeedFrame the code fails.

Dear @jber4282,
Like I said earlier, it indicates bad paramter pass(NVIDIA DRIVE OS Linux SDK API Reference: Basic NvMedia Types and Structures | NVIDIA Docs).

sample_camera works with 2 cameras and I don’t see it using all the mentioned functions. What is your use case.

I need trying to compress the images also, that’s why I need that pipeline.

Dear @jber4282,
What is the format conversion you are looking? Are you using NvMediaIJPEFeedFrame explicitly in your code or it is from DW APIs internally? Is it possible to share code some snippet?

@SivaRamaKrishnaNV It’s solved. I had a problem in my code where I was not starting the second camera.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.