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.
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
12 =======================
13 Digital TV demux read()
14 =======================
19 Digital TV demux read()
25 .. c:function:: size_t read(int fd, void *buf, size_t count)
32 File descriptor returned by a previous call to :c:func:`open() <dvb-ca-open>`.
38 Max number of bytes to read
43 This system call returns filtered data, which might be section or Packetized
44 Elementary Stream (PES) data. The filtered data is transferred from
45 the driver’s internal circular buffer to ``buf``. The maximum amount of data
46 to be transferred is implied by count.
50 if a section filter created with
51 :c:type:`DMX_CHECK_CRC <dmx_sct_filter_params>` flag set,
52 data that fails on CRC check will be silently ignored.
58 On success 0 is returned.
60 On error -1 is returned, and the ``errno`` variable is set
63 .. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
71 - No data to return and ``O_NONBLOCK`` was specified.
74 - The filtered data was not read from the buffer in due time,
75 resulting in non-read data being lost. The buffer is flushed.
78 - The section was not loaded within the stated timeout period.
79 See ioctl :ref:`DMX_SET_FILTER` for how to set a timeout.
82 - The driver failed to write to the callers buffer due to an
83 invalid \*buf pointer.
86 The generic error codes are described at the
87 :ref:`Generic Error Codes <gen-errors>` chapter.