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