dmx-fwrite.rst 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
  2. .. c:namespace:: DTV.dmx
  3. .. _dmx_fwrite:
  4. ========================
  5. Digital TV demux write()
  6. ========================
  7. Name
  8. ----
  9. Digital TV demux write()
  10. Synopsis
  11. --------
  12. .. c:function:: ssize_t write(int fd, const void *buf, size_t count)
  13. Arguments
  14. ---------
  15. ``fd``
  16. File descriptor returned by a previous call to :c:func:`open()`.
  17. ``buf``
  18. Buffer with data to be written
  19. ``count``
  20. Number of bytes at the buffer
  21. Description
  22. -----------
  23. This system call is only provided by the logical device
  24. ``/dev/dvb/adapter?/dvr?``, associated with the physical demux device that
  25. provides the actual DVR functionality. It is used for replay of a
  26. digitally recorded Transport Stream. Matching filters have to be defined
  27. in the corresponding physical demux device, ``/dev/dvb/adapter?/demux?``.
  28. The amount of data to be transferred is implied by count.
  29. Return Value
  30. ------------
  31. On success 0 is returned.
  32. On error -1 is returned, and the ``errno`` variable is set
  33. appropriately.
  34. .. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
  35. .. flat-table::
  36. :header-rows: 0
  37. :stub-columns: 0
  38. :widths: 1 16
  39. - - ``EWOULDBLOCK``
  40. - No data was written. This might happen if ``O_NONBLOCK`` was
  41. specified and there is no more buffer space available (if
  42. ``O_NONBLOCK`` is not specified the function will block until buffer
  43. space is available).
  44. - - ``EBUSY``
  45. - This error code indicates that there are conflicting requests. The
  46. corresponding demux device is setup to receive data from the
  47. front- end. Make sure that these filters are stopped and that the
  48. filters with input set to ``DMX_IN_DVR`` are started.
  49. The generic error codes are described at the
  50. :ref:`Generic Error Codes <gen-errors>` chapter.