Why does create NvMedia consuming a long time on Drive PX2 target?

Hi Nvidia,

Recently we developed lane detection app on Drive PX2 device and found the critical issue that initialized NvMedia part consuming a long time, we can see the following running log.

Initialize DriveWorks SDK v0.3.422
Release build with GNU 4.9.2 from v0.3.1-rc2-0-g0475f26 against PDK v4.1.6.3
SDK: Resources mounted from /usr/local/driveworks-0.3/data/resources
SDK: Create NvMediaDevice
egl::Display: found 2 EGL devices
egl::Display: use drm device: drm-nvdc
SDK: dGPU has been detected as device number 0
SDK: iGPU has been detected as device number 1
SDK: Default GPU Device set to device number 0
Program Arguments:
–camera-index=0
–camera-type=ar0231
–csi-port=ab
–fov=60
–height=576
–input-type=video
–offscreen=0
–slave=0
–stopFrame=2205
–threshold-lanenet=0.3
–video=…/data/video_lane.h264
–width=960

Initialize DriveWorks SDK v0.3.422
Release build with GNU 4.9.2 from v0.3.1-rc2-0-g0475f26 against PDK v4.1.6.3
SDK: Resource failed to mount from ‘…/data/resources’: VirtualFileSystem: A virtual file system has already been opened with different parameters
SDK: Resources mounted from /usr/local/driveworks-0.3/data/resources
SDK: Create NvMediaDevice
SDK: use EGL display as provided
SDK: dGPU has been detected as device number 0
SDK: iGPU has been detected as device number 1
SDK: Default GPU Device set to device number 0
SAL: identified board as DrivePX2-TegraA

After displayed below log,
“SDK: Resources mounted from /usr/local/driveworks-0.3/data/resources”
we need to wait for a long time ,then could see the next log
“SDK: Create NvMediaDevice”

Could you provide some suggestions to us how to call NvMedia on Drive PX2? or why app block here?

Another, could you share some about NvMedia docs to us?

Thanks.
Hu Xingui

Dear sarveshd,

Could you please update DrivePX2 SDK and Aurix FW?
The DriveWorks 0.3 is old version. We had posted NVIDIA DRIVE 5.0.5.0 (DriveWorks 0.6). Thanks.

Hi,SteveNV

We are used Nsight to building sample code on host envitonment configuration.
After success compiled,we run the sample on Nsight failed.
The Console message show:

Initialize DriveWorks SDK v0.6.54
Release build with GNU 4.8.5 from v0.6.0-rc5-0-g3f25786
TimeSource: monotonic epoch time offset is 1527983966403764
SDK: Resource failed to mount from ‘@DRIVEWORKS_DATAPATH@/resources’: VirtualFileSystem: Failed to mount ‘@DRIVEWORKS_DATAPATH@/resources[.pak]’
SDK: Resources mounted from /usr/local/driveworks-0.6/data/resources
SDK: Default GPU Device set to device number 0. Total number of devices detected: 1
SensorFactory::createSensor() → camera.virtual, stopFrame=0,video=@DRIVEWORKS_DATAPATH@/samples/raw/rccb.raw
Driveworks exception thrown: DW_SAL_CANNOT_CREATE_SENSOR: CameraRAW: cannot open file

terminate called after throwing an instance of ‘std::runtime_error’
what(): DW Error DW_SAL_CANNOT_CREATE_SENSOR executing DW function:
dwSAL_createSensor(&m_sensor, params, m_sal)
at /usr/local/driveworks-0.6/samples-test/src/framework/SimpleCamera.cpp:48

But we can specify the video path and run sample on terminal.
How to fix “VirtualFileSystem: Failed to mount”? Thanks.

Dear yurui,

Could you check check if the file(rccb.raw) is in that location(@DRIVEWORKS_DATAPATH@/samples/raw)?
or please try to run the sample with file option like “Sample --video=/home/xxx/xxx/raw/rccb.raw”. Thanks.

Hi,SteveNV

I tried your suggestion,but didn’t work.
Finally, I reopened a new project to solve it.

Thanks for getting back to me.