dmx-fopen.rst 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. .. -*- coding: utf-8; mode: rst -*-
  2. .. _dmx_fopen:
  3. ================
  4. DVB demux open()
  5. ================
  6. Name
  7. ----
  8. DVB demux open()
  9. Synopsis
  10. --------
  11. .. c:function:: int open(const char *deviceName, int flags)
  12. :name: dvb-dmx-open
  13. Arguments
  14. ---------
  15. ``name``
  16. Name of specific DVB demux device.
  17. ``flags``
  18. A bit-wise OR of the following flags:
  19. .. flat-table::
  20. :header-rows: 0
  21. :stub-columns: 0
  22. -
  23. - O_RDONLY
  24. - read-only access
  25. -
  26. - O_RDWR
  27. - read/write access
  28. -
  29. - O_NONBLOCK
  30. - open in non-blocking mode
  31. (blocking mode is the default)
  32. Description
  33. -----------
  34. This system call, used with a device name of /dev/dvb/adapter0/demux0,
  35. allocates a new filter and returns a handle which can be used for
  36. subsequent control of that filter. This call has to be made for each
  37. filter to be used, i.e. every returned file descriptor is a reference to
  38. a single filter. /dev/dvb/adapter0/dvr0 is a logical device to be used
  39. for retrieving Transport Streams for digital video recording. When
  40. reading from this device a transport stream containing the packets from
  41. all PES filters set in the corresponding demux device
  42. (/dev/dvb/adapter0/demux0) having the output set to DMX_OUT_TS_TAP. A
  43. recorded Transport Stream is replayed by writing to this device.
  44. The significance of blocking or non-blocking mode is described in the
  45. documentation for functions where there is a difference. It does not
  46. affect the semantics of the open() call itself. A device opened in
  47. blocking mode can later be put into non-blocking mode (and vice versa)
  48. using the F_SETFL command of the fcntl system call.
  49. Return Value
  50. ------------
  51. .. flat-table::
  52. :header-rows: 0
  53. :stub-columns: 0
  54. - .. row 1
  55. - ``ENODEV``
  56. - Device driver not loaded/available.
  57. - .. row 2
  58. - ``EINVAL``
  59. - Invalid argument.
  60. - .. row 3
  61. - ``EMFILE``
  62. - “Too many open files”, i.e. no more filters available.
  63. - .. row 4
  64. - ``ENOMEM``
  65. - The driver failed to allocate enough memory.