18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
28c2ecf20Sopenharmony_ci.. c:namespace:: DTV.video
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ci.. _video_fopen:
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci================
78c2ecf20Sopenharmony_cidvb video open()
88c2ecf20Sopenharmony_ci================
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ciName
118c2ecf20Sopenharmony_ci----
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_cidvb video open()
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci.. attention:: This ioctl is deprecated.
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ciSynopsis
188c2ecf20Sopenharmony_ci--------
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci.. c:function:: int open(const char *deviceName, int flags)
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ciArguments
238c2ecf20Sopenharmony_ci---------
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ci.. flat-table::
268c2ecf20Sopenharmony_ci    :header-rows:  0
278c2ecf20Sopenharmony_ci    :stub-columns: 0
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ci    -  .. row 1
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci       -  const char \*deviceName
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci       -  Name of specific video device.
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci    -  .. row 2
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci       -  int flags
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ci       -  A bit-wise OR of the following flags:
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci    -  .. row 3
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci       -
448c2ecf20Sopenharmony_ci       -  O_RDONLY read-only access
458c2ecf20Sopenharmony_ci
468c2ecf20Sopenharmony_ci    -  .. row 4
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci       -
498c2ecf20Sopenharmony_ci       -  O_RDWR read/write access
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ci    -  .. row 5
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ci       -
548c2ecf20Sopenharmony_ci       -  O_NONBLOCK open in non-blocking mode
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ci    -  .. row 6
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ci       -
598c2ecf20Sopenharmony_ci       -  (blocking mode is the default)
608c2ecf20Sopenharmony_ci
618c2ecf20Sopenharmony_ciDescription
628c2ecf20Sopenharmony_ci-----------
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ciThis system call opens a named video device (e.g.
658c2ecf20Sopenharmony_ci/dev/dvb/adapter0/video0) for subsequent use.
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ciWhen an open() call has succeeded, the device will be ready for use. The
688c2ecf20Sopenharmony_cisignificance of blocking or non-blocking mode is described in the
698c2ecf20Sopenharmony_cidocumentation for functions where there is a difference. It does not
708c2ecf20Sopenharmony_ciaffect the semantics of the open() call itself. A device opened in
718c2ecf20Sopenharmony_ciblocking mode can later be put into non-blocking mode (and vice versa)
728c2ecf20Sopenharmony_ciusing the F_SETFL command of the fcntl system call. This is a standard
738c2ecf20Sopenharmony_cisystem call, documented in the Linux manual page for fcntl. Only one
748c2ecf20Sopenharmony_ciuser can open the Video Device in O_RDWR mode. All other attempts to
758c2ecf20Sopenharmony_ciopen the device in this mode will fail, and an error-code will be
768c2ecf20Sopenharmony_cireturned. If the Video Device is opened in O_RDONLY mode, the only
778c2ecf20Sopenharmony_ciioctl call that can be used is VIDEO_GET_STATUS. All other call will
788c2ecf20Sopenharmony_cireturn an error code.
798c2ecf20Sopenharmony_ci
808c2ecf20Sopenharmony_ciReturn Value
818c2ecf20Sopenharmony_ci------------
828c2ecf20Sopenharmony_ci
838c2ecf20Sopenharmony_ci.. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
848c2ecf20Sopenharmony_ci
858c2ecf20Sopenharmony_ci.. flat-table::
868c2ecf20Sopenharmony_ci    :header-rows:  0
878c2ecf20Sopenharmony_ci    :stub-columns: 0
888c2ecf20Sopenharmony_ci
898c2ecf20Sopenharmony_ci    -  .. row 1
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_ci       -  ``ENODEV``
928c2ecf20Sopenharmony_ci
938c2ecf20Sopenharmony_ci       -  Device driver not loaded/available.
948c2ecf20Sopenharmony_ci
958c2ecf20Sopenharmony_ci    -  .. row 2
968c2ecf20Sopenharmony_ci
978c2ecf20Sopenharmony_ci       -  ``EINTERNAL``
988c2ecf20Sopenharmony_ci
998c2ecf20Sopenharmony_ci       -  Internal error.
1008c2ecf20Sopenharmony_ci
1018c2ecf20Sopenharmony_ci    -  .. row 3
1028c2ecf20Sopenharmony_ci
1038c2ecf20Sopenharmony_ci       -  ``EBUSY``
1048c2ecf20Sopenharmony_ci
1058c2ecf20Sopenharmony_ci       -  Device or resource busy.
1068c2ecf20Sopenharmony_ci
1078c2ecf20Sopenharmony_ci    -  .. row 4
1088c2ecf20Sopenharmony_ci
1098c2ecf20Sopenharmony_ci       -  ``EINVAL``
1108c2ecf20Sopenharmony_ci
1118c2ecf20Sopenharmony_ci       -  Invalid argument.
112