Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] libv4l-introduction.rst: improve crossr-references

Use C cross-references to mention the V4L2 API calls on all
places it occurs inside this file.

While here, also mark constants as such.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

+20 -13
+20 -13
Documentation/media/uapi/v4l/libv4l-introduction.rst
··· 113 113 114 114 The common file operation methods are provided by libv4l. 115 115 116 - Those functions operate just like glibc 117 - open/close/dup/ioctl/read/mmap/munmap: 116 + Those functions operate just like the gcc function ``dup()`` and 117 + V4L2 functions 118 + :c:func:`open() <v4l2-open>`, :c:func:`close() <v4l2-close>`, 119 + :c:func:`ioctl() <v4l2-ioctl>`, :c:func:`read() <v4l2-read>`, 120 + :c:func:`mmap() <v4l2-mmap>` and :c:func:`munmap() <v4l2-munmap>`: 118 121 119 122 .. c:function:: int v4l2_open(const char *file, int oflag, ...) 120 123 121 - operates like the standard :ref:`open() <func-open>` function. 124 + operates like the :c:func:`open() <v4l2-open>` function. 122 125 123 126 .. c:function:: int v4l2_close(int fd) 124 127 125 - operates like the standard :ref:`close() <func-close>` function. 128 + operates like the :c:func:`close() <v4l2-close>` function. 126 129 127 130 .. c:function:: int v4l2_dup(int fd) 128 131 129 - operates like the standard dup() function, duplicating a file handler. 132 + operates like the libc ``dup()`` function, duplicating a file handler. 130 133 131 134 .. c:function:: int v4l2_ioctl (int fd, unsigned long int request, ...) 132 135 133 - operates like the standard :ref:`ioctl() <func-ioctl>` function. 136 + operates like the :c:func:`ioctl() <v4l2-ioctl>` function. 134 137 135 138 .. c:function:: int v4l2_read (int fd, void* buffer, size_t n) 136 139 137 - operates like the standard :ref:`read() <func-read>` function. 140 + operates like the :c:func:`read() <v4l2-read>` function. 138 141 139 142 .. c:function:: void v4l2_mmap(void *start, size_t length, int prot, int flags, int fd, int64_t offset); 140 143 141 - operates like the standard :ref:`mmap() <func-mmap>` function. 144 + operates like the :c:func:`munmap() <v4l2-munmap>` function. 142 145 143 146 .. c:function:: int v4l2_munmap(void *_start, size_t length); 144 - operates like the standard :ref:`munmap() <func-munmap>` function. 147 + 148 + operates like the :c:func:`munmap() <v4l2-munmap>` function. 145 149 146 150 Those functions provide additional control: 147 151 148 152 .. c:function:: int v4l2_fd_open(int fd, int v4l2_flags) 149 153 150 154 opens an already opened fd for further use through v4l2lib and possibly 151 - modify libv4l2's default behavior through the v4l2_flags argument. 152 - Currently, v4l2_flags can be ``V4L2_DISABLE_CONVERSION``, to disable 155 + modify libv4l2's default behavior through the ``v4l2_flags`` argument. 156 + Currently, ``v4l2_flags`` can be ``V4L2_DISABLE_CONVERSION``, to disable 153 157 format conversion. 154 158 155 159 .. c:function:: int v4l2_set_control(int fd, int cid, int value) ··· 172 168 v4l1compat.so wrapper library 173 169 ============================= 174 170 175 - This library intercepts calls to open/close/ioctl/mmap/mmunmap 171 + This library intercepts calls to 172 + :c:func:`open() <v4l2-open>`, :c:func:`close() <v4l2-close>`, 173 + :c:func:`ioctl() <v4l2-ioctl>`, :c:func:`mmap() <v4l2-mmap>` and 174 + :c:func:`munmap() <v4l2-munmap>` 176 175 operations and redirects them to the libv4l counterparts, by using 177 - LD_PRELOAD=/usr/lib/v4l1compat.so. It also emulates V4L1 calls via V4L2 176 + ``LD_PRELOAD=/usr/lib/v4l1compat.so``. It also emulates V4L1 calls via V4L2 178 177 API. 179 178 180 179 It allows usage of binary legacy applications that still don't use