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 >Application Priority</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="Querying Capabilities"
     17 HREF="x282.htm"><LINK
     18 REL="NEXT"
     19 TITLE="Video Inputs and Outputs"
     20 HREF="x309.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="x282.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="x309.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="APP-PRI"
     77 >1.3. Application Priority</A
     78 ></H1
     79 ><P
     80 >When multiple applications share a device it may be
     81 desirable to assign them different priorities. Contrary to the
     82 traditional "rm -rf /" school of thought a video recording application
     83 could for example block other applications from changing video
     84 controls or switching the current TV channel. Another objective is to
     85 permit low priority applications working in background, which can be
     86 preempted by user controlled applications and automatically regain
     87 control of the device at a later time.</P
     88 ><P
     89 >Since these features cannot be implemented entirely in user
     90 space V4L2 defines the <A
     91 HREF="r11946.htm"
     92 ><CODE
     93 CLASS="CONSTANT"
     94 >VIDIOC_G_PRIORITY</CODE
     95 ></A
     96 > and <A
     97 HREF="r11946.htm"
     98 ><CODE
     99 CLASS="CONSTANT"
    100 >VIDIOC_S_PRIORITY</CODE
    101 ></A
    102 >
    103 ioctls to request and query the access priority associate with a file
    104 descriptor. Opening a device assigns a medium priority, compatible
    105 with earlier versions of V4L2 and drivers not supporting these ioctls.
    106 Applications requiring a different priority will usually call
    107 <CODE
    108 CLASS="CONSTANT"
    109 >VIDIOC_S_PRIORITY</CODE
    110 > after verifying the device with
    111 the <A
    112 HREF="r13105.htm"
    113 ><CODE
    114 CLASS="CONSTANT"
    115 >VIDIOC_QUERYCAP</CODE
    116 ></A
    117 > ioctl.</P
    118 ><P
    119 >Ioctls changing driver properties, such as <A
    120 HREF="r11217.htm"
    121 ><CODE
    122 CLASS="CONSTANT"
    123 >VIDIOC_S_INPUT</CODE
    124 ></A
    125 >,
    126 return an <SPAN
    127 CLASS="ERRORCODE"
    128 >EBUSY</SPAN
    129 > error code after another application obtained higher priority.
    130 An event mechanism to notify applications about asynchronous property
    131 changes has been proposed but not added yet.</P
    132 ></DIV
    133 ><DIV
    134 CLASS="NAVFOOTER"
    135 ><HR
    136 ALIGN="LEFT"
    137 WIDTH="100%"><TABLE
    138 SUMMARY="Footer navigation table"
    139 WIDTH="100%"
    140 BORDER="0"
    141 CELLPADDING="0"
    142 CELLSPACING="0"
    143 ><TR
    144 ><TD
    145 WIDTH="33%"
    146 ALIGN="left"
    147 VALIGN="top"
    148 ><A
    149 HREF="x282.htm"
    150 ACCESSKEY="P"
    151 >Prev</A
    152 ></TD
    153 ><TD
    154 WIDTH="34%"
    155 ALIGN="center"
    156 VALIGN="top"
    157 ><A
    158 HREF="book1.htm"
    159 ACCESSKEY="H"
    160 >Home</A
    161 ></TD
    162 ><TD
    163 WIDTH="33%"
    164 ALIGN="right"
    165 VALIGN="top"
    166 ><A
    167 HREF="x309.htm"
    168 ACCESSKEY="N"
    169 >Next</A
    170 ></TD
    171 ></TR
    172 ><TR
    173 ><TD
    174 WIDTH="33%"
    175 ALIGN="left"
    176 VALIGN="top"
    177 >Querying Capabilities</TD
    178 ><TD
    179 WIDTH="34%"
    180 ALIGN="center"
    181 VALIGN="top"
    182 ><A
    183 HREF="c174.htm"
    184 ACCESSKEY="U"
    185 >Up</A
    186 ></TD
    187 ><TD
    188 WIDTH="33%"
    189 ALIGN="right"
    190 VALIGN="top"
    191 >Video Inputs and Outputs</TD
    192 ></TR
    193 ></TABLE
    194 ></DIV
    195 ></BODY
    196 ></HTML
    197 >
    198