diff options
Diffstat (limited to 'Documentation/userspace-api/media/v4l/libv4l-introduction.rst')
-rw-r--r-- | Documentation/userspace-api/media/v4l/libv4l-introduction.rst | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/Documentation/userspace-api/media/v4l/libv4l-introduction.rst b/Documentation/userspace-api/media/v4l/libv4l-introduction.rst index e03280b35570..05690f2358ce 100644 --- a/Documentation/userspace-api/media/v4l/libv4l-introduction.rst +++ b/Documentation/userspace-api/media/v4l/libv4l-introduction.rst @@ -1,4 +1,5 @@ .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later +.. c:namespace:: V4L .. _libv4l-introduction: @@ -17,7 +18,6 @@ An example of using libv4l is provided by libv4l consists of 3 different libraries: - libv4lconvert ============= @@ -65,7 +65,6 @@ libv4lconvert/processing. These controls are stored application wide libv4lconvert/processing offers the actual video processing functionality. - libv4l1 ======= @@ -78,7 +77,6 @@ just pass calls through. Since those functions are emulations of the old V4L1 API, it shouldn't be used for new applications. - libv4l2 ======= @@ -105,7 +103,6 @@ available in the driver. :ref:`VIDIOC_ENUM_FMT <VIDIOC_ENUM_FMT>` keeps enumerating the hardware supported formats, plus the emulated formats offered by libv4l at the end. - .. _libv4l-ops: Libv4l device control functions @@ -115,17 +112,17 @@ The common file operation methods are provided by libv4l. Those functions operate just like the gcc function ``dup()`` and V4L2 functions -:c:func:`open() <v4l2-open>`, :c:func:`close() <v4l2-close>`, -:c:func:`ioctl() <v4l2-ioctl>`, :c:func:`read() <v4l2-read>`, -:c:func:`mmap() <v4l2-mmap>` and :c:func:`munmap() <v4l2-munmap>`: +:c:func:`open()`, :c:func:`close()`, +:c:func:`ioctl()`, :c:func:`read()`, +:c:func:`mmap()` and :c:func:`munmap()`: .. c:function:: int v4l2_open(const char *file, int oflag, ...) - operates like the :c:func:`open() <v4l2-open>` function. + operates like the :c:func:`open()` function. .. c:function:: int v4l2_close(int fd) - operates like the :c:func:`close() <v4l2-close>` function. + operates like the :c:func:`close()` function. .. c:function:: int v4l2_dup(int fd) @@ -133,19 +130,19 @@ V4L2 functions .. c:function:: int v4l2_ioctl (int fd, unsigned long int request, ...) - operates like the :c:func:`ioctl() <v4l2-ioctl>` function. + operates like the :c:func:`ioctl()` function. .. c:function:: int v4l2_read (int fd, void* buffer, size_t n) - operates like the :c:func:`read() <v4l2-read>` function. + operates like the :c:func:`read()` function. .. c:function:: void v4l2_mmap(void *start, size_t length, int prot, int flags, int fd, int64_t offset); - operates like the :c:func:`munmap() <v4l2-munmap>` function. + operates like the :c:func:`munmap()` function. .. c:function:: int v4l2_munmap(void *_start, size_t length); - operates like the :c:func:`munmap() <v4l2-munmap>` function. + operates like the :c:func:`munmap()` function. Those functions provide additional control: @@ -168,14 +165,13 @@ Those functions provide additional control: of the given v4l control id. when the cid does not exist, could not be accessed for some reason, or some error occurred 0 is returned. - v4l1compat.so wrapper library ============================= This library intercepts calls to -:c:func:`open() <v4l2-open>`, :c:func:`close() <v4l2-close>`, -:c:func:`ioctl() <v4l2-ioctl>`, :c:func:`mmap() <v4l2-mmap>` and -:c:func:`munmap() <v4l2-munmap>` +:c:func:`open()`, :c:func:`close()`, +:c:func:`ioctl()`, :c:func:`mmap()` and +:c:func:`munmap()` operations and redirects them to the libv4l counterparts, by using ``LD_PRELOAD=/usr/lib/v4l1compat.so``. It also emulates V4L1 calls via V4L2 API. |