From 4266129964b8238526936d723de65b419d8069c6 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 31 May 2011 16:27:44 -0300 Subject: [media] DocBook: Move all media docbook stuff into its own directory This patch addresses several issues pointed by Randy Dunlap at changeset ece722c: - In the generated index.html file, "media" is listed first, but it should be listed in alphabetical order, not first. - The generated files are (hidden) in .tmpmedia/ - The link from the top-level index.html file to "media" is to media/index.html, but the file is actually in .tmpmedia/media/index.html - Please build docs with and without using "O=builddir" and test that. - Would it be possible for media to have its own Makefile instead of merging into this one? Due to the way cleandocs target works, I had to rename the media DocBook to media_api, otherwise cleandocs would remove the /media directory. Thanks-to: Randy Dunlap Signed-off-by: Mauro Carvalho Chehab --- Documentation/DocBook/media/v4l/func-open.xml | 121 ++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 Documentation/DocBook/media/v4l/func-open.xml (limited to 'Documentation/DocBook/media/v4l/func-open.xml') diff --git a/Documentation/DocBook/media/v4l/func-open.xml b/Documentation/DocBook/media/v4l/func-open.xml new file mode 100644 index 0000000..7595d07 --- /dev/null +++ b/Documentation/DocBook/media/v4l/func-open.xml @@ -0,0 +1,121 @@ + + + V4L2 open() + &manvol; + + + + v4l2-open + Open a V4L2 device + + + + + #include <fcntl.h> + + int open + const char *device_name + int flags + + + + + + Arguments + + + + device_name + + Device to be opened. + + + + flags + + Open flags. Access mode must be +O_RDWR. This is just a technicality, input devices +still support only reading and output devices only writing. + When the O_NONBLOCK flag is +given, the read() function and the &VIDIOC-DQBUF; ioctl will return +the &EAGAIN; when no data is available or no buffer is in the driver +outgoing queue, otherwise these functions block until data becomes +available. All V4L2 drivers exchanging data with applications must +support the O_NONBLOCK flag. + Other flags have no effect. + + + + + + Description + + To open a V4L2 device applications call +open() with the desired device name. This +function has no side effects; all data format parameters, current +input or output, control values or other properties remain unchanged. +At the first open() call after loading the driver +they will be reset to default values, drivers are never in an +undefined state. + + + Return Value + + On success open returns the new file +descriptor. On error -1 is returned, and the errno +variable is set appropriately. Possible error codes are: + + + + EACCES + + The caller has no permission to access the +device. + + + + EBUSY + + The driver does not support multiple opens and the +device is already in use. + + + + ENXIO + + No device corresponding to this device special file +exists. + + + + ENOMEM + + Not enough kernel memory was available to complete the +request. + + + + EMFILE + + The process already has the maximum number of +files open. + + + + ENFILE + + The limit on the total number of files open on the +system has been reached. + + + + + + + -- cgit v1.1