18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 28c2ecf20Sopenharmony_ci.. c:namespace:: DTV.dmx 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ci.. _dmx_fwrite: 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci======================== 78c2ecf20Sopenharmony_ciDigital TV demux write() 88c2ecf20Sopenharmony_ci======================== 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ciName 118c2ecf20Sopenharmony_ci---- 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ciDigital TV demux write() 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ciSynopsis 168c2ecf20Sopenharmony_ci-------- 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci.. c:function:: ssize_t write(int fd, const void *buf, size_t count) 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ciArguments 218c2ecf20Sopenharmony_ci--------- 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci``fd`` 248c2ecf20Sopenharmony_ci File descriptor returned by a previous call to :c:func:`open()`. 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci``buf`` 278c2ecf20Sopenharmony_ci Buffer with data to be written 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci``count`` 308c2ecf20Sopenharmony_ci Number of bytes at the buffer 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ciDescription 338c2ecf20Sopenharmony_ci----------- 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ciThis system call is only provided by the logical device 368c2ecf20Sopenharmony_ci``/dev/dvb/adapter?/dvr?``, associated with the physical demux device that 378c2ecf20Sopenharmony_ciprovides the actual DVR functionality. It is used for replay of a 388c2ecf20Sopenharmony_cidigitally recorded Transport Stream. Matching filters have to be defined 398c2ecf20Sopenharmony_ciin the corresponding physical demux device, ``/dev/dvb/adapter?/demux?``. 408c2ecf20Sopenharmony_ciThe amount of data to be transferred is implied by count. 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ciReturn Value 438c2ecf20Sopenharmony_ci------------ 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ciOn success 0 is returned. 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ciOn error -1 is returned, and the ``errno`` variable is set 488c2ecf20Sopenharmony_ciappropriately. 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ci.. tabularcolumns:: |p{2.5cm}|p{15.0cm}| 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ci.. flat-table:: 538c2ecf20Sopenharmony_ci :header-rows: 0 548c2ecf20Sopenharmony_ci :stub-columns: 0 558c2ecf20Sopenharmony_ci :widths: 1 16 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci - - ``EWOULDBLOCK`` 588c2ecf20Sopenharmony_ci - No data was written. This might happen if ``O_NONBLOCK`` was 598c2ecf20Sopenharmony_ci specified and there is no more buffer space available (if 608c2ecf20Sopenharmony_ci ``O_NONBLOCK`` is not specified the function will block until buffer 618c2ecf20Sopenharmony_ci space is available). 628c2ecf20Sopenharmony_ci 638c2ecf20Sopenharmony_ci - - ``EBUSY`` 648c2ecf20Sopenharmony_ci - This error code indicates that there are conflicting requests. The 658c2ecf20Sopenharmony_ci corresponding demux device is setup to receive data from the 668c2ecf20Sopenharmony_ci front- end. Make sure that these filters are stopped and that the 678c2ecf20Sopenharmony_ci filters with input set to ``DMX_IN_DVR`` are started. 688c2ecf20Sopenharmony_ci 698c2ecf20Sopenharmony_ciThe generic error codes are described at the 708c2ecf20Sopenharmony_ci:ref:`Generic Error Codes <gen-errors>` chapter. 71