• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
2<HTML
3><HEAD
4><TITLE
5>ioctl VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP</TITLE
6><META
7NAME="GENERATOR"
8CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
9REL="HOME"
10TITLE="Video for Linux Two API Specification"
11HREF="book1.htm"><LINK
12REL="UP"
13TITLE="Function Reference"
14HREF="r7624.htm"><LINK
15REL="PREVIOUS"
16TITLE="ioctl VIDIOC_G_INPUT, VIDIOC_S_INPUT"
17HREF="r11217.htm"><LINK
18REL="NEXT"
19TITLE="ioctl VIDIOC_G_MODULATOR, VIDIOC_S_MODULATOR"
20HREF="r11430.htm"></HEAD
21><BODY
22CLASS="REFENTRY"
23BGCOLOR="#FFFFFF"
24TEXT="#000000"
25LINK="#0000FF"
26VLINK="#840084"
27ALINK="#0000FF"
28><DIV
29CLASS="NAVHEADER"
30><TABLE
31SUMMARY="Header navigation table"
32WIDTH="100%"
33BORDER="0"
34CELLPADDING="0"
35CELLSPACING="0"
36><TR
37><TH
38COLSPAN="3"
39ALIGN="center"
40>Video for Linux Two API Specification: Revision 0.24</TH
41></TR
42><TR
43><TD
44WIDTH="10%"
45ALIGN="left"
46VALIGN="bottom"
47><A
48HREF="r11217.htm"
49ACCESSKEY="P"
50>Prev</A
51></TD
52><TD
53WIDTH="80%"
54ALIGN="center"
55VALIGN="bottom"
56></TD
57><TD
58WIDTH="10%"
59ALIGN="right"
60VALIGN="bottom"
61><A
62HREF="r11430.htm"
63ACCESSKEY="N"
64>Next</A
65></TD
66></TR
67></TABLE
68><HR
69ALIGN="LEFT"
70WIDTH="100%"></DIV
71><H1
72><A
73NAME="VIDIOC-G-JPEGCOMP"
74></A
75>ioctl VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP</H1
76><DIV
77CLASS="REFNAMEDIV"
78><A
79NAME="AEN11289"
80></A
81><H2
82>Name</H2
83>VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP&nbsp;--&nbsp;</DIV
84><DIV
85CLASS="REFSYNOPSISDIV"
86><A
87NAME="AEN11293"
88></A
89><H2
90>Synopsis</H2
91><DIV
92CLASS="FUNCSYNOPSIS"
93><P
94></P
95><A
96NAME="AEN11294"
97></A
98><P
99><CODE
100><CODE
101CLASS="FUNCDEF"
102>int ioctl</CODE
103>(int fd, int request, v4l2_jpegcompression *argp);</CODE
104></P
105><P
106></P
107></DIV
108><DIV
109CLASS="FUNCSYNOPSIS"
110><P
111></P
112><A
113NAME="AEN11304"
114></A
115><P
116><CODE
117><CODE
118CLASS="FUNCDEF"
119>int ioctl</CODE
120>(int fd, int request, const v4l2_jpegcompression *argp);</CODE
121></P
122><P
123></P
124></DIV
125></DIV
126><DIV
127CLASS="REFSECT1"
128><A
129NAME="AEN11314"
130></A
131><H2
132>Arguments</H2
133><P
134></P
135><DIV
136CLASS="VARIABLELIST"
137><DL
138><DT
139><CODE
140CLASS="PARAMETER"
141>fd</CODE
142></DT
143><DD
144><P
145>File descriptor returned by <A
146HREF="r14090.htm"
147><CODE
148CLASS="FUNCTION"
149>open()</CODE
150></A
151>.</P
152></DD
153><DT
154><CODE
155CLASS="PARAMETER"
156>request</CODE
157></DT
158><DD
159><P
160>VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP</P
161></DD
162><DT
163><CODE
164CLASS="PARAMETER"
165>argp</CODE
166></DT
167><DD
168><P
169></P
170></DD
171></DL
172></DIV
173></DIV
174><DIV
175CLASS="REFSECT1"
176><A
177NAME="AEN11334"
178></A
179><H2
180>Description</H2
181><P
182>[to do]</P
183><P
184>Ronald Bultje elaborates:</P
185><P
186>APP is some application-specific information. The
187application can set it itself, and it'll be stored in the JPEG-encoded
188fields (eg; interlacing information for in an AVI or so). COM is the
189same, but it's comments, like 'encoded by me' or so.</P
190><P
191>jpeg_markers describes whether the huffman tables,
192quantization tables and the restart interval information (all
193JPEG-specific stuff) should be stored in the JPEG-encoded fields.
194These define how the JPEG field is encoded. If you omit them,
195applications assume you've used standard encoding. You usually do want
196to add them.</P
197><DIV
198CLASS="TABLE"
199><A
200NAME="V4L2-JPEGCOMPRESSION"
201></A
202><P
203><B
204>Table 1. struct <CODE
205CLASS="STRUCTNAME"
206>v4l2_jpegcompression</CODE
207></B
208></P
209><TABLE
210BORDER="0"
211FRAME="void"
212WIDTH="100%"
213CLASS="CALSTABLE"
214><COL
215WIDTH="25%"
216TITLE="C1"><COL
217WIDTH="25%"
218TITLE="C2"><COL
219WIDTH="50%"
220TITLE="C3"><TBODY
221VALIGN="TOP"
222><TR
223><TD
224>int</TD
225><TD
226><CODE
227CLASS="STRUCTFIELD"
228>quality</CODE
229></TD
230><TD
231>&nbsp;</TD
232></TR
233><TR
234><TD
235>int</TD
236><TD
237><CODE
238CLASS="STRUCTFIELD"
239>APPn</CODE
240></TD
241><TD
242>&nbsp;</TD
243></TR
244><TR
245><TD
246>int</TD
247><TD
248><CODE
249CLASS="STRUCTFIELD"
250>APP_len</CODE
251></TD
252><TD
253>&nbsp;</TD
254></TR
255><TR
256><TD
257>char</TD
258><TD
259><CODE
260CLASS="STRUCTFIELD"
261>APP_data</CODE
262>[60]</TD
263><TD
264>&nbsp;</TD
265></TR
266><TR
267><TD
268>int</TD
269><TD
270><CODE
271CLASS="STRUCTFIELD"
272>COM_len</CODE
273></TD
274><TD
275>&nbsp;</TD
276></TR
277><TR
278><TD
279>char</TD
280><TD
281><CODE
282CLASS="STRUCTFIELD"
283>COM_data</CODE
284>[60]</TD
285><TD
286>&nbsp;</TD
287></TR
288><TR
289><TD
290>__u32</TD
291><TD
292><CODE
293CLASS="STRUCTFIELD"
294>jpeg_markers</CODE
295></TD
296><TD
297>See <A
298HREF="r11285.htm#JPEG-MARKERS"
299>Table 2</A
300>.</TD
301></TR
302></TBODY
303></TABLE
304></DIV
305><DIV
306CLASS="TABLE"
307><A
308NAME="JPEG-MARKERS"
309></A
310><P
311><B
312>Table 2. JPEG Markers Flags</B
313></P
314><TABLE
315BORDER="0"
316FRAME="void"
317WIDTH="100%"
318CLASS="CALSTABLE"
319><COL
320WIDTH="38%"
321TITLE="C1"><COL
322WIDTH="12%"
323TITLE="C2"><COL
324WIDTH="50%"
325TITLE="C3"><TBODY
326VALIGN="TOP"
327><TR
328><TD
329><CODE
330CLASS="CONSTANT"
331>V4L2_JPEG_MARKER_DHT</CODE
332></TD
333><TD
334>(1&lt;&lt;3)</TD
335><TD
336>Define Huffman Tables</TD
337></TR
338><TR
339><TD
340><CODE
341CLASS="CONSTANT"
342>V4L2_JPEG_MARKER_DQT</CODE
343></TD
344><TD
345>(1&lt;&lt;4)</TD
346><TD
347>Define Quantization Tables</TD
348></TR
349><TR
350><TD
351><CODE
352CLASS="CONSTANT"
353>V4L2_JPEG_MARKER_DRI</CODE
354></TD
355><TD
356>(1&lt;&lt;5)</TD
357><TD
358>Define Restart Interval</TD
359></TR
360><TR
361><TD
362><CODE
363CLASS="CONSTANT"
364>V4L2_JPEG_MARKER_COM</CODE
365></TD
366><TD
367>(1&lt;&lt;6)</TD
368><TD
369>Comment segment</TD
370></TR
371><TR
372><TD
373><CODE
374CLASS="CONSTANT"
375>V4L2_JPEG_MARKER_APP</CODE
376></TD
377><TD
378>(1&lt;&lt;7)</TD
379><TD
380>App segment, driver will always use APP0</TD
381></TR
382></TBODY
383></TABLE
384></DIV
385></DIV
386><DIV
387CLASS="REFSECT1"
388><A
389NAME="AEN11418"
390></A
391><H2
392>Return Value</H2
393><P
394>On success <SPAN
395CLASS="RETURNVALUE"
396>0</SPAN
397> is returned, on error <SPAN
398CLASS="RETURNVALUE"
399>-1</SPAN
400> and the <CODE
401CLASS="VARNAME"
402>errno</CODE
403> variable is set appropriately:</P
404><P
405></P
406><DIV
407CLASS="VARIABLELIST"
408><DL
409><DT
410><SPAN
411CLASS="ERRORCODE"
412>EINVAL</SPAN
413></DT
414><DD
415><P
416>This ioctl is not supported.</P
417></DD
418></DL
419></DIV
420></DIV
421><DIV
422CLASS="NAVFOOTER"
423><HR
424ALIGN="LEFT"
425WIDTH="100%"><TABLE
426SUMMARY="Footer navigation table"
427WIDTH="100%"
428BORDER="0"
429CELLPADDING="0"
430CELLSPACING="0"
431><TR
432><TD
433WIDTH="33%"
434ALIGN="left"
435VALIGN="top"
436><A
437HREF="r11217.htm"
438ACCESSKEY="P"
439>Prev</A
440></TD
441><TD
442WIDTH="34%"
443ALIGN="center"
444VALIGN="top"
445><A
446HREF="book1.htm"
447ACCESSKEY="H"
448>Home</A
449></TD
450><TD
451WIDTH="33%"
452ALIGN="right"
453VALIGN="top"
454><A
455HREF="r11430.htm"
456ACCESSKEY="N"
457>Next</A
458></TD
459></TR
460><TR
461><TD
462WIDTH="33%"
463ALIGN="left"
464VALIGN="top"
465>ioctl VIDIOC_G_INPUT, VIDIOC_S_INPUT</TD
466><TD
467WIDTH="34%"
468ALIGN="center"
469VALIGN="top"
470><A
471HREF="r7624.htm"
472ACCESSKEY="U"
473>Up</A
474></TD
475><TD
476WIDTH="33%"
477ALIGN="right"
478VALIGN="top"
479>ioctl VIDIOC_G_MODULATOR, VIDIOC_S_MODULATOR</TD
480></TR
481></TABLE
482></DIV
483></BODY
484></HTML
485>
486