video-fopen.rst 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. .. -*- coding: utf-8; mode: rst -*-
  2. .. _video_fopen:
  3. ================
  4. dvb video open()
  5. ================
  6. Name
  7. ----
  8. dvb video open()
  9. .. attention:: This ioctl is deprecated.
  10. Synopsis
  11. --------
  12. .. c:function:: int open(const char *deviceName, int flags)
  13. Arguments
  14. ---------
  15. .. flat-table::
  16. :header-rows: 0
  17. :stub-columns: 0
  18. - .. row 1
  19. - const char \*deviceName
  20. - Name of specific video device.
  21. - .. row 2
  22. - int flags
  23. - A bit-wise OR of the following flags:
  24. - .. row 3
  25. -
  26. - O_RDONLY read-only access
  27. - .. row 4
  28. -
  29. - O_RDWR read/write access
  30. - .. row 5
  31. -
  32. - O_NONBLOCK open in non-blocking mode
  33. - .. row 6
  34. -
  35. - (blocking mode is the default)
  36. Description
  37. -----------
  38. This system call opens a named video device (e.g.
  39. /dev/dvb/adapter0/video0) for subsequent use.
  40. When an open() call has succeeded, the device will be ready for use. The
  41. significance of blocking or non-blocking mode is described in the
  42. documentation for functions where there is a difference. It does not
  43. affect the semantics of the open() call itself. A device opened in
  44. blocking mode can later be put into non-blocking mode (and vice versa)
  45. using the F_SETFL command of the fcntl system call. This is a standard
  46. system call, documented in the Linux manual page for fcntl. Only one
  47. user can open the Video Device in O_RDWR mode. All other attempts to
  48. open the device in this mode will fail, and an error-code will be
  49. returned. If the Video Device is opened in O_RDONLY mode, the only
  50. ioctl call that can be used is VIDEO_GET_STATUS. All other call will
  51. return an error code.
  52. Return Value
  53. ------------
  54. .. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
  55. .. flat-table::
  56. :header-rows: 0
  57. :stub-columns: 0
  58. - .. row 1
  59. - ``ENODEV``
  60. - Device driver not loaded/available.
  61. - .. row 2
  62. - ``EINTERNAL``
  63. - Internal error.
  64. - .. row 3
  65. - ``EBUSY``
  66. - Device or resource busy.
  67. - .. row 4
  68. - ``EINVAL``
  69. - Invalid argument.