Merge tag 'metag-for-v4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan...
[sfrench/cifs-2.6.git] / Documentation / media / uapi / dvb / video-fwrite.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _video_fwrite:
4
5 =================
6 dvb video write()
7 =================
8
9 Name
10 ----
11
12 dvb video write()
13
14
15 Synopsis
16 --------
17
18 .. cpp:function:: size_t write(int fd, const void *buf, size_t count)
19
20
21 Arguments
22 ---------
23
24 .. flat-table::
25     :header-rows:  0
26     :stub-columns: 0
27
28
29     -  .. row 1
30
31        -  int fd
32
33        -  File descriptor returned by a previous call to open().
34
35     -  .. row 2
36
37        -  void \*buf
38
39        -  Pointer to the buffer containing the PES data.
40
41     -  .. row 3
42
43        -  size_t count
44
45        -  Size of buf.
46
47
48 Description
49 -----------
50
51 This system call can only be used if VIDEO_SOURCE_MEMORY is selected
52 in the ioctl call VIDEO_SELECT_SOURCE. The data provided shall be in
53 PES format, unless the capability allows other formats. If O_NONBLOCK
54 is not specified the function will block until buffer space is
55 available. The amount of data to be transferred is implied by count.
56
57
58 Return Value
59 ------------
60
61 .. flat-table::
62     :header-rows:  0
63     :stub-columns: 0
64
65
66     -  .. row 1
67
68        -  ``EPERM``
69
70        -  Mode VIDEO_SOURCE_MEMORY not selected.
71
72     -  .. row 2
73
74        -  ``ENOMEM``
75
76        -  Attempted to write more data than the internal buffer can hold.
77
78     -  .. row 3
79
80        -  ``EBADF``
81
82        -  fd is not a valid open file descriptor.