1*4882a593Smuzhiyun.. SPDX-License-Identifier: GPL-2.0 2*4882a593Smuzhiyun 3*4882a593Smuzhiyun.. include:: <isonum.txt> 4*4882a593Smuzhiyun 5*4882a593SmuzhiyunVaio Picturebook Motion Eye Camera Driver 6*4882a593Smuzhiyun========================================= 7*4882a593Smuzhiyun 8*4882a593SmuzhiyunCopyright |copy| 2001-2004 Stelian Pop <stelian@popies.net> 9*4882a593Smuzhiyun 10*4882a593SmuzhiyunCopyright |copy| 2001-2002 Alcôve <www.alcove.com> 11*4882a593Smuzhiyun 12*4882a593SmuzhiyunCopyright |copy| 2000 Andrew Tridgell <tridge@samba.org> 13*4882a593Smuzhiyun 14*4882a593SmuzhiyunPrivate API 15*4882a593Smuzhiyun----------- 16*4882a593Smuzhiyun 17*4882a593SmuzhiyunThe driver supports frame grabbing with the video4linux API, 18*4882a593Smuzhiyunso all video4linux tools (like xawtv) should work with this driver. 19*4882a593Smuzhiyun 20*4882a593SmuzhiyunBesides the video4linux interface, the driver has a private interface 21*4882a593Smuzhiyunfor accessing the Motion Eye extended parameters (camera sharpness, 22*4882a593Smuzhiyunagc, video framerate), the snapshot and the MJPEG capture facilities. 23*4882a593Smuzhiyun 24*4882a593SmuzhiyunThis interface consists of several ioctls (prototypes and structures 25*4882a593Smuzhiyuncan be found in include/linux/meye.h): 26*4882a593Smuzhiyun 27*4882a593SmuzhiyunMEYEIOC_G_PARAMS and MEYEIOC_S_PARAMS 28*4882a593Smuzhiyun Get and set the extended parameters of the motion eye camera. 29*4882a593Smuzhiyun The user should always query the current parameters with 30*4882a593Smuzhiyun MEYEIOC_G_PARAMS, change what he likes and then issue the 31*4882a593Smuzhiyun MEYEIOC_S_PARAMS call (checking for -EINVAL). The extended 32*4882a593Smuzhiyun parameters are described by the meye_params structure. 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun 35*4882a593SmuzhiyunMEYEIOC_QBUF_CAPT 36*4882a593Smuzhiyun Queue a buffer for capture (the buffers must have been 37*4882a593Smuzhiyun obtained with a VIDIOCGMBUF call and mmap'ed by the 38*4882a593Smuzhiyun application). The argument to MEYEIOC_QBUF_CAPT is the 39*4882a593Smuzhiyun buffer number to queue (or -1 to end capture). The first 40*4882a593Smuzhiyun call to MEYEIOC_QBUF_CAPT starts the streaming capture. 41*4882a593Smuzhiyun 42*4882a593SmuzhiyunMEYEIOC_SYNC 43*4882a593Smuzhiyun Takes as an argument the buffer number you want to sync. 44*4882a593Smuzhiyun This ioctl blocks until the buffer is filled and ready 45*4882a593Smuzhiyun for the application to use. It returns the buffer size. 46*4882a593Smuzhiyun 47*4882a593SmuzhiyunMEYEIOC_STILLCAPT and MEYEIOC_STILLJCAPT 48*4882a593Smuzhiyun Takes a snapshot in an uncompressed or compressed jpeg format. 49*4882a593Smuzhiyun This ioctl blocks until the snapshot is done and returns (for 50*4882a593Smuzhiyun jpeg snapshot) the size of the image. The image data is 51*4882a593Smuzhiyun available from the first mmap'ed buffer. 52*4882a593Smuzhiyun 53*4882a593SmuzhiyunLook at the 'motioneye' application code for an actual example. 54