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 >Streaming Parameters</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="Common API Elements" 14 HREF="c174.htm"><LINK 15 REL="PREVIOUS" 16 TITLE="Image Cropping, Insertion and Scaling" 17 HREF="x1904.htm"><LINK 18 REL="NEXT" 19 TITLE="Image Formats" 20 HREF="c2030.htm"></HEAD 21 ><BODY 22 CLASS="SECTION" 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="x1904.htm" 49 ACCESSKEY="P" 50 >Prev</A 51 ></TD 52 ><TD 53 WIDTH="80%" 54 ALIGN="center" 55 VALIGN="bottom" 56 >Chapter 1. Common API Elements</TD 57 ><TD 58 WIDTH="10%" 59 ALIGN="right" 60 VALIGN="bottom" 61 ><A 62 HREF="c2030.htm" 63 ACCESSKEY="N" 64 >Next</A 65 ></TD 66 ></TR 67 ></TABLE 68 ><HR 69 ALIGN="LEFT" 70 WIDTH="100%"></DIV 71 ><DIV 72 CLASS="SECTION" 73 ><H1 74 CLASS="SECTION" 75 ><A 76 NAME="STREAMING-PAR" 77 >1.12. Streaming Parameters</A 78 ></H1 79 ><P 80 >Streaming parameters are intended to optimize the video 81 capture process as well as I/O. Presently applications can request a 82 high quality capture mode with the <A 83 HREF="r11680.htm" 84 ><CODE 85 CLASS="CONSTANT" 86 >VIDIOC_S_PARM</CODE 87 ></A 88 > ioctl.</P 89 ><P 90 >The current video standard determines a nominal number of 91 frames per second. If less than this number of frames is to be 92 captured or output, applications can request frame skipping or 93 duplicating on the driver side. This is especially useful when using 94 the <A 95 HREF="r14264.htm" 96 ><CODE 97 CLASS="FUNCTION" 98 >read()</CODE 99 ></A 100 > or <A 101 HREF="r14496.htm" 102 ><CODE 103 CLASS="FUNCTION" 104 >write()</CODE 105 ></A 106 >, which are not augmented by timestamps 107 or sequence counters, and to avoid unneccessary data copying.</P 108 ><P 109 >Finally these ioctls can be used to determine the number of 110 buffers used internally by a driver in read/write mode. For 111 implications see the section discussing the <A 112 HREF="r14264.htm" 113 ><CODE 114 CLASS="FUNCTION" 115 >read()</CODE 116 ></A 117 > 118 function.</P 119 ><P 120 >To get and set the streaming parameters applications call 121 the <A 122 HREF="r11680.htm" 123 ><CODE 124 CLASS="CONSTANT" 125 >VIDIOC_G_PARM</CODE 126 ></A 127 > and <A 128 HREF="r11680.htm" 129 ><CODE 130 CLASS="CONSTANT" 131 >VIDIOC_S_PARM</CODE 132 ></A 133 > ioctl, respectively. They take 134 a pointer to a struct <A 135 HREF="r11680.htm#V4L2-STREAMPARM" 136 >v4l2_streamparm</A 137 >, which contains a union holding 138 separate parameters for input and output devices.</P 139 ><P 140 >These ioctls are optional, drivers need not implement 141 them. If so, they return the <SPAN 142 CLASS="ERRORCODE" 143 >EINVAL</SPAN 144 > error code.</P 145 ></DIV 146 ><DIV 147 CLASS="NAVFOOTER" 148 ><HR 149 ALIGN="LEFT" 150 WIDTH="100%"><TABLE 151 SUMMARY="Footer navigation table" 152 WIDTH="100%" 153 BORDER="0" 154 CELLPADDING="0" 155 CELLSPACING="0" 156 ><TR 157 ><TD 158 WIDTH="33%" 159 ALIGN="left" 160 VALIGN="top" 161 ><A 162 HREF="x1904.htm" 163 ACCESSKEY="P" 164 >Prev</A 165 ></TD 166 ><TD 167 WIDTH="34%" 168 ALIGN="center" 169 VALIGN="top" 170 ><A 171 HREF="book1.htm" 172 ACCESSKEY="H" 173 >Home</A 174 ></TD 175 ><TD 176 WIDTH="33%" 177 ALIGN="right" 178 VALIGN="top" 179 ><A 180 HREF="c2030.htm" 181 ACCESSKEY="N" 182 >Next</A 183 ></TD 184 ></TR 185 ><TR 186 ><TD 187 WIDTH="33%" 188 ALIGN="left" 189 VALIGN="top" 190 >Image Cropping, Insertion and Scaling</TD 191 ><TD 192 WIDTH="34%" 193 ALIGN="center" 194 VALIGN="top" 195 ><A 196 HREF="c174.htm" 197 ACCESSKEY="U" 198 >Up</A 199 ></TD 200 ><TD 201 WIDTH="33%" 202 ALIGN="right" 203 VALIGN="top" 204 >Image Formats</TD 205 ></TR 206 ></TABLE 207 ></DIV 208 ></BODY 209 ></HTML 210 > 211