1 .. -*- coding: utf-8; mode: rst -*-
5 =======================
6 Digital TV demux read()
7 =======================
12 Digital TV demux read()
18 .. c:function:: size_t read(int fd, void *buf, size_t count)
25 File descriptor returned by a previous call to :c:func:`open() <dvb-ca-open>`.
31 Max number of bytes to read
36 This system call returns filtered data, which might be section or Packetized
37 Elementary Stream (PES) data. The filtered data is transferred from
38 the driver’s internal circular buffer to ``buf``. The maximum amount of data
39 to be transferred is implied by count.
43 if a section filter created with
44 :c:type:`DMX_CHECK_CRC <dmx_sct_filter_params>` flag set,
45 data that fails on CRC check will be silently ignored.
51 On success 0 is returned.
53 On error -1 is returned, and the ``errno`` variable is set
56 .. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
64 - No data to return and ``O_NONBLOCK`` was specified.
67 - The filtered data was not read from the buffer in due time,
68 resulting in non-read data being lost. The buffer is flushed.
71 - The section was not loaded within the stated timeout period.
72 See ioctl :ref:`DMX_SET_FILTER` for how to set a timeout.
75 - The driver failed to write to the callers buffer due to an
76 invalid \*buf pointer.
79 The generic error codes are described at the
80 :ref:`Generic Error Codes <gen-errors>` chapter.