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 | ||
b7e67f6c | 18 | .. cpp:function:: int ioctl( int fd, int request, v4l2_jpegcompression *argp ) |
5377d91f | 19 | |
b7e67f6c | 20 | .. cpp:function:: int ioctl( int fd, int request, const v4l2_jpegcompression *argp ) |
5377d91f | 21 | |
586027ce | 22 | |
15e7d615 | 23 | Arguments |
5377d91f MH |
24 | ========= |
25 | ||
26 | ``fd`` | |
27 | File descriptor returned by :ref:`open() <func-open>`. | |
28 | ||
29 | ``request`` | |
30 | VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP | |
31 | ||
32 | ``argp`` | |
33 | ||
34 | ||
15e7d615 | 35 | Description |
5377d91f MH |
36 | =========== |
37 | ||
38 | These ioctls are **deprecated**. New drivers and applications should use | |
39 | :ref:`JPEG class controls <jpeg-controls>` for image quality and JPEG | |
40 | markers control. | |
41 | ||
42 | [to do] | |
43 | ||
44 | Ronald Bultje elaborates: | |
45 | ||
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. | |
50 | ||
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. | |
56 | ||
57 | ||
58 | .. _v4l2-jpegcompression: | |
59 | ||
60 | .. flat-table:: struct v4l2_jpegcompression | |
61 | :header-rows: 0 | |
62 | :stub-columns: 0 | |
63 | :widths: 1 1 2 | |
64 | ||
65 | ||
66 | - .. row 1 | |
67 | ||
68 | - int | |
69 | ||
70 | - ``quality`` | |
71 | ||
72 | - Deprecated. If | |
0579e6e3 MCC |
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. | |
5377d91f MH |
76 | |
77 | - .. row 2 | |
78 | ||
79 | - int | |
80 | ||
81 | - ``APPn`` | |
82 | ||
0579e6e3 | 83 | - |
5377d91f MH |
84 | |
85 | - .. row 3 | |
86 | ||
87 | - int | |
88 | ||
89 | - ``APP_len`` | |
90 | ||
0579e6e3 | 91 | - |
5377d91f MH |
92 | |
93 | - .. row 4 | |
94 | ||
95 | - char | |
96 | ||
8968da9b | 97 | - ``APP_data``\ [60] |
5377d91f | 98 | |
0579e6e3 | 99 | - |
5377d91f MH |
100 | |
101 | - .. row 5 | |
102 | ||
103 | - int | |
104 | ||
105 | - ``COM_len`` | |
106 | ||
0579e6e3 | 107 | - |
5377d91f MH |
108 | |
109 | - .. row 6 | |
110 | ||
111 | - char | |
112 | ||
8968da9b | 113 | - ``COM_data``\ [60] |
5377d91f | 114 | |
0579e6e3 | 115 | - |
5377d91f MH |
116 | |
117 | - .. row 7 | |
118 | ||
119 | - __u32 | |
120 | ||
121 | - ``jpeg_markers`` | |
122 | ||
123 | - See :ref:`jpeg-markers`. Deprecated. If | |
0579e6e3 MCC |
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. | |
5377d91f MH |
127 | |
128 | ||
129 | ||
130 | .. _jpeg-markers: | |
131 | ||
132 | .. flat-table:: JPEG Markers Flags | |
133 | :header-rows: 0 | |
134 | :stub-columns: 0 | |
135 | :widths: 3 1 4 | |
136 | ||
137 | ||
138 | - .. row 1 | |
139 | ||
140 | - ``V4L2_JPEG_MARKER_DHT`` | |
141 | ||
142 | - (1<<3) | |
143 | ||
144 | - Define Huffman Tables | |
145 | ||
146 | - .. row 2 | |
147 | ||
148 | - ``V4L2_JPEG_MARKER_DQT`` | |
149 | ||
150 | - (1<<4) | |
151 | ||
152 | - Define Quantization Tables | |
153 | ||
154 | - .. row 3 | |
155 | ||
156 | - ``V4L2_JPEG_MARKER_DRI`` | |
157 | ||
158 | - (1<<5) | |
159 | ||
160 | - Define Restart Interval | |
161 | ||
162 | - .. row 4 | |
163 | ||
164 | - ``V4L2_JPEG_MARKER_COM`` | |
165 | ||
166 | - (1<<6) | |
167 | ||
168 | - Comment segment | |
169 | ||
170 | - .. row 5 | |
171 | ||
172 | - ``V4L2_JPEG_MARKER_APP`` | |
173 | ||
174 | - (1<<7) | |
175 | ||
176 | - App segment, driver will always use APP0 | |
177 | ||
178 | ||
15e7d615 | 179 | Return Value |
5377d91f MH |
180 | ============ |
181 | ||
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. |