[media] docs-next: stop abusing on the cpp domain
[cascardo/linux.git] / Documentation / media / uapi / dvb / dmx-fread.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _dmx_fread:
4
5 ================
6 DVB demux read()
7 ================
8
9 Name
10 ----
11
12 DVB demux read()
13
14
15 Synopsis
16 --------
17
18 .. c:function:: size_t read(int fd, 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 to be used for returned filtered 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 returns filtered data, which might be section or PES
52 data. The filtered data is transferred from the driver’s internal
53 circular buffer to buf. The maximum amount of data to be transferred is
54 implied by count.
55
56 Return Value
57 ------------
58
59 .. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
60
61 .. flat-table::
62     :header-rows:  0
63     :stub-columns: 0
64
65
66     -  .. row 1
67
68        -  ``EWOULDBLOCK``
69
70        -  No data to return and O_NONBLOCK was specified.
71
72     -  .. row 2
73
74        -  ``EBADF``
75
76        -  fd is not a valid open file descriptor.
77
78     -  .. row 3
79
80        -  ``ECRC``
81
82        -  Last section had a CRC error - no data returned. The buffer is
83           flushed.
84
85     -  .. row 4
86
87        -  ``EOVERFLOW``
88
89        -
90
91     -  .. row 5
92
93        -
94        -  The filtered data was not read from the buffer in due time,
95           resulting in non-read data being lost. The buffer is flushed.
96
97     -  .. row 6
98
99        -  ``ETIMEDOUT``
100
101        -  The section was not loaded within the stated timeout period. See
102           ioctl DMX_SET_FILTER for how to set a timeout.
103
104     -  .. row 7
105
106        -  ``EFAULT``
107
108        -  The driver failed to write to the callers buffer due to an invalid
109           \*buf pointer.