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