-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix buggy behavior introduced when using Go stdlib's os.OpenFile which caused some devices to report busy Add more aggressive ioctl error handling for v4l2 calls including open, QBUF, DQBUFF, etc Testing using Raspberry Pi's HD camera modules directly Documentation updates
- Loading branch information
1 parent
d76b80b
commit 4a9080e
Showing
9 changed files
with
655 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# V4L2 video capture example in C | ||
|
||
This an example in C showing a minimally required steps to capture video using V4L2. This is can be used to run tests on devices and compare results with the Go4VL code. | ||
|
||
## Build and run | ||
On a Linux machine, run the following: | ||
|
||
``` | ||
gcc -o capture capture.c | ||
``` | ||
|
||
Run the program using: | ||
|
||
``` | ||
./capture | ||
``` | ||
|
||
Or, run `--help` to see available flags: | ||
|
||
``` | ||
./capture --help | ||
``` | ||
|
||
## Debugging with `strace` | ||
|
||
To view the ioctl calls made when running the capture program: | ||
|
||
``` | ||
strace -o trace.log -e trace=ioctl ./capture | ||
``` |
Oops, something went wrong.