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