1<refentry id="vidioc-g-jpegcomp"> 2 <refmeta> 3 <refentrytitle>ioctl VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP</refentrytitle> 4 &manvol; 5 </refmeta> 6 7 <refnamediv> 8 <refname>VIDIOC_G_JPEGCOMP</refname> 9 <refname>VIDIOC_S_JPEGCOMP</refname> 10 <refpurpose></refpurpose> 11 </refnamediv> 12 13 <refsynopsisdiv> 14 <funcsynopsis> 15 <funcprototype> 16 <funcdef>int <function>ioctl</function></funcdef> 17 <paramdef>int <parameter>fd</parameter></paramdef> 18 <paramdef>int <parameter>request</parameter></paramdef> 19 <paramdef>v4l2_jpegcompression *<parameter>argp</parameter></paramdef> 20 </funcprototype> 21 </funcsynopsis> 22 <funcsynopsis> 23 <funcprototype> 24 <funcdef>int <function>ioctl</function></funcdef> 25 <paramdef>int <parameter>fd</parameter></paramdef> 26 <paramdef>int <parameter>request</parameter></paramdef> 27 <paramdef>const v4l2_jpegcompression *<parameter>argp</parameter></paramdef> 28 </funcprototype> 29 </funcsynopsis> 30 </refsynopsisdiv> 31 32 <refsect1> 33 <title>Arguments</title> 34 35 <variablelist> 36 <varlistentry> 37 <term><parameter>fd</parameter></term> 38 <listitem> 39 <para>&fd;</para> 40 </listitem> 41 </varlistentry> 42 <varlistentry> 43 <term><parameter>request</parameter></term> 44 <listitem> 45 <para>VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP</para> 46 </listitem> 47 </varlistentry> 48 <varlistentry> 49 <term><parameter>argp</parameter></term> 50 <listitem> 51 <para></para> 52 </listitem> 53 </varlistentry> 54 </variablelist> 55 </refsect1> 56 57 <refsect1> 58 <title>Description</title> 59 60 <para>[to do]</para> 61 62 <para>Ronald Bultje elaborates:</para> 63 64 <!-- See video4linux-list@redhat.com on 16 Oct 2002, subject 65"Re: [V4L] Re: v4l2 api / Zoran v4l2_jpegcompression" --> 66 67 <para>APP is some application-specific information. The 68application can set it itself, and it'll be stored in the JPEG-encoded 69fields (eg; interlacing information for in an AVI or so). COM is the 70same, but it's comments, like 'encoded by me' or so.</para> 71 72 <para>jpeg_markers describes whether the huffman tables, 73quantization tables and the restart interval information (all 74JPEG-specific stuff) should be stored in the JPEG-encoded fields. 75These define how the JPEG field is encoded. If you omit them, 76applications assume you've used standard encoding. You usually do want 77to add them.</para> 78 79 <!-- NB VIDIOC_S_JPEGCOMP is w/o. --> 80 81 <table pgwide="1" frame="none" id="v4l2-jpegcompression"> 82 <title>struct <structname>v4l2_jpegcompression</structname></title> 83 <tgroup cols="3"> 84 &cs-str; 85 <tbody valign="top"> 86 <row> 87 <entry>int</entry> 88 <entry><structfield>quality</structfield></entry> 89 <entry></entry> 90 </row> 91 <row> 92 <entry>int</entry> 93 <entry><structfield>APPn</structfield></entry> 94 <entry></entry> 95 </row> 96 <row> 97 <entry>int</entry> 98 <entry><structfield>APP_len</structfield></entry> 99 <entry></entry> 100 </row> 101 <row> 102 <entry>char</entry> 103 <entry><structfield>APP_data</structfield>[60]</entry> 104 <entry></entry> 105 </row> 106 <row> 107 <entry>int</entry> 108 <entry><structfield>COM_len</structfield></entry> 109 <entry></entry> 110 </row> 111 <row> 112 <entry>char</entry> 113 <entry><structfield>COM_data</structfield>[60]</entry> 114 <entry></entry> 115 </row> 116 <row> 117 <entry>__u32</entry> 118 <entry><structfield>jpeg_markers</structfield></entry> 119 <entry>See <xref linkend="jpeg-markers" />.</entry> 120 </row> 121 </tbody> 122 </tgroup> 123 </table> 124 125 <table pgwide="1" frame="none" id="jpeg-markers"> 126 <title>JPEG Markers Flags</title> 127 <tgroup cols="3"> 128 &cs-def; 129 <tbody valign="top"> 130 <row> 131 <entry><constant>V4L2_JPEG_MARKER_DHT</constant></entry> 132 <entry>(1<<3)</entry> 133 <entry>Define Huffman Tables</entry> 134 </row> 135 <row> 136 <entry><constant>V4L2_JPEG_MARKER_DQT</constant></entry> 137 <entry>(1<<4)</entry> 138 <entry>Define Quantization Tables</entry> 139 </row> 140 <row> 141 <entry><constant>V4L2_JPEG_MARKER_DRI</constant></entry> 142 <entry>(1<<5)</entry> 143 <entry>Define Restart Interval</entry> 144 </row> 145 <row> 146 <entry><constant>V4L2_JPEG_MARKER_COM</constant></entry> 147 <entry>(1<<6)</entry> 148 <entry>Comment segment</entry> 149 </row> 150 <row> 151 <entry><constant>V4L2_JPEG_MARKER_APP</constant></entry> 152 <entry>(1<<7)</entry> 153 <entry>App segment, driver will always use APP0</entry> 154 </row> 155 </tbody> 156 </tgroup> 157 </table> 158 </refsect1> 159 160 <refsect1> 161 &return-value; 162 </refsect1> 163</refentry> 164