Opencv 3.4.4 Error

Hello Everyone.

I am running a code for detection of a aurco marker in C++. It is able to compile properly but when I run the code it comes the following error:(Project: 23857): GStreamer -CRITICAL **: gst_element_get_state: assertion ‘GST_ELEMENT (element)’ failed.
VIDEOIO ERROR: V4L: can’t open camera by index 1.
In addition to it, I tried using index as 0 but still, I am not able to open the camera of Jetson board. But, I checked the camera is working using the camera :nvgstcapture.
I will be grateful for the solution.

Onboard camera should use nvarguscamerasrc(or nvcamerasrc). Please refer to

The examples run nvcamerasrc, which is deprecated in r32 release. Please use nvarguscamerasrc instead.

Thanks for your advise.It works the camera now.!