Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
[sfrench/cifs-2.6.git] / Documentation / media / uapi / dvb / video-fwrite.rst
1 .. Permission is granted to copy, distribute and/or modify this
2 .. document under the terms of the GNU Free Documentation License,
3 .. Version 1.1 or any later version published by the Free Software
4 .. Foundation, with no Invariant Sections, no Front-Cover Texts
5 .. and no Back-Cover Texts. A copy of the license is included at
6 .. Documentation/media/uapi/fdl-appendix.rst.
7 ..
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
9
10 .. _video_fwrite:
11
12 =================
13 dvb video write()
14 =================
15
16 Name
17 ----
18
19 dvb video write()
20
21 .. attention:: This ioctl is deprecated.
22
23 Synopsis
24 --------
25
26 .. c:function:: size_t write(int fd, const void *buf, size_t count)
27
28
29 Arguments
30 ---------
31
32 .. flat-table::
33     :header-rows:  0
34     :stub-columns: 0
35
36
37     -  .. row 1
38
39        -  int fd
40
41        -  File descriptor returned by a previous call to open().
42
43     -  .. row 2
44
45        -  void \*buf
46
47        -  Pointer to the buffer containing the PES data.
48
49     -  .. row 3
50
51        -  size_t count
52
53        -  Size of buf.
54
55
56 Description
57 -----------
58
59 This system call can only be used if VIDEO_SOURCE_MEMORY is selected
60 in the ioctl call VIDEO_SELECT_SOURCE. The data provided shall be in
61 PES format, unless the capability allows other formats. If O_NONBLOCK
62 is not specified the function will block until buffer space is
63 available. The amount of data to be transferred is implied by count.
64
65
66 Return Value
67 ------------
68
69 .. flat-table::
70     :header-rows:  0
71     :stub-columns: 0
72
73
74     -  .. row 1
75
76        -  ``EPERM``
77
78        -  Mode VIDEO_SOURCE_MEMORY not selected.
79
80     -  .. row 2
81
82        -  ``ENOMEM``
83
84        -  Attempted to write more data than the internal buffer can hold.
85
86     -  .. row 3
87
88        -  ``EBADF``
89
90        -  fd is not a valid open file descriptor.