summaryrefslogtreecommitdiffstats
path: root/Documentation/media/uapi/v4l/app-pri.rst
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2016-07-08 11:40:06 -0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-07-08 11:59:40 -0300
commit60c2820d0f6d3497975b6488e2599f8f611d8b95 (patch)
treeb3b03707c6438ea9b99cc57e847ebf517f968ab1 /Documentation/media/uapi/v4l/app-pri.rst
parenta97369b5e21ea9b8b5fef7c0f4f48bbe60c07ca3 (diff)
downloadlinux-0-day-60c2820d0f6d3497975b6488e2599f8f611d8b95.tar.gz
linux-0-day-60c2820d0f6d3497975b6488e2599f8f611d8b95.tar.xz
doc_rst: rename the media Sphinx suff to Documentation/media
The name of the subsystem is "media", and not "linux_tv". Also, as we plan to add other stuff there in the future, let's rename also the media uAPI book to media_uapi, to make it clearer. No functional changes. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'Documentation/media/uapi/v4l/app-pri.rst')
-rw-r--r--Documentation/media/uapi/v4l/app-pri.rst30
1 files changed, 30 insertions, 0 deletions
diff --git a/Documentation/media/uapi/v4l/app-pri.rst b/Documentation/media/uapi/v4l/app-pri.rst
new file mode 100644
index 0000000000000..a8c41a7ec3965
--- /dev/null
+++ b/Documentation/media/uapi/v4l/app-pri.rst
@@ -0,0 +1,30 @@
+.. -*- coding: utf-8; mode: rst -*-
+
+.. _app-pri:
+
+********************
+Application Priority
+********************
+
+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.
+
+Since these features cannot be implemented entirely in user space V4L2
+defines the :ref:`VIDIOC_G_PRIORITY <VIDIOC_G_PRIORITY>` and
+:ref:`VIDIOC_S_PRIORITY <VIDIOC_G_PRIORITY>` 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 :ref:`VIDIOC_S_PRIORITY
+<VIDIOC_G_PRIORITY>` after verifying the device with the
+:ref:`VIDIOC_QUERYCAP` ioctl.
+
+Ioctls changing driver properties, such as
+:ref:`VIDIOC_S_INPUT <VIDIOC_G_INPUT>`, return an ``EBUSY`` error code
+after another application obtained higher priority.