I am currently developing an app using nSight with remote development setup which utilizes a webcam.
For my local machine opencv can open the camera with
VideoCapture cap(0); // open the default camera
however the remote tx2 board has to call differently as follows
const string gst = "nvcamerasrc ! video/x-raw(memory:NVMM), width=(int)1180, height=(int)720, format=(string)I420, framerate=(fraction)24/1 ! nvvidconv flip-method=6 ! video/x-raw, format=(string)I420 ! videoconvert ! video/x-raw, format=(string)BGR ! appsink"; VideoCapture cap(gst); // open the default camera
So every time I switch build machine over to another, I have to comment out each section vice versa which is quite annoying process.
Is there a simpler way of setting conditional #define for Local and Remote specifically in nSight?