brintos

brintos / linux-shallow public Read only

0
0
Text · 3.0 KiB · d4565d2 Raw
125 lines · plain
1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later2.. c:namespace:: V4L3 4.. _VIDIOC_G_JPEGCOMP:5 6******************************************7ioctl VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP8******************************************9 10Name11====12 13VIDIOC_G_JPEGCOMP - VIDIOC_S_JPEGCOMP14 15Synopsis16========17 18.. c:macro:: VIDIOC_G_JPEGCOMP19 20``int ioctl(int fd, VIDIOC_G_JPEGCOMP, v4l2_jpegcompression *argp)``21 22.. c:macro:: VIDIOC_S_JPEGCOMP23 24``int ioctl(int fd, VIDIOC_S_JPEGCOMP, const v4l2_jpegcompression *argp)``25 26Arguments27=========28 29``fd``30    File descriptor returned by :c:func:`open()`.31 32``argp``33    Pointer to struct :c:type:`v4l2_jpegcompression`.34 35Description36===========37 38These ioctls are **deprecated**. New drivers and applications should use39:ref:`JPEG class controls <jpeg-controls>` for image quality and JPEG40markers control.41 42[to do]43 44Ronald Bultje elaborates:45 46APP is some application-specific information. The application can set it47itself, and it'll be stored in the JPEG-encoded fields (eg; interlacing48information 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 tables52and the restart interval information (all JPEG-specific stuff) should be53stored in the JPEG-encoded fields. These define how the JPEG field is54encoded. If you omit them, applications assume you've used standard55encoding. You usually do want to add them.56 57.. tabularcolumns:: |p{1.2cm}|p{3.0cm}|p{13.1cm}|58 59.. c:type:: v4l2_jpegcompression60 61.. flat-table:: struct v4l2_jpegcompression62    :header-rows:  063    :stub-columns: 064    :widths:       1 1 265 66    * - int67      - ``quality``68      - Deprecated. If69	:ref:`V4L2_CID_JPEG_COMPRESSION_QUALITY <jpeg-quality-control>`70	control is exposed by a driver applications should use it instead71	and ignore this field.72    * - int73      - ``APPn``74      -75    * - int76      - ``APP_len``77      -78    * - char79      - ``APP_data``\ [60]80      -81    * - int82      - ``COM_len``83      -84    * - char85      - ``COM_data``\ [60]86      -87    * - __u3288      - ``jpeg_markers``89      - See :ref:`jpeg-markers`. Deprecated. If90	:ref:`V4L2_CID_JPEG_ACTIVE_MARKER <jpeg-active-marker-control>`91	control is exposed by a driver applications should use it instead92	and ignore this field.93 94.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.5cm}|95 96.. _jpeg-markers:97 98.. flat-table:: JPEG Markers Flags99    :header-rows:  0100    :stub-columns: 0101    :widths:       3 1 4102 103    * - ``V4L2_JPEG_MARKER_DHT``104      - (1<<3)105      - Define Huffman Tables106    * - ``V4L2_JPEG_MARKER_DQT``107      - (1<<4)108      - Define Quantization Tables109    * - ``V4L2_JPEG_MARKER_DRI``110      - (1<<5)111      - Define Restart Interval112    * - ``V4L2_JPEG_MARKER_COM``113      - (1<<6)114      - Comment segment115    * - ``V4L2_JPEG_MARKER_APP``116      - (1<<7)117      - App segment, driver will always use APP0118 119Return Value120============121 122On success 0 is returned, on error -1 and the ``errno`` variable is set123appropriately. The generic error codes are described at the124:ref:`Generic Error Codes <gen-errors>` chapter.125