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