summaryrefslogtreecommitdiff
path: root/app/video
AgeCommit message (Collapse)Author
2021-10-25Remove 3rd argument to open() when flags don't include O_CREATMatthieu Herrb
ok deraadt@ ian@
2021-02-16Also call the VIDIOC_STREAMOFF ioctl when we stop a read(2) stream. ThisMarcus Glocker
is required by the new video(4) multiopen functionality.
2020-09-07Add control for backlight compensation (V4L2_CID_BACKLIGHT_COMPENSATION).Marcus Glocker
From Laurence Tratt <laurie (at) tratt (dot) net>
2020-08-29Be consistent with control value output; ':' -> '='.Marcus Glocker
From Laurence Tratt <laurie (at) tratt (dot) net>
2020-08-23Allow auto controls to be set back to auto mode explicitly.Marcus Glocker
From Laurence Tratt <laurie (at) tratt (dot) net>
2020-08-11Allow the combination of '-dc' options, reset and display control values.Marcus Glocker
Reported by Laurence Tratt.
2020-08-09Remove braces for single line control statement.Marcus Glocker
2020-08-09If a control supports auto mode and this is active, print 'auto' with -cMarcus Glocker
instead of printing the last set numeric value. Initial diff from Laurence Tratt with some enhancements added.
2020-08-05Don't compare a pointer to a null character constant but to NULL.Marcus Glocker
With best regards from clang 10.
2020-08-05Add the ability to set and display video control values directly on theMarcus Glocker
CLI. Initial diff from Laurence Tratt with some enhancements/changes added. ok mpi@
2020-07-17Add white balance temperature control through 'w/W' keys.Marcus Glocker
From Laurence Tratt. ok matthieu@
2020-07-01Initialize v4l2_requestbuffers for better libv4l compatibilityIngo Feinerer
The VIDIOC_REQBUFS ioctl requires a v4l2_requestbuffers struct with the members count, type, and memory. In the past only count was set as the uvideo(4) kernel driver, via uvideo_reqbufs(), is ignoring both struct members type and memory (pointed out by mpi@). However, using video(1) with libv4l (LD_PRELOAD=/usr/local/lib/v4l2convert.so video) yields "mmap: Invalid argument" as libv4l inspects the type and memory struct members and fails if memory != V4L2_MEMORY_MMAP. Full initialization fixes libv4l usage which allows us to view video encodings not directly supported by video(1), e.g., MJPEG, as libv4l can convert encodings on the fly. OK mglocker@
2019-11-06Tested a Logitech Webcam C930e which has 17 frame sizes but video(1) onlyMarcus Glocker
supports 16 today. Bump the array to 32 which makes 1920x1080 work on this device as well. OK deraadt
2019-02-25Add support for yv12 encoding to video(1).Raphael Graf
Frame data is converted to yv12 if Xv(3) does not support yuy2 and uyvy. OK mpi@, landry@
2019-01-22Pledge video(1):Landry Breuil
* video -q needs 'stdio rpath wpath video' (needs O_RDWR on the device) * video -i needs 'stdio rpath' (rpath for X11 error/locale access) * other modes (ie display frames via X11, or output frames to file with -o/-O) need 'stdio rpath video' since we open output file/video device before calling pledge(2). with help from semarie@, nits from matthieu@ ok deraadt@
2019-01-04Rename err to errs to avoid shadowing potential err() usage, and fix twoLandry Breuil
typos while here. ok semarie@ matthieu@
2018-04-09Don't use optarg as format string.cheloha
ok millert@
2018-04-09Measure statistics against UPTIME clock.cheloha
So that your statistics remain correct if the system wall clock is changed during playback. Use CLOCK_UPTIME instead of CLOCK_MONOTONIC so that statistics remain correct across suspend/resume. Testing by tobias@, sthen@, and Benjamin Baier <programmer AT netzbasis DOT de>. ok sthen@
2016-11-26Preserve aspect ratio of camera image in Xv output.Dmitrij Czarkoff
OK jca@
2016-11-08Fix X11 property retrieval codeDmitrij Czarkoff
Just stop when reaching the end of property list instead of reading forever past its end. Issue was introduced in my previous commit and reported by deraadt@
2016-10-21add NetWM-compliant fullscreen supportDmitrij Czarkoff
OK jung@
2016-09-16Make video -i work ootb.Jeremie Courreges-Anglas
video(1) uses mmap and ioctls by default, those ioctls only work on video(4) devices. If -i is passed, use read(2) instead of the mmap(2) routines, instead of requiring the user to pass also pass the -g flag.
2016-06-06Comparing maximum frame buffer size after VIDIOC_DQBUF ioctl againstMarcus Glocker
'buf.bytesused' instead of 'buf.length' makes more sense. From Patrick Keshish
2016-06-06To match the encoding type, compare against 'pixelformat' instead ofMarcus Glocker
'description' which could contain any value. Fixes VIDIOC_ENUM_FMT ioctl for utvfu(4). Spotted by Patrick Keshish. ok mpi
2016-06-04Add 'q' option to just display the device properties and quit.Marcus Glocker
Tested and ok czarkoff
2016-06-02mmap(2) failure is indicated by MAP_FAILED, not NULL.Theo Buehler
ok mglocker
2016-06-02Just try to unmap a buffer when something has been mapped before.Marcus Glocker
ok semarie tb
2016-05-31Guard against using tp_start uninitialized in case no frame wasTheo Buehler
grabbed in verbose mode. ok mglocker
2016-05-31Add mmap(2) support for frame grabbing and make it default over read(2).Marcus Glocker
The introduced '-g' option still allows to fallback to read(2). With input from tb, jmc, and Patrick Keshishian. ok tb
2014-11-30Escape "Rv" when passed as an argument to a macro in order to avoidIngo Schwarze
confusion whether this is supposed to be a call to the .Rv macro. Found by a warning issued by the the groff_mdoc(7) macros.
2014-10-23Now that gcc2 is gone revert the removal of anonymous unions.Brad Smith
"I think this is the right thing to do" miod@ "Fine with me." sthen@
2012-08-14Typo in warn() argument. Reported by Artturi Alm. Thanks.Matthieu Herrb
2012-08-05Typo. From Pappe Kaugummi via jmc@.Matthieu Herrb
2011-06-23switch to installing source manuals:Christian Weisgerber
* cope with new bsd.man.mk * update imake configuration ports use of imake remains unchanged
2011-04-11add the -R option to usage()Jacob Meuser
spotted by sobrado@
2011-04-11* use VIDIOC_ENUM_FRAMEINTERVALS to get the supported frame intervalsJacob Meuser
and display the frame rates if at least on -v is used. * set/get the video(4) device's frame rate using VIDIOC_{S,G}_PARM. * add new option -R which dsables frame rate adjustment. only really useful for video(4) devices, to see the difference between the frame rate the device generates and what it says it's configured for ... many devices don't generate the rate they are configured if they aren't getting enough light ... * poll(2) input with INFTIM instead of 0 timeout, and handle the poll(2) call being interrupted by the frame timer. * only use usleep(3) to wait for frames if the input is a file, and in that case, sleep for a full frame interval or until interrupted by the frame timer. * update the manual to describe the new -R option, that -r now sets video(4) frame rate, and that at least one -v will display supported properties of the hardware.
2011-03-18lexicographically sort keys.Igor Sobrado
ok jakemsr@, jmc@
2011-03-08xcb is no longer optional.Matthieu Herrb
2010-11-27Explicitely link libxcb when needed for static arches.Matthieu Herrb
2010-10-26typo spotted by espieJacob Meuser
2010-10-15typos. "ouput" typos spotted by Jan Stary.Jacob Meuser
2010-10-15oops. start with an undefined encoding instead of yuy2. lets the codeJacob Meuser
figure out what encoding to use, based on what the hardware supports. still uses yuy2 by default if the hardware supports it.
2010-10-15declare the global vars as static to not conflict with symbols fromJacob Meuser
libraries
2010-09-26s/\.Xx/.Xr/ such that "Xv(3)" doesn't get lost;Ingo Schwarze
found by mandoc -Tlint
2010-09-26support for gamma and sharpness/acutance controls.Jacob Meuser
also from Martin Pieuchot, thanks!
2010-09-25list all libraries needed and in the correct order so this buildsJacob Meuser
on static archs from todd@
2010-09-13no more anonymous unions in video(4)Jacob Meuser
2010-07-26$OpenBSD$ and compare width to width, not width to heightJacob Meuser
2010-07-26sort options as usual in our operating system; `usage:' is lower case;Igor Sobrado
improve usage()'s output; better indentation in usage() function. ok jakemsr@
2010-07-24do not add the same size twice, and do not fall of the end ofJacob Meuser
the frame sizes array. reported/tested mglocker