So you want to capture video from an actual camera?
Yes, there are libraries for this. There are also many programs that are under various free licenses that would do the job. You can look at their code and see what they are using (Though many fully fledged projects like that are going to be mixed language, or tend to use GObject which I just find frustrating)
VXL - similar idea to openCV, useful if your program is going to do some heavy processing on each image. Tutorial: Uh, there's an entire book, didn't find a short and simple tut. https://vxl.github.io/
probably work better if you search stream capture instead of screen capture :)
a lot of this will be done for you in hardware, I would think.
the process in a nutshell is:
capture a still frame, encode/compress it into a stream
but you should be able to get it as a stream from the device. Once you have the stream, a library should let you make a video file or pass it on as a stream over a network or just display and discard, etc. Are you wanting to post-process or just save/display/forward the stream?