Commit | Line | Data |
---|---|---|
47d23e36 MCC |
1 | .. -*- coding: utf-8; mode: rst -*- |
2 | ||
3 | .. _dmx_fread: | |
4 | ||
586027ce | 5 | ================ |
47d23e36 MCC |
6 | DVB demux read() |
7 | ================ | |
8 | ||
15e7d615 | 9 | Name |
586027ce | 10 | ---- |
47d23e36 | 11 | |
586027ce | 12 | DVB demux read() |
47d23e36 | 13 | |
15e7d615 MCC |
14 | |
15 | Synopsis | |
47d23e36 MCC |
16 | -------- |
17 | ||
1b81f010 | 18 | .. c:function:: size_t read(int fd, void *buf, size_t count) |
cf8076c3 | 19 | :name: dvb-dmx-read |
47d23e36 | 20 | |
15e7d615 | 21 | Arguments |
586027ce | 22 | --------- |
47d23e36 | 23 | |
cf8076c3 MCC |
24 | ``fd`` |
25 | File descriptor returned by a previous call to :c:func:`open() <dvb-ca-open>`. | |
47d23e36 | 26 | |
cf8076c3 MCC |
27 | ``buf`` |
28 | Buffer to be filled | |
47d23e36 | 29 | |
cf8076c3 MCC |
30 | ``count`` |
31 | Max number of bytes to read | |
47d23e36 | 32 | |
15e7d615 | 33 | Description |
586027ce | 34 | ----------- |
47d23e36 | 35 | |
586027ce MCC |
36 | This system call returns filtered data, which might be section or PES |
37 | data. The filtered data is transferred from the driver’s internal | |
38 | circular buffer to buf. The maximum amount of data to be transferred is | |
39 | implied by count. | |
47d23e36 | 40 | |
15e7d615 | 41 | Return Value |
586027ce MCC |
42 | ------------ |
43 | ||
16dac354 MCC |
44 | .. tabularcolumns:: |p{2.5cm}|p{15.0cm}| |
45 | ||
47d23e36 MCC |
46 | .. flat-table:: |
47 | :header-rows: 0 | |
48 | :stub-columns: 0 | |
49 | ||
50 | ||
51 | - .. row 1 | |
52 | ||
53 | - ``EWOULDBLOCK`` | |
54 | ||
55 | - No data to return and O_NONBLOCK was specified. | |
56 | ||
57 | - .. row 2 | |
58 | ||
59 | - ``EBADF`` | |
60 | ||
61 | - fd is not a valid open file descriptor. | |
62 | ||
63 | - .. row 3 | |
64 | ||
65 | - ``ECRC`` | |
66 | ||
67 | - Last section had a CRC error - no data returned. The buffer is | |
68 | flushed. | |
69 | ||
70 | - .. row 4 | |
71 | ||
72 | - ``EOVERFLOW`` | |
73 | ||
74 | - | |
75 | ||
76 | - .. row 5 | |
77 | ||
78 | - | |
79 | - The filtered data was not read from the buffer in due time, | |
80 | resulting in non-read data being lost. The buffer is flushed. | |
81 | ||
82 | - .. row 6 | |
83 | ||
84 | - ``ETIMEDOUT`` | |
85 | ||
86 | - The section was not loaded within the stated timeout period. See | |
87 | ioctl DMX_SET_FILTER for how to set a timeout. | |
88 | ||
89 | - .. row 7 | |
90 | ||
91 | - ``EFAULT`` | |
92 | ||
93 | - The driver failed to write to the callers buffer due to an invalid | |
94 | \*buf pointer. |