1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2 .. c:namespace:: DTV.dmx
6 =======================
7 Digital TV demux open()
8 =======================
13 Digital TV demux open()
18 .. c:function:: int open(const char *deviceName, int flags)
24 Name of specific Digital TV demux device.
27 A bit-wise OR of the following flags:
29 .. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
46 - open in non-blocking mode
47 (blocking mode is the default)
52 This system call, used with a device name of ``/dev/dvb/adapter?/demux?``,
53 allocates a new filter and returns a handle which can be used for
54 subsequent control of that filter. This call has to be made for each
55 filter to be used, i.e. every returned file descriptor is a reference to
56 a single filter. ``/dev/dvb/adapter?/dvr?`` is a logical device to be used
57 for retrieving Transport Streams for digital video recording. When
58 reading from this device a transport stream containing the packets from
59 all PES filters set in the corresponding demux device
60 (``/dev/dvb/adapter?/demux?``) having the output set to ``DMX_OUT_TS_TAP``.
61 A recorded Transport Stream is replayed by writing to this device.
63 The significance of blocking or non-blocking mode is described in the
64 documentation for functions where there is a difference. It does not
65 affect the semantics of the ``open()`` call itself. A device opened
66 in blocking mode can later be put into non-blocking mode (and vice versa)
67 using the ``F_SETFL`` command of the fcntl system call.
72 On success 0 is returned.
74 On error -1 is returned, and the ``errno`` variable is set
77 .. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
85 - “Too many open files”, i.e. no more filters available.
87 The generic error codes are described at the
88 :ref:`Generic Error Codes <gen-errors>` chapter.