1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Querying Capabilities</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="common.html" title="Chapter&#160;1.&#160;Common API Elements"><link rel="prev" href="common.html" title="Chapter&#160;1.&#160;Common API Elements"><link rel="next" href="app-pri.html" title="Application Priority"></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">Querying Capabilities</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="common.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;1.&#160;Common API Elements</th><td width="20%" align="right">&#160;<a accesskey="n" href="app-pri.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="querycap"></a>Querying Capabilities</h2></div></div></div><p>Because V4L2 covers a wide variety of devices not all
2aspects of the API are equally applicable to all types of devices.
3Furthermore devices of the same type have different capabilities and
4this specification permits the omission of a few complicated and less
5important parts of the API.</p><p>The <a class="link" href="vidioc-querycap.html" title="ioctl VIDIOC_QUERYCAP"><code class="constant">VIDIOC_QUERYCAP</code></a> ioctl is available to check if the kernel
6device is compatible with this specification, and to query the <a class="link" href="devices.html" title="Chapter&#160;4.&#160;Interfaces">functions</a> and <a class="link" href="io.html" title="Chapter&#160;3.&#160;Input/Output">I/O
7methods</a> supported by the device.</p><p>Starting with kernel version 3.1, VIDIOC-QUERYCAP will return the
8V4L2 API version used by the driver, with generally matches the Kernel version.
9There's no need of using <a class="link" href="vidioc-querycap.html" title="ioctl VIDIOC_QUERYCAP"><code class="constant">VIDIOC_QUERYCAP</code></a> to check if a specific ioctl is
10supported, the V4L2 core now returns ENOTTY if a driver doesn't provide
11support for an ioctl.</p><p>Other features can be queried
12by calling the respective ioctl, for example <a class="link" href="vidioc-enuminput.html" title="ioctl VIDIOC_ENUMINPUT"><code class="constant">VIDIOC_ENUMINPUT</code></a>
13to learn about the number, types and names of video connectors on the
14device. Although abstraction is a major objective of this API, the
15<a class="link" href="vidioc-querycap.html" title="ioctl VIDIOC_QUERYCAP"><code class="constant">VIDIOC_QUERYCAP</code></a> ioctl also allows driver specific applications to reliably identify
16the driver.</p><p>All V4L2 drivers must support
17<code class="constant">VIDIOC_QUERYCAP</code>. Applications should always call
18this ioctl after opening the device.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="common.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="common.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="app-pri.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&#160;1.&#160;Common API Elements&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;Application Priority</td></tr></table></div></body></html>
19