1 .. -*- coding: utf-8; mode: rst -*-
5 ******************************************
6 ioctl VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP
7 ******************************************
12 VIDIOC_G_JPEGCOMP - VIDIOC_S_JPEGCOMP
18 .. cpp:function:: int ioctl( int fd, int request, v4l2_jpegcompression *argp )
20 .. cpp:function:: int ioctl( int fd, int request, const v4l2_jpegcompression *argp )
27 File descriptor returned by :ref:`open() <func-open>`.
30 VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP
38 These ioctls are **deprecated**. New drivers and applications should use
39 :ref:`JPEG class controls <jpeg-controls>` for image quality and JPEG
44 Ronald Bultje elaborates:
46 APP is some application-specific information. The application can set it
47 itself, and it'll be stored in the JPEG-encoded fields (eg; interlacing
48 information for in an AVI or so). COM is the same, but it's comments,
49 like 'encoded by me' or so.
51 jpeg_markers describes whether the huffman tables, quantization tables
52 and the restart interval information (all JPEG-specific stuff) should be
53 stored in the JPEG-encoded fields. These define how the JPEG field is
54 encoded. If you omit them, applications assume you've used standard
55 encoding. You usually do want to add them.
58 .. _v4l2-jpegcompression:
60 .. flat-table:: struct v4l2_jpegcompression
73 :ref:`V4L2_CID_JPEG_COMPRESSION_QUALITY <jpeg-quality-control>`
74 control is exposed by a driver applications should use it instead
75 and ignore this field.
123 - See :ref:`jpeg-markers`. Deprecated. If
124 :ref:`V4L2_CID_JPEG_ACTIVE_MARKER <jpeg-active-marker-control>`
125 control is exposed by a driver applications should use it instead
126 and ignore this field.
132 .. flat-table:: JPEG Markers Flags
140 - ``V4L2_JPEG_MARKER_DHT``
144 - Define Huffman Tables
148 - ``V4L2_JPEG_MARKER_DQT``
152 - Define Quantization Tables
156 - ``V4L2_JPEG_MARKER_DRI``
160 - Define Restart Interval
164 - ``V4L2_JPEG_MARKER_COM``
172 - ``V4L2_JPEG_MARKER_APP``
176 - App segment, driver will always use APP0
182 On success 0 is returned, on error -1 and the ``errno`` variable is set
183 appropriately. The generic error codes are described at the
184 :ref:`Generic Error Codes <gen-errors>` chapter.