Home | History | Annotate | Download | only in spec
      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_ENUMOUTPUT</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_ENUMINPUT"
     17 HREF="r8936.htm"><LINK
     18 REL="NEXT"
     19 TITLE="ioctl VIDIOC_ENUMSTD"
     20 HREF="r9288.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="r8936.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="r9288.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-ENUMOUTPUT"
     74 ></A
     75 >ioctl VIDIOC_ENUMOUTPUT</H1
     76 ><DIV
     77 CLASS="REFNAMEDIV"
     78 ><A
     79 NAME="AEN9153"
     80 ></A
     81 ><H2
     82 >Name</H2
     83 >VIDIOC_ENUMOUTPUT&nbsp;--&nbsp;Enumerate video outputs</DIV
     84 ><DIV
     85 CLASS="REFSYNOPSISDIV"
     86 ><A
     87 NAME="AEN9156"
     88 ></A
     89 ><H2
     90 >Synopsis</H2
     91 ><DIV
     92 CLASS="FUNCSYNOPSIS"
     93 ><P
     94 ></P
     95 ><A
     96 NAME="AEN9157"
     97 ></A
     98 ><P
     99 ><CODE
    100 ><CODE
    101 CLASS="FUNCDEF"
    102 >int ioctl</CODE
    103 >(int fd, int request, struct v4l2_output *argp);</CODE
    104 ></P
    105 ><P
    106 ></P
    107 ></DIV
    108 ></DIV
    109 ><DIV
    110 CLASS="REFSECT1"
    111 ><A
    112 NAME="AEN9167"
    113 ></A
    114 ><H2
    115 >Arguments</H2
    116 ><P
    117 ></P
    118 ><DIV
    119 CLASS="VARIABLELIST"
    120 ><DL
    121 ><DT
    122 ><CODE
    123 CLASS="PARAMETER"
    124 >fd</CODE
    125 ></DT
    126 ><DD
    127 ><P
    128 >File descriptor returned by <A
    129 HREF="r14090.htm"
    130 ><CODE
    131 CLASS="FUNCTION"
    132 >open()</CODE
    133 ></A
    134 >.</P
    135 ></DD
    136 ><DT
    137 ><CODE
    138 CLASS="PARAMETER"
    139 >request</CODE
    140 ></DT
    141 ><DD
    142 ><P
    143 >VIDIOC_ENUMOUTPUT</P
    144 ></DD
    145 ><DT
    146 ><CODE
    147 CLASS="PARAMETER"
    148 >argp</CODE
    149 ></DT
    150 ><DD
    151 ><P
    152 ></P
    153 ></DD
    154 ></DL
    155 ></DIV
    156 ></DIV
    157 ><DIV
    158 CLASS="REFSECT1"
    159 ><A
    160 NAME="AEN9187"
    161 ></A
    162 ><H2
    163 >Description</H2
    164 ><P
    165 >To query the attributes of a video outputs applications
    166 initialize the <CODE
    167 CLASS="STRUCTFIELD"
    168 >index</CODE
    169 > field of struct&nbsp;<A
    170 HREF="r9149.htm#V4L2-OUTPUT"
    171 >v4l2_output</A
    172 >
    173 and call the <CODE
    174 CLASS="CONSTANT"
    175 >VIDIOC_ENUMOUTPUT</CODE
    176 > ioctl with a
    177 pointer to this structure. Drivers fill the rest of the structure or
    178 return an <SPAN
    179 CLASS="ERRORCODE"
    180 >EINVAL</SPAN
    181 > error code when the index is out of bounds. To enumerate all
    182 outputs applications shall begin at index zero, incrementing by one
    183 until the driver returns <SPAN
    184 CLASS="ERRORCODE"
    185 >EINVAL</SPAN
    186 >.</P
    187 ><DIV
    188 CLASS="TABLE"
    189 ><A
    190 NAME="V4L2-OUTPUT"
    191 ></A
    192 ><P
    193 ><B
    194 >Table 1. struct <CODE
    195 CLASS="STRUCTNAME"
    196 >v4l2_output</CODE
    197 ></B
    198 ></P
    199 ><TABLE
    200 BORDER="0"
    201 FRAME="void"
    202 WIDTH="100%"
    203 CLASS="CALSTABLE"
    204 ><COL
    205 WIDTH="25%"
    206 TITLE="C1"><COL
    207 WIDTH="25%"
    208 TITLE="C2"><COL
    209 WIDTH="50%"
    210 TITLE="C3"><TBODY
    211 VALIGN="TOP"
    212 ><TR
    213 ><TD
    214 >__u32</TD
    215 ><TD
    216 ><CODE
    217 CLASS="STRUCTFIELD"
    218 >index</CODE
    219 ></TD
    220 ><TD
    221 >Identifies the output, set by the
    222 application.</TD
    223 ></TR
    224 ><TR
    225 ><TD
    226 >__u8</TD
    227 ><TD
    228 ><CODE
    229 CLASS="STRUCTFIELD"
    230 >name</CODE
    231 >[32]</TD
    232 ><TD
    233 >Name of the video output, a NUL-terminated ASCII
    234 string, for example: "Vout". This information is intended for the
    235 user, preferably the connector label on the device itself.</TD
    236 ></TR
    237 ><TR
    238 ><TD
    239 >__u32</TD
    240 ><TD
    241 ><CODE
    242 CLASS="STRUCTFIELD"
    243 >type</CODE
    244 ></TD
    245 ><TD
    246 >Type of the output, see <A
    247 HREF="r9149.htm#OUTPUT-TYPE"
    248 >Table 2</A
    249 >.</TD
    250 ></TR
    251 ><TR
    252 ><TD
    253 >__u32</TD
    254 ><TD
    255 ><CODE
    256 CLASS="STRUCTFIELD"
    257 >audioset</CODE
    258 ></TD
    259 ><TD
    260 ><P
    261 >Drivers can enumerate up to 32 video and
    262 audio outputs. This field shows which audio outputs were
    263 selectable as the current output if this was the currently selected
    264 video output. It is a bit mask. The LSB corresponds to audio output 0,
    265 the MSB to output 31. Any number of bits can be set, or
    266 none.</P
    267 ><P
    268 >When the driver does not enumerate audio outputs no
    269 bits must be set. Applications shall not interpret this as lack of
    270 audio support. Drivers may automatically select audio outputs without
    271 enumerating them.</P
    272 ><P
    273 >For details on audio outputs and how to
    274 select the current output see <A
    275 HREF="x341.htm"
    276 >Section 1.5</A
    277 >.</P
    278 ></TD
    279 ></TR
    280 ><TR
    281 ><TD
    282 >__u32</TD
    283 ><TD
    284 ><CODE
    285 CLASS="STRUCTFIELD"
    286 >modulator</CODE
    287 ></TD
    288 ><TD
    289 >Output devices can have zero or more RF modulators.
    290 When the <CODE
    291 CLASS="STRUCTFIELD"
    292 >type</CODE
    293 > is
    294 <CODE
    295 CLASS="CONSTANT"
    296 >V4L2_OUTPUT_TYPE_MODULATOR</CODE
    297 > this is an RF
    298 connector and this field identifies the modulator. It corresponds to
    299 struct&nbsp;<A
    300 HREF="r11430.htm#V4L2-MODULATOR"
    301 >v4l2_modulator</A
    302 > field <CODE
    303 CLASS="STRUCTFIELD"
    304 >index</CODE
    305 >. For details
    306 on modulators see <A
    307 HREF="x394.htm"
    308 >Section 1.6</A
    309 >.</TD
    310 ></TR
    311 ><TR
    312 ><TD
    313 ><A
    314 HREF="r9288.htm#V4L2-STD-ID"
    315 >v4l2_std_id</A
    316 ></TD
    317 ><TD
    318 ><CODE
    319 CLASS="STRUCTFIELD"
    320 >std</CODE
    321 ></TD
    322 ><TD
    323 >Every video output supports one or more different
    324 video standards. This field is a set of all supported standards. For
    325 details on video standards and how to switch see <A
    326 HREF="x448.htm"
    327 >Section 1.7</A
    328 >.</TD
    329 ></TR
    330 ><TR
    331 ><TD
    332 >__u32</TD
    333 ><TD
    334 ><CODE
    335 CLASS="STRUCTFIELD"
    336 >reserved</CODE
    337 >[4]</TD
    338 ><TD
    339 >Reserved for future extensions. Drivers must set
    340 the array to zero.</TD
    341 ></TR
    342 ></TBODY
    343 ></TABLE
    344 ></DIV
    345 ><DIV
    346 CLASS="TABLE"
    347 ><A
    348 NAME="OUTPUT-TYPE"
    349 ></A
    350 ><P
    351 ><B
    352 >Table 2. Output Type</B
    353 ></P
    354 ><TABLE
    355 BORDER="0"
    356 FRAME="void"
    357 WIDTH="100%"
    358 CLASS="CALSTABLE"
    359 ><COL
    360 WIDTH="38%"
    361 TITLE="C1"><COL
    362 WIDTH="12%"
    363 TITLE="C2"><COL
    364 WIDTH="50%"
    365 TITLE="C3"><TBODY
    366 VALIGN="TOP"
    367 ><TR
    368 ><TD
    369 ><CODE
    370 CLASS="CONSTANT"
    371 >V4L2_OUTPUT_TYPE_MODULATOR</CODE
    372 ></TD
    373 ><TD
    374 >1</TD
    375 ><TD
    376 >This output is an analog TV modulator.</TD
    377 ></TR
    378 ><TR
    379 ><TD
    380 ><CODE
    381 CLASS="CONSTANT"
    382 >V4L2_OUTPUT_TYPE_ANALOG</CODE
    383 ></TD
    384 ><TD
    385 >2</TD
    386 ><TD
    387 >Analog baseband output, for example Composite /
    388 CVBS, S-Video, RGB.</TD
    389 ></TR
    390 ><TR
    391 ><TD
    392 ><CODE
    393 CLASS="CONSTANT"
    394 >V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY</CODE
    395 ></TD
    396 ><TD
    397 >3</TD
    398 ><TD
    399 >[?]</TD
    400 ></TR
    401 ></TBODY
    402 ></TABLE
    403 ></DIV
    404 ></DIV
    405 ><DIV
    406 CLASS="REFSECT1"
    407 ><A
    408 NAME="AEN9274"
    409 ></A
    410 ><H2
    411 >Return Value</H2
    412 ><P
    413 >On success <SPAN
    414 CLASS="RETURNVALUE"
    415 >0</SPAN
    416 > is returned, on error <SPAN
    417 CLASS="RETURNVALUE"
    418 >-1</SPAN
    419 > and the <CODE
    420 CLASS="VARNAME"
    421 >errno</CODE
    422 > variable is set appropriately:</P
    423 ><P
    424 ></P
    425 ><DIV
    426 CLASS="VARIABLELIST"
    427 ><DL
    428 ><DT
    429 ><SPAN
    430 CLASS="ERRORCODE"
    431 >EINVAL</SPAN
    432 ></DT
    433 ><DD
    434 ><P
    435 >The struct&nbsp;<A
    436 HREF="r9149.htm#V4L2-OUTPUT"
    437 >v4l2_output</A
    438 > <CODE
    439 CLASS="STRUCTFIELD"
    440 >index</CODE
    441 >
    442 is out of bounds.</P
    443 ></DD
    444 ></DL
    445 ></DIV
    446 ></DIV
    447 ><DIV
    448 CLASS="NAVFOOTER"
    449 ><HR
    450 ALIGN="LEFT"
    451 WIDTH="100%"><TABLE
    452 SUMMARY="Footer navigation table"
    453 WIDTH="100%"
    454 BORDER="0"
    455 CELLPADDING="0"
    456 CELLSPACING="0"
    457 ><TR
    458 ><TD
    459 WIDTH="33%"
    460 ALIGN="left"
    461 VALIGN="top"
    462 ><A
    463 HREF="r8936.htm"
    464 ACCESSKEY="P"
    465 >Prev</A
    466 ></TD
    467 ><TD
    468 WIDTH="34%"
    469 ALIGN="center"
    470 VALIGN="top"
    471 ><A
    472 HREF="book1.htm"
    473 ACCESSKEY="H"
    474 >Home</A
    475 ></TD
    476 ><TD
    477 WIDTH="33%"
    478 ALIGN="right"
    479 VALIGN="top"
    480 ><A
    481 HREF="r9288.htm"
    482 ACCESSKEY="N"
    483 >Next</A
    484 ></TD
    485 ></TR
    486 ><TR
    487 ><TD
    488 WIDTH="33%"
    489 ALIGN="left"
    490 VALIGN="top"
    491 >ioctl VIDIOC_ENUMINPUT</TD
    492 ><TD
    493 WIDTH="34%"
    494 ALIGN="center"
    495 VALIGN="top"
    496 ><A
    497 HREF="r7624.htm"
    498 ACCESSKEY="U"
    499 >Up</A
    500 ></TD
    501 ><TD
    502 WIDTH="33%"
    503 ALIGN="right"
    504 VALIGN="top"
    505 >ioctl VIDIOC_ENUMSTD</TD
    506 ></TR
    507 ></TABLE
    508 ></DIV
    509 ></BODY
    510 ></HTML
    511 >
    512