1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>ioctl VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="LINUX MEDIA INFRASTRUCTURE API"><link rel="up" href="user-func.html" title="Appendix A. Function Reference"><link rel="prev" href="vidioc-g-input.html" title="ioctl VIDIOC_G_INPUT, VIDIOC_S_INPUT"><link rel="next" href="vidioc-g-modulator.html" title="ioctl VIDIOC_G_MODULATOR, VIDIOC_S_MODULATOR"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">ioctl VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="vidioc-g-input.html">Prev</a> </td><th width="60%" align="center">Appendix A. Function Reference</th><td width="20%" align="right"> <a accesskey="n" href="vidioc-g-modulator.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="vidioc-g-jpegcomp"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">ioctl</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">request</var>, </td></tr><tr><td> </td><td>v4l2_jpegcompression *<var class="pdparam">argp</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">ioctl</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">request</var>, </td></tr><tr><td> </td><td>const v4l2_jpegcompression *<var class="pdparam">argp</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1114669980"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>fd</code></em></span></dt><dd><p>File descriptor returned by <a class="link" href="func-open.html" title="V4L2 open()"><code class="function">open()</code></a>.</p></dd><dt><span class="term"><em class="parameter"><code>request</code></em></span></dt><dd><p>VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP</p></dd><dt><span class="term"><em class="parameter"><code>argp</code></em></span></dt><dd><p></p></dd></dl></div></div><div class="refsect1"><a name="idp1114707204"></a><h2>Description</h2><p>These ioctls are <span class="bold"><strong>deprecated</strong></span>. 2 New drivers and applications should use <a class="link" href="extended-controls.html#jpeg-controls" title="JPEG Control Reference"> 3 JPEG class controls</a> for image quality and JPEG markers control. 4 </p><p>[to do]</p><p>Ronald Bultje elaborates:</p><p>APP is some application-specific information. The 5application can set it itself, and it'll be stored in the JPEG-encoded 6fields (eg; interlacing information for in an AVI or so). COM is the 7same, but it's comments, like 'encoded by me' or so.</p><p>jpeg_markers describes whether the huffman tables, 8quantization tables and the restart interval information (all 9JPEG-specific stuff) should be stored in the JPEG-encoded fields. 10These define how the JPEG field is encoded. If you omit them, 11applications assume you've used standard encoding. You usually do want 12to add them.</p><div class="table"><a name="v4l2-jpegcompression"></a><p class="title"><b>Table A.74. struct <span class="structname">v4l2_jpegcompression</span></b></p><div class="table-contents"><table summary="struct v4l2_jpegcompression" width="100%" border="0"><colgroup><col class="c1"><col class="c2"><col class="c3"></colgroup><tbody valign="top"><tr><td valign="top">int</td><td valign="top"><em class="structfield"><code>quality</code></em></td><td valign="top">Deprecated. If <a class="link" href="extended-controls.html#jpeg-quality-control"><code class="constant"> 13 V4L2_CID_JPEG_COMPRESSION_QUALITY</code></a> control is exposed 14 by a driver applications should use it instead and ignore this field. 15 </td></tr><tr><td valign="top">int</td><td valign="top"><em class="structfield"><code>APPn</code></em></td><td valign="top"> </td></tr><tr><td valign="top">int</td><td valign="top"><em class="structfield"><code>APP_len</code></em></td><td valign="top"> </td></tr><tr><td valign="top">char</td><td valign="top"><em class="structfield"><code>APP_data</code></em>[60]</td><td valign="top"> </td></tr><tr><td valign="top">int</td><td valign="top"><em class="structfield"><code>COM_len</code></em></td><td valign="top"> </td></tr><tr><td valign="top">char</td><td valign="top"><em class="structfield"><code>COM_data</code></em>[60]</td><td valign="top"> </td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>jpeg_markers</code></em></td><td valign="top">See <a class="xref" href="vidioc-g-jpegcomp.html#jpeg-markers" title="Table A.75. JPEG Markers Flags">Table A.75, “JPEG Markers Flags”</a>. Deprecated. 16 If <a class="link" href="extended-controls.html#jpeg-active-marker-control"><code class="constant"> 17 V4L2_CID_JPEG_ACTIVE_MARKER</code></a> control 18 is exposed by a driver applications should use it instead 19 and ignore this field.</td></tr></tbody></table></div></div><br class="table-break"><div class="table"><a name="jpeg-markers"></a><p class="title"><b>Table A.75. JPEG Markers Flags</b></p><div class="table-contents"><table summary="JPEG Markers Flags" width="100%" border="0"><colgroup><col class="c1"><col class="c2"><col class="c3"></colgroup><tbody valign="top"><tr><td valign="top"><code class="constant">V4L2_JPEG_MARKER_DHT</code></td><td valign="top">(1<<3)</td><td valign="top">Define Huffman Tables</td></tr><tr><td valign="top"><code class="constant">V4L2_JPEG_MARKER_DQT</code></td><td valign="top">(1<<4)</td><td valign="top">Define Quantization Tables</td></tr><tr><td valign="top"><code class="constant">V4L2_JPEG_MARKER_DRI</code></td><td valign="top">(1<<5)</td><td valign="top">Define Restart Interval</td></tr><tr><td valign="top"><code class="constant">V4L2_JPEG_MARKER_COM</code></td><td valign="top">(1<<6)</td><td valign="top">Comment segment</td></tr><tr><td valign="top"><code class="constant">V4L2_JPEG_MARKER_APP</code></td><td valign="top">(1<<7)</td><td valign="top">App segment, driver will always use APP0</td></tr></tbody></table></div></div><br class="table-break"></div><div class="refsect1"><a name="idp1114729172"></a><h2>Return Value</h2><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 19.1. Generic error codes">Generic Error Codes</a> chapter.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="vidioc-g-input.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="user-func.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="vidioc-g-modulator.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">ioctl VIDIOC_G_INPUT, VIDIOC_S_INPUT </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> ioctl VIDIOC_G_MODULATOR, VIDIOC_S_MODULATOR</td></tr></table></div></body></html> 20