blob: f5bf8b7915edda5ed093307cd370fcc11962cc33 [file] [log] [blame]
Markus Heiser5377d912016-06-30 15:18:56 +02001.. -*- coding: utf-8; mode: rst -*-
2
Mauro Carvalho Chehabaf4a4d02016-07-01 13:42:29 -03003.. _VIDIOC_G_JPEGCOMP:
Markus Heiser5377d912016-06-30 15:18:56 +02004
5******************************************
6ioctl VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP
7******************************************
8
Mauro Carvalho Chehab15e7d612016-07-05 15:14:35 -03009Name
Mauro Carvalho Chehab586027c2016-07-05 07:58:48 -030010====
Markus Heiser5377d912016-06-30 15:18:56 +020011
Mauro Carvalho Chehab586027c2016-07-05 07:58:48 -030012VIDIOC_G_JPEGCOMP - VIDIOC_S_JPEGCOMP
Markus Heiser5377d912016-06-30 15:18:56 +020013
Mauro Carvalho Chehab15e7d612016-07-05 15:14:35 -030014
15Synopsis
Markus Heiser5377d912016-06-30 15:18:56 +020016========
17
Mauro Carvalho Chehabb7e67f62016-07-02 09:49:16 -030018.. cpp:function:: int ioctl( int fd, int request, v4l2_jpegcompression *argp )
Markus Heiser5377d912016-06-30 15:18:56 +020019
Mauro Carvalho Chehabb7e67f62016-07-02 09:49:16 -030020.. cpp:function:: int ioctl( int fd, int request, const v4l2_jpegcompression *argp )
Markus Heiser5377d912016-06-30 15:18:56 +020021
Mauro Carvalho Chehab586027c2016-07-05 07:58:48 -030022
Mauro Carvalho Chehab15e7d612016-07-05 15:14:35 -030023Arguments
Markus Heiser5377d912016-06-30 15:18:56 +020024=========
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
Mauro Carvalho Chehab15e7d612016-07-05 15:14:35 -030035Description
Markus Heiser5377d912016-06-30 15:18:56 +020036===========
37
38These ioctls are **deprecated**. New drivers and applications should use
39:ref:`JPEG class controls <jpeg-controls>` for image quality and JPEG
40markers control.
41
42[to do]
43
44Ronald Bultje elaborates:
45
46APP is some application-specific information. The application can set it
47itself, and it'll be stored in the JPEG-encoded fields (eg; interlacing
48information for in an AVI or so). COM is the same, but it's comments,
49like 'encoded by me' or so.
50
51jpeg_markers describes whether the huffman tables, quantization tables
52and the restart interval information (all JPEG-specific stuff) should be
53stored in the JPEG-encoded fields. These define how the JPEG field is
54encoded. If you omit them, applications assume you've used standard
55encoding. 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
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -030073 :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.
Markus Heiser5377d912016-06-30 15:18:56 +020076
77 - .. row 2
78
79 - int
80
81 - ``APPn``
82
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -030083 -
Markus Heiser5377d912016-06-30 15:18:56 +020084
85 - .. row 3
86
87 - int
88
89 - ``APP_len``
90
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -030091 -
Markus Heiser5377d912016-06-30 15:18:56 +020092
93 - .. row 4
94
95 - char
96
Mauro Carvalho Chehab8968da92016-07-13 08:43:30 -030097 - ``APP_data``\ [60]
Markus Heiser5377d912016-06-30 15:18:56 +020098
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -030099 -
Markus Heiser5377d912016-06-30 15:18:56 +0200100
101 - .. row 5
102
103 - int
104
105 - ``COM_len``
106
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300107 -
Markus Heiser5377d912016-06-30 15:18:56 +0200108
109 - .. row 6
110
111 - char
112
Mauro Carvalho Chehab8968da92016-07-13 08:43:30 -0300113 - ``COM_data``\ [60]
Markus Heiser5377d912016-06-30 15:18:56 +0200114
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300115 -
Markus Heiser5377d912016-06-30 15:18:56 +0200116
117 - .. row 7
118
119 - __u32
120
121 - ``jpeg_markers``
122
123 - See :ref:`jpeg-markers`. Deprecated. If
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300124 :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.
Markus Heiser5377d912016-06-30 15:18:56 +0200127
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
Mauro Carvalho Chehab15e7d612016-07-05 15:14:35 -0300179Return Value
Markus Heiser5377d912016-06-30 15:18:56 +0200180============
181
182On success 0 is returned, on error -1 and the ``errno`` variable is set
183appropriately. The generic error codes are described at the
184:ref:`Generic Error Codes <gen-errors>` chapter.