1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-03 06:45:37 -08:00
Commit Graph

19 Commits

Author SHA1 Message Date
miod
0d6a2fdefd Constify struct {audio,midi,radio,video}_hw_if. No functional change.
ok mpi@ ratchov@ "More const is good" deraadt@
2022-03-21 19:22:39 +00:00
armani
9c924229fa Add VIDIOC_G_INPUT ioctl, some ports need it (at least ffmpeg)
ok ratchov@, sthen@, mpi@
2014-10-18 08:01:34 +00:00
jakemsr
c9ba893ebc support VIDIOC_S_PARM and VIDIOC_G_PARM. these ioctls are used for
setting and and getting the frame interval.
2011-03-26 08:13:05 +00:00
mglocker
2ee56f535d Add support for processing unit (e.g. brightness) controls. New V4L2
ioctls therefore are VIDIOC_QUERYCTRL, VIDIOC_G_CTRL, and VIDIOC_S_CTRL.
2008-08-24 11:05:02 +00:00
mglocker
12262cecf6 Add VIDIOC_ENUM_FRAMESIZES ioctl. This permits applications to query the
available formats and resolutions of a device (e.g. "luvcview -L").
2008-08-13 20:29:34 +00:00
mglocker
6e7dc0a31a - Don't relay on bFormatIndex as an internal array index, since this
field is unreliable and can start with any number.  Use an own internal
array index instead.

- If the read buffer is too small, return a propper error to the calling
functions.  Just check the buffer size if we use the read(2) method since
it doesn't affect mmap(2).

Fixes kernel crashes seen with the M$ LifeCam NX-6000 and internal
(laptop) Sonix chipsets.

Tested by jcs@ (Sonix) and myself (NX-6000).

OK deraadt@
2008-07-31 15:26:25 +00:00
mglocker
7dbc509f3b Add myself to the copyright since i fumbled around in those files, too.
OK robert@
2008-06-13 05:00:32 +00:00
robert
952b8b3eb0 implement the VIDIOC_STREAMOFF ioctl and remove some unused code 2008-06-11 01:27:30 +00:00
robert
6a4f627a4e add VIDIOC_QUERYCTRL to the supported ioctls 2008-06-10 23:39:01 +00:00
mglocker
321912b9c0 Let the driver switch between read() and mmap() depending on what
the userland application wants.

OK robert@
2008-06-09 20:51:31 +00:00
robert
0e1aed5ff4 Allocate the video buffer based on the maximum frame size that's reported
by the device instead of using the statically set VIDEO_BUF_SIZE.

ok mglocker@
2008-06-09 05:49:10 +00:00
mglocker
1dc1fa5ab5 Start to queue mmap frames. Add VIDIOC_QBUF, VIDIOC_DQBUF,
VIDIOC_STREAMON for that purpose, too.

OK robert@
2008-06-07 22:14:57 +00:00
robert
b645a1188b double the static video buffer size, because
the current one is not going to be enough for
some cams
2008-06-07 19:26:25 +00:00
mglocker
f7821c145f Add some first mmap bits.
Help by miod@
2008-06-05 20:50:28 +00:00
mglocker
fcb11141cc Allocate static buffer for software frame buffer and make sure to not
overflow it.
2008-05-30 06:37:38 +00:00
mglocker
0aa3ede660 Add more ioctl's (still unfinished); VIDIOC_ENUM_FMT, VIDIOC_ENUMINPUT,
VIDIOC_S_INPUT, VIDIOC_TRY_FMT.  Allows me at least to use a small V4L2
compatible webcam application to capture some images.
2008-05-26 17:51:18 +00:00
mglocker
d279d26da4 Spacing. Comments. strncpy() -> strlcpy(). 2008-05-25 07:47:47 +00:00
mglocker
dabf5a5ad5 - Enable userland to read(2) video stream from /dev/video.
- Prepare for mmap(2).
2008-05-24 19:37:34 +00:00
robert
cf110a4a61 Initial import for uvideo(4) and video(4):
uvideo(4) is a driver for USB video device class devices including webcams,
camcorders and other cameras.

video(4) is a device-independent layer that implements the V4L2 (Video for Linux Two)
API.

These drivers are *really* work in progress so don't even try to use them just yet,
because the driver still has some issues, even if it can be used to capture simple
MJPEG videos.

ok mglocker@, deraadt@
2008-04-09 19:49:55 +00:00