Commit 0c4e52ce authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

v4l2 access: setup the picture format (like the v4l2 demux)

If specific dimensions were specified, use that (like PVR).
Otherwise, try to find the best dimensions.

Previously, the current/default settings were always used.
parent cfb23eb2
...@@ -114,9 +114,11 @@ int InitVideo (access_t *access, int fd, uint32_t caps) ...@@ -114,9 +114,11 @@ int InitVideo (access_t *access, int fd, uint32_t caps)
return -1; return -1;
} }
/* Print extra info */ struct v4l2_streamparm parm;
msg_Dbg (access, "%d bytes maximum for complete image", if (SetupFormat (access, fd, fmt.fmt.pix.pixelformat, &fmt, &parm))
fmt.fmt.pix.sizeimage ); return -1;
msg_Dbg (access, "%"PRIu32" bytes for complete image", fmt.fmt.pix.sizeimage);
/* Check interlacing */ /* Check interlacing */
switch (fmt.fmt.pix.field) switch (fmt.fmt.pix.field)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment