Commit | Line | Data |
---|---|---|
5377d91f MH |
1 | .. -*- coding: utf-8; mode: rst -*- |
2 | ||
af4a4d0d | 3 | .. _VIDIOC_G_JPEGCOMP: |
5377d91f MH |
4 | |
5 | ****************************************** | |
6 | ioctl VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP | |
7 | ****************************************** | |
8 | ||
15e7d615 | 9 | Name |
586027ce | 10 | ==== |
5377d91f | 11 | |
586027ce | 12 | VIDIOC_G_JPEGCOMP - VIDIOC_S_JPEGCOMP |
5377d91f | 13 | |
15e7d615 MCC |
14 | |
15 | Synopsis | |
5377d91f MH |
16 | ======== |
17 | ||
41d80465 MCC |
18 | .. c:function:: int ioctl( int fd, VIDIOC_G_JPEGCOMP, v4l2_jpegcompression *argp ) |
19 | :name: VIDIOC_G_JPEGCOMP | |
5377d91f | 20 | |
41d80465 MCC |
21 | .. c:function:: int ioctl( int fd, VIDIOC_S_JPEGCOMP, const v4l2_jpegcompression *argp ) |
22 | :name: VIDIOC_S_JPEGCOMP | |
5377d91f | 23 | |
586027ce | 24 | |
15e7d615 | 25 | Arguments |
5377d91f MH |
26 | ========= |
27 | ||
28 | ``fd`` | |
29 | File descriptor returned by :ref:`open() <func-open>`. | |
30 | ||
5377d91f MH |
31 | ``argp`` |
32 | ||
33 | ||
15e7d615 | 34 | Description |
5377d91f MH |
35 | =========== |
36 | ||
37 | These ioctls are **deprecated**. New drivers and applications should use | |
38 | :ref:`JPEG class controls <jpeg-controls>` for image quality and JPEG | |
39 | markers control. | |
40 | ||
41 | [to do] | |
42 | ||
43 | Ronald Bultje elaborates: | |
44 | ||
45 | APP is some application-specific information. The application can set it | |
46 | itself, and it'll be stored in the JPEG-encoded fields (eg; interlacing | |
47 | information for in an AVI or so). COM is the same, but it's comments, | |
48 | like 'encoded by me' or so. | |
49 | ||
50 | jpeg_markers describes whether the huffman tables, quantization tables | |
51 | and the restart interval information (all JPEG-specific stuff) should be | |
52 | stored in the JPEG-encoded fields. These define how the JPEG field is | |
53 | encoded. If you omit them, applications assume you've used standard | |
54 | encoding. You usually do want to add them. | |
55 | ||
56 | ||
ef76c068 | 57 | .. tabularcolumns:: |p{1.2cm}|p{3.0cm}|p{13.3cm}| |
5bd4bb78 | 58 | |
e8be7e97 | 59 | .. c:type:: v4l2_jpegcompression |
fa92b04d | 60 | |
5377d91f MH |
61 | .. flat-table:: struct v4l2_jpegcompression |
62 | :header-rows: 0 | |
63 | :stub-columns: 0 | |
64 | :widths: 1 1 2 | |
65 | ||
66 | ||
67 | - .. row 1 | |
68 | ||
69 | - int | |
70 | ||
71 | - ``quality`` | |
72 | ||
73 | - Deprecated. If | |
0579e6e3 MCC |
74 | :ref:`V4L2_CID_JPEG_COMPRESSION_QUALITY <jpeg-quality-control>` |
75 | control is exposed by a driver applications should use it instead | |
76 | and ignore this field. | |
5377d91f MH |
77 | |
78 | - .. row 2 | |
79 | ||
80 | - int | |
81 | ||
82 | - ``APPn`` | |
83 | ||
0579e6e3 | 84 | - |
5377d91f MH |
85 | |
86 | - .. row 3 | |
87 | ||
88 | - int | |
89 | ||
90 | - ``APP_len`` | |
91 | ||
0579e6e3 | 92 | - |
5377d91f MH |
93 | |
94 | - .. row 4 | |
95 | ||
96 | - char | |
97 | ||
8968da9b | 98 | - ``APP_data``\ [60] |
5377d91f | 99 | |
0579e6e3 | 100 | - |
5377d91f MH |
101 | |
102 | - .. row 5 | |
103 | ||
104 | - int | |
105 | ||
106 | - ``COM_len`` | |
107 | ||
0579e6e3 | 108 | - |
5377d91f MH |
109 | |
110 | - .. row 6 | |
111 | ||
112 | - char | |
113 | ||
8968da9b | 114 | - ``COM_data``\ [60] |
5377d91f | 115 | |
0579e6e3 | 116 | - |
5377d91f MH |
117 | |
118 | - .. row 7 | |
119 | ||
120 | - __u32 | |
121 | ||
122 | - ``jpeg_markers`` | |
123 | ||
124 | - See :ref:`jpeg-markers`. Deprecated. If | |
0579e6e3 MCC |
125 | :ref:`V4L2_CID_JPEG_ACTIVE_MARKER <jpeg-active-marker-control>` |
126 | control is exposed by a driver applications should use it instead | |
127 | and ignore this field. | |
5377d91f MH |
128 | |
129 | ||
fa92b04d | 130 | .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| |
5377d91f MH |
131 | |
132 | .. _jpeg-markers: | |
133 | ||
134 | .. flat-table:: JPEG Markers Flags | |
135 | :header-rows: 0 | |
136 | :stub-columns: 0 | |
137 | :widths: 3 1 4 | |
138 | ||
139 | ||
140 | - .. row 1 | |
141 | ||
142 | - ``V4L2_JPEG_MARKER_DHT`` | |
143 | ||
144 | - (1<<3) | |
145 | ||
146 | - Define Huffman Tables | |
147 | ||
148 | - .. row 2 | |
149 | ||
150 | - ``V4L2_JPEG_MARKER_DQT`` | |
151 | ||
152 | - (1<<4) | |
153 | ||
154 | - Define Quantization Tables | |
155 | ||
156 | - .. row 3 | |
157 | ||
158 | - ``V4L2_JPEG_MARKER_DRI`` | |
159 | ||
160 | - (1<<5) | |
161 | ||
162 | - Define Restart Interval | |
163 | ||
164 | - .. row 4 | |
165 | ||
166 | - ``V4L2_JPEG_MARKER_COM`` | |
167 | ||
168 | - (1<<6) | |
169 | ||
170 | - Comment segment | |
171 | ||
172 | - .. row 5 | |
173 | ||
174 | - ``V4L2_JPEG_MARKER_APP`` | |
175 | ||
176 | - (1<<7) | |
177 | ||
178 | - App segment, driver will always use APP0 | |
179 | ||
180 | ||
15e7d615 | 181 | Return Value |
5377d91f MH |
182 | ============ |
183 | ||
184 | On success 0 is returned, on error -1 and the ``errno`` variable is set | |
185 | appropriately. The generic error codes are described at the | |
186 | :ref:`Generic Error Codes <gen-errors>` chapter. |