3.2.3. DVB demux read()

3.2.3.1. Name

DVB demux read()

3.2.3.2. Synopsis

size_t read(int fd, void *buf, size_t count)

3.2.3.3. Arguments

fd
File descriptor returned by a previous call to open().
buf
Buffer to be filled
count
Max number of bytes to read

3.2.3.4. Description

This system call returns filtered data, which might be section or PES data. The filtered data is transferred from the driver’s internal circular buffer to buf. The maximum amount of data to be transferred is implied by count.

3.2.3.5. Return Value

EWOULDBLOCK No data to return and O_NONBLOCK was specified.
EBADF fd is not a valid open file descriptor.
ECRC Last section had a CRC error - no data returned. The buffer is flushed.
EOVERFLOW  
  The filtered data was not read from the buffer in due time, resulting in non-read data being lost. The buffer is flushed.
ETIMEDOUT The section was not loaded within the stated timeout period. See ioctl DMX_SET_FILTER for how to set a timeout.
EFAULT The driver failed to write to the callers buffer due to an invalid *buf pointer.