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