About Kernel Documentation Linux Kernel Contact Linux Resources Linux Blog

Documentation / DocBook / media / v4l / vidioc-subdev-enum-frame-size.xml




Custom Search

Based on kernel version 4.7.2. Page generated on 2016-08-22 22:45 EST.

1	<refentry id="vidioc-subdev-enum-frame-size">
2	  <refmeta>
3	    <refentrytitle>ioctl VIDIOC_SUBDEV_ENUM_FRAME_SIZE</refentrytitle>
4	    &manvol;
5	  </refmeta>
6	
7	  <refnamediv>
8	    <refname>VIDIOC_SUBDEV_ENUM_FRAME_SIZE</refname>
9	    <refpurpose>Enumerate media bus frame sizes</refpurpose>
10	  </refnamediv>
11	
12	  <refsynopsisdiv>
13	    <funcsynopsis>
14	      <funcprototype>
15		<funcdef>int <function>ioctl</function></funcdef>
16		<paramdef>int <parameter>fd</parameter></paramdef>
17		<paramdef>int <parameter>request</parameter></paramdef>
18		<paramdef>struct v4l2_subdev_frame_size_enum *
19		<parameter>argp</parameter></paramdef>
20	      </funcprototype>
21	    </funcsynopsis>
22	  </refsynopsisdiv>
23	
24	  <refsect1>
25	    <title>Arguments</title>
26	
27	    <variablelist>
28	      <varlistentry>
29		<term><parameter>fd</parameter></term>
30		<listitem>
31		  <para>&fd;</para>
32		</listitem>
33	      </varlistentry>
34	      <varlistentry>
35		<term><parameter>request</parameter></term>
36		<listitem>
37		  <para>VIDIOC_SUBDEV_ENUM_FRAME_SIZE</para>
38		</listitem>
39	      </varlistentry>
40	      <varlistentry>
41		<term><parameter>argp</parameter></term>
42		<listitem>
43		  <para></para>
44		</listitem>
45	      </varlistentry>
46	    </variablelist>
47	  </refsect1>
48	
49	  <refsect1>
50	    <title>Description</title>
51	
52	    <para>This ioctl allows applications to enumerate all frame sizes
53	    supported by a sub-device on the given pad for the given media bus format.
54	    Supported formats can be retrieved with the &VIDIOC-SUBDEV-ENUM-MBUS-CODE;
55	    ioctl.</para>
56	
57	    <para>To enumerate frame sizes applications initialize the
58	    <structfield>pad</structfield>, <structfield>which</structfield> ,
59	    <structfield>code</structfield> and <structfield>index</structfield>
60	    fields of the &v4l2-subdev-mbus-code-enum; and call the
61	    <constant>VIDIOC_SUBDEV_ENUM_FRAME_SIZE</constant> ioctl with a pointer to
62	    the structure. Drivers fill the minimum and maximum frame sizes or return
63	    an &EINVAL; if one of the input parameters is invalid.</para>
64	
65	    <para>Sub-devices that only support discrete frame sizes (such as most
66	    sensors) will return one or more frame sizes with identical minimum and
67	    maximum values.</para>
68	
69	    <para>Not all possible sizes in given [minimum, maximum] ranges need to be
70	    supported. For instance, a scaler that uses a fixed-point scaling ratio
71	    might not be able to produce every frame size between the minimum and
72	    maximum values. Applications must use the &VIDIOC-SUBDEV-S-FMT; ioctl to
73	    try the sub-device for an exact supported frame size.</para>
74	
75	    <para>Available frame sizes may depend on the current 'try' formats at other
76	    pads of the sub-device, as well as on the current active links and the
77	    current values of V4L2 controls. See &VIDIOC-SUBDEV-G-FMT; for more
78	    information about try formats.</para>
79	
80	    <table pgwide="1" frame="none" id="v4l2-subdev-frame-size-enum">
81	      <title>struct <structname>v4l2_subdev_frame_size_enum</structname></title>
82	      <tgroup cols="3">
83		&cs-str;
84		<tbody valign="top">
85		  <row>
86		    <entry>__u32</entry>
87		    <entry><structfield>index</structfield></entry>
88		    <entry>Number of the format in the enumeration, set by the
89		    application.</entry>
90		  </row>
91		  <row>
92		    <entry>__u32</entry>
93		    <entry><structfield>pad</structfield></entry>
94		    <entry>Pad number as reported by the media controller API.</entry>
95		  </row>
96		  <row>
97		    <entry>__u32</entry>
98		    <entry><structfield>code</structfield></entry>
99		    <entry>The media bus format code, as defined in
100		    <xref linkend="v4l2-mbus-format" />.</entry>
101		  </row>
102		  <row>
103		    <entry>__u32</entry>
104		    <entry><structfield>min_width</structfield></entry>
105		    <entry>Minimum frame width, in pixels.</entry>
106		  </row>
107		  <row>
108		    <entry>__u32</entry>
109		    <entry><structfield>max_width</structfield></entry>
110		    <entry>Maximum frame width, in pixels.</entry>
111		  </row>
112		  <row>
113		    <entry>__u32</entry>
114		    <entry><structfield>min_height</structfield></entry>
115		    <entry>Minimum frame height, in pixels.</entry>
116		  </row>
117		  <row>
118		    <entry>__u32</entry>
119		    <entry><structfield>max_height</structfield></entry>
120		    <entry>Maximum frame height, in pixels.</entry>
121		  </row>
122		  <row>
123		    <entry>__u32</entry>
124		    <entry><structfield>which</structfield></entry>
125		    <entry>Frame sizes to be enumerated, from &v4l2-subdev-format-whence;.</entry>
126		  </row>
127		  <row>
128		    <entry>__u32</entry>
129		    <entry><structfield>reserved</structfield>[8]</entry>
130		    <entry>Reserved for future extensions. Applications and drivers must
131		    set the array to zero.</entry>
132		  </row>
133		</tbody>
134	      </tgroup>
135	    </table>
136	  </refsect1>
137	
138	  <refsect1>
139	    &return-value;
140	
141	    <variablelist>
142	      <varlistentry>
143		<term><errorcode>EINVAL</errorcode></term>
144		<listitem>
145		  <para>The &v4l2-subdev-frame-size-enum; <structfield>pad</structfield>
146		  references a non-existing pad, the <structfield>code</structfield> is
147		  invalid for the given pad or the <structfield>index</structfield>
148		  field is out of bounds.</para>
149		</listitem>
150	      </varlistentry>
151	    </variablelist>
152	  </refsect1>
153	</refentry>
Hide Line Numbers
About Kernel Documentation Linux Kernel Contact Linux Resources Linux Blog

Information is copyright its respective author. All material is available from the Linux Kernel Source distributed under a GPL License. This page is provided as a free service by mjmwired.net.