Open device; check capabilities
Check capabilities, print device info, and set input

Also try to capture
Write some kind of (possibly invalid) frame to a file
Print format "properly"
Put error-handling code first and deeper
Print pixelformat in a prettier way
Fix sizeimage indentation
Add whitespace and error messages
Put more error-handling code first and deeper
Use buffered I/O functions so we don't need to set perms
Write image in (raw) PPM format
Remove redundant casts to double
Do a bit of refactoring
Print file name
Ignore some files
Add print_info, create_grabber, and delete_grabber
Add grab
Add input_index parameter to print_info
Grab 20 frames and write them to files
Remove useless function