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