get camera data without enabling the window

Hello everyone,
I am dealing with the camera work,and I have made sample_camera_multiple_gmsl work successfully, and when it starts, it will enable the windows showing the camera image. But I want to get the camera data and send it out directly without showing the window, so I changed the code and found that it crashed because of “initGL(&window)”.
Could anyone tell me how to change the code to get the camera data without initGL? and why it must do “initGL”?
Thanks very much!!

hello sunyongjian,

could you please try with nvmedia,
please access NVIDIA DRIVE PX 2 Developer Kit Documentation, and refer to [DRIVE 5.0 Linux Open Source Software]-> [Development Guide]-> [NvMedia Sample Applications]
you should be able to found these samples as below, thanks