18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ci.. include:: <isonum.txt>
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ciVaio Picturebook Motion Eye Camera Driver
68c2ecf20Sopenharmony_ci=========================================
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ciCopyright |copy| 2001-2004 Stelian Pop <stelian@popies.net>
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ciCopyright |copy| 2001-2002 Alcôve <www.alcove.com>
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ciCopyright |copy| 2000 Andrew Tridgell <tridge@samba.org>
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ciPrivate API
158c2ecf20Sopenharmony_ci-----------
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ciThe driver supports frame grabbing with the video4linux API,
188c2ecf20Sopenharmony_ciso all video4linux tools (like xawtv) should work with this driver.
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ciBesides the video4linux interface, the driver has a private interface
218c2ecf20Sopenharmony_cifor accessing the Motion Eye extended parameters (camera sharpness,
228c2ecf20Sopenharmony_ciagc, video framerate), the snapshot and the MJPEG capture facilities.
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ciThis interface consists of several ioctls (prototypes and structures
258c2ecf20Sopenharmony_cican be found in include/linux/meye.h):
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ciMEYEIOC_G_PARAMS and MEYEIOC_S_PARAMS
288c2ecf20Sopenharmony_ci	Get and set the extended parameters of the motion eye camera.
298c2ecf20Sopenharmony_ci	The user should always query the current parameters with
308c2ecf20Sopenharmony_ci	MEYEIOC_G_PARAMS, change what he likes and then issue the
318c2ecf20Sopenharmony_ci	MEYEIOC_S_PARAMS call (checking for -EINVAL). The extended
328c2ecf20Sopenharmony_ci	parameters are described by the meye_params structure.
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ciMEYEIOC_QBUF_CAPT
368c2ecf20Sopenharmony_ci	Queue a buffer for capture (the buffers must have been
378c2ecf20Sopenharmony_ci	obtained with a VIDIOCGMBUF call and mmap'ed by the
388c2ecf20Sopenharmony_ci	application). The argument to MEYEIOC_QBUF_CAPT is the
398c2ecf20Sopenharmony_ci	buffer number to queue (or -1 to end capture). The first
408c2ecf20Sopenharmony_ci	call to MEYEIOC_QBUF_CAPT starts the streaming capture.
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ciMEYEIOC_SYNC
438c2ecf20Sopenharmony_ci	Takes as an argument the buffer number you want to sync.
448c2ecf20Sopenharmony_ci	This ioctl blocks until the buffer is filled and ready
458c2ecf20Sopenharmony_ci	for the application to use. It returns the buffer size.
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ciMEYEIOC_STILLCAPT and MEYEIOC_STILLJCAPT
488c2ecf20Sopenharmony_ci	Takes a snapshot in an uncompressed or compressed jpeg format.
498c2ecf20Sopenharmony_ci	This ioctl blocks until the snapshot is done and returns (for
508c2ecf20Sopenharmony_ci	jpeg snapshot) the size of the image. The image data is
518c2ecf20Sopenharmony_ci	available from the first mmap'ed buffer.
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ciLook at the 'motioneye' application code for an actual example.
54