testcamera: open the camera using the highest framerate available
This commit is contained in:
parent
d4dc613559
commit
db43a6b418
1 changed files with 3 additions and 7 deletions
|
@ -97,13 +97,9 @@ int SDL_AppInit(void **appstate, int argc, char *argv[])
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_CameraSpec *pspec = NULL;
|
SDL_CameraSpec *pspec = &spec;
|
||||||
#if 0 /* just for edge-case testing purposes, ignore. */
|
spec.interval_numerator = 1000;
|
||||||
pspec = &spec;
|
spec.interval_denominator = 1;
|
||||||
spec.width = 100 /*1280 * 2*/;
|
|
||||||
spec.height = 100 /*720 * 2*/;
|
|
||||||
spec.format = SDL_PIXELFORMAT_YUY2 /*SDL_PIXELFORMAT_RGBA8888*/;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
camera = SDL_OpenCameraDevice(devid, pspec);
|
camera = SDL_OpenCameraDevice(devid, pspec);
|
||||||
if (!camera) {
|
if (!camera) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue