NvVideoEncoder: reason of error

Hello!
According to NvVideoEncoder.h functions return zero at success and -1 at error.
Question - how can I found reason of error, e.g. setCapturePlaneFormat() return -1? Can I use errno for this?
Thank you.

Hi,
Please install the samples via sdkmanager and check/run 01_video_encode for more information.