| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> |
| <HTML |
| ><HEAD |
| ><TITLE |
| >Application Priority</TITLE |
| ><META |
| NAME="GENERATOR" |
| CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK |
| REL="HOME" |
| TITLE="Video for Linux Two API Specification" |
| HREF="book1.htm"><LINK |
| REL="UP" |
| TITLE="Common API Elements" |
| HREF="c174.htm"><LINK |
| REL="PREVIOUS" |
| TITLE="Querying Capabilities" |
| HREF="x282.htm"><LINK |
| REL="NEXT" |
| TITLE="Video Inputs and Outputs" |
| HREF="x309.htm"></HEAD |
| ><BODY |
| CLASS="SECTION" |
| BGCOLOR="#FFFFFF" |
| TEXT="#000000" |
| LINK="#0000FF" |
| VLINK="#840084" |
| ALINK="#0000FF" |
| ><DIV |
| CLASS="NAVHEADER" |
| ><TABLE |
| SUMMARY="Header navigation table" |
| WIDTH="100%" |
| BORDER="0" |
| CELLPADDING="0" |
| CELLSPACING="0" |
| ><TR |
| ><TH |
| COLSPAN="3" |
| ALIGN="center" |
| >Video for Linux Two API Specification: Revision 0.24</TH |
| ></TR |
| ><TR |
| ><TD |
| WIDTH="10%" |
| ALIGN="left" |
| VALIGN="bottom" |
| ><A |
| HREF="x282.htm" |
| ACCESSKEY="P" |
| >Prev</A |
| ></TD |
| ><TD |
| WIDTH="80%" |
| ALIGN="center" |
| VALIGN="bottom" |
| >Chapter 1. Common API Elements</TD |
| ><TD |
| WIDTH="10%" |
| ALIGN="right" |
| VALIGN="bottom" |
| ><A |
| HREF="x309.htm" |
| ACCESSKEY="N" |
| >Next</A |
| ></TD |
| ></TR |
| ></TABLE |
| ><HR |
| ALIGN="LEFT" |
| WIDTH="100%"></DIV |
| ><DIV |
| CLASS="SECTION" |
| ><H1 |
| CLASS="SECTION" |
| ><A |
| NAME="APP-PRI" |
| >1.3. Application Priority</A |
| ></H1 |
| ><P |
| >When multiple applications share a device it may be |
| desirable to assign them different priorities. Contrary to the |
| traditional "rm -rf /" school of thought a video recording application |
| could for example block other applications from changing video |
| controls or switching the current TV channel. Another objective is to |
| permit low priority applications working in background, which can be |
| preempted by user controlled applications and automatically regain |
| control of the device at a later time.</P |
| ><P |
| >Since these features cannot be implemented entirely in user |
| space V4L2 defines the <A |
| HREF="r11946.htm" |
| ><CODE |
| CLASS="CONSTANT" |
| >VIDIOC_G_PRIORITY</CODE |
| ></A |
| > and <A |
| HREF="r11946.htm" |
| ><CODE |
| CLASS="CONSTANT" |
| >VIDIOC_S_PRIORITY</CODE |
| ></A |
| > |
| ioctls to request and query the access priority associate with a file |
| descriptor. Opening a device assigns a medium priority, compatible |
| with earlier versions of V4L2 and drivers not supporting these ioctls. |
| Applications requiring a different priority will usually call |
| <CODE |
| CLASS="CONSTANT" |
| >VIDIOC_S_PRIORITY</CODE |
| > after verifying the device with |
| the <A |
| HREF="r13105.htm" |
| ><CODE |
| CLASS="CONSTANT" |
| >VIDIOC_QUERYCAP</CODE |
| ></A |
| > ioctl.</P |
| ><P |
| >Ioctls changing driver properties, such as <A |
| HREF="r11217.htm" |
| ><CODE |
| CLASS="CONSTANT" |
| >VIDIOC_S_INPUT</CODE |
| ></A |
| >, |
| return an <SPAN |
| CLASS="ERRORCODE" |
| >EBUSY</SPAN |
| > error code after another application obtained higher priority. |
| An event mechanism to notify applications about asynchronous property |
| changes has been proposed but not added yet.</P |
| ></DIV |
| ><DIV |
| CLASS="NAVFOOTER" |
| ><HR |
| ALIGN="LEFT" |
| WIDTH="100%"><TABLE |
| SUMMARY="Footer navigation table" |
| WIDTH="100%" |
| BORDER="0" |
| CELLPADDING="0" |
| CELLSPACING="0" |
| ><TR |
| ><TD |
| WIDTH="33%" |
| ALIGN="left" |
| VALIGN="top" |
| ><A |
| HREF="x282.htm" |
| ACCESSKEY="P" |
| >Prev</A |
| ></TD |
| ><TD |
| WIDTH="34%" |
| ALIGN="center" |
| VALIGN="top" |
| ><A |
| HREF="book1.htm" |
| ACCESSKEY="H" |
| >Home</A |
| ></TD |
| ><TD |
| WIDTH="33%" |
| ALIGN="right" |
| VALIGN="top" |
| ><A |
| HREF="x309.htm" |
| ACCESSKEY="N" |
| >Next</A |
| ></TD |
| ></TR |
| ><TR |
| ><TD |
| WIDTH="33%" |
| ALIGN="left" |
| VALIGN="top" |
| >Querying Capabilities</TD |
| ><TD |
| WIDTH="34%" |
| ALIGN="center" |
| VALIGN="top" |
| ><A |
| HREF="c174.htm" |
| ACCESSKEY="U" |
| >Up</A |
| ></TD |
| ><TD |
| WIDTH="33%" |
| ALIGN="right" |
| VALIGN="top" |
| >Video Inputs and Outputs</TD |
| ></TR |
| ></TABLE |
| ></DIV |
| ></BODY |
| ></HTML |
| > |