APPENDIX C

image

Video Capturing

Listing C-1 provides the complete code discussed in the “A Program for Capturing Video” section in Chapter 7. The parts required by webcam C270 are highlighted in bold.

Listing C-1. galileo_video_capture.c

/* *  V4L2 video capture example * *  This program can be used and distributed without restrictions. * *      This program is provided with the V4L2 API * see http://linuxtv.org/docs.php for more information */#include <stdio.h>#include <stdlib.h>#include <string.h>#include <assert.h>#include <getopt.h>             /* getopt_long() */#include <fcntl.h>              /* low-level i/o */#include <unistd.h>#include <errno.h> ...

Get Intel® Galileo and Intel® Galileo Gen 2: API Features and Arduino Projects for Linux Programmers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.