having problem in compiling video capture file

Following is the error what I am getting…

Debug: Creating video thread
Press Ctrl-C to exit
Debug: Initializing video capture device: /dev/video0
Debug: Video capture device opened with file descriptor: 4
Current input: Camera 1
Error: Setting AutoGain failed
Debug: Format 1498831189 (0x59565955) UYVY
Error: VIDIOC_S_FMT failed on file descriptor 4
Error: Failed video_input_setup in video_thread_function
Debug: Starting video thread cleanup to return resources to system
Debug: Closing output file at FILE * 0x12008
Debug: Video thread cleanup complete. Exiting video_thread_fxn

please let me know how to solve the same
with regards

Seems you have to provide correct configuration values what your camera/senor module supports

fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_UYVY;
fmt.fmt.pix.field = V4L2_FIELD_NONE;

fmt.fmt.pix.width = *captureWidthByRef;
fmt.fmt.pix.height = *captureHeightByRef;

These are the parameters you pass in file for S_FMT
Check if the Height, width UYVY pix format is supported
Could you give more details of the camera you have and the driver?

is it a USB camera?
Which driver does this camera use?

Can u mention the source where u downloaded the driver source or share the driver?
The issue can be solved easily just by looking into the driver.