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