1 .. Permission is granted to copy, distribute and/or modify this
2 .. document under the terms of the GNU Free Documentation License,
3 .. Version 1.1 or any later version published by the Free Software
4 .. Foundation, with no Invariant Sections, no Front-Cover Texts
5 .. and no Back-Cover Texts. A copy of the license is included at
6 .. Documentation/userspace-api/media/fdl-appendix.rst.
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
10 .. _VIDIOC_G_JPEGCOMP:
12 ******************************************
13 ioctl VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP
14 ******************************************
19 VIDIOC_G_JPEGCOMP - VIDIOC_S_JPEGCOMP
25 .. c:function:: int ioctl( int fd, VIDIOC_G_JPEGCOMP, v4l2_jpegcompression *argp )
26 :name: VIDIOC_G_JPEGCOMP
28 .. c:function:: int ioctl( int fd, VIDIOC_S_JPEGCOMP, const v4l2_jpegcompression *argp )
29 :name: VIDIOC_S_JPEGCOMP
36 File descriptor returned by :ref:`open() <func-open>`.
39 Pointer to struct :c:type:`v4l2_jpegcompression`.
45 These ioctls are **deprecated**. New drivers and applications should use
46 :ref:`JPEG class controls <jpeg-controls>` for image quality and JPEG
51 Ronald Bultje elaborates:
53 APP is some application-specific information. The application can set it
54 itself, and it'll be stored in the JPEG-encoded fields (eg; interlacing
55 information for in an AVI or so). COM is the same, but it's comments,
56 like 'encoded by me' or so.
58 jpeg_markers describes whether the huffman tables, quantization tables
59 and the restart interval information (all JPEG-specific stuff) should be
60 stored in the JPEG-encoded fields. These define how the JPEG field is
61 encoded. If you omit them, applications assume you've used standard
62 encoding. You usually do want to add them.
65 .. tabularcolumns:: |p{1.2cm}|p{3.0cm}|p{13.3cm}|
67 .. c:type:: v4l2_jpegcompression
69 .. flat-table:: struct v4l2_jpegcompression
77 :ref:`V4L2_CID_JPEG_COMPRESSION_QUALITY <jpeg-quality-control>`
78 control is exposed by a driver applications should use it instead
79 and ignore this field.
97 - See :ref:`jpeg-markers`. Deprecated. If
98 :ref:`V4L2_CID_JPEG_ACTIVE_MARKER <jpeg-active-marker-control>`
99 control is exposed by a driver applications should use it instead
100 and ignore this field.
103 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
107 .. flat-table:: JPEG Markers Flags
112 * - ``V4L2_JPEG_MARKER_DHT``
114 - Define Huffman Tables
115 * - ``V4L2_JPEG_MARKER_DQT``
117 - Define Quantization Tables
118 * - ``V4L2_JPEG_MARKER_DRI``
120 - Define Restart Interval
121 * - ``V4L2_JPEG_MARKER_COM``
124 * - ``V4L2_JPEG_MARKER_APP``
126 - App segment, driver will always use APP0
132 On success 0 is returned, on error -1 and the ``errno`` variable is set
133 appropriately. The generic error codes are described at the
134 :ref:`Generic Error Codes <gen-errors>` chapter.