Commit | Line | Data |
---|---|---|
47d23e36 MCC |
1 | .. -*- coding: utf-8; mode: rst -*- |
2 | ||
3 | .. _video_fopen: | |
4 | ||
586027ce | 5 | ================ |
47d23e36 MCC |
6 | dvb video open() |
7 | ================ | |
8 | ||
15e7d615 | 9 | Name |
586027ce | 10 | ---- |
47d23e36 | 11 | |
586027ce | 12 | dvb video open() |
47d23e36 | 13 | |
cf8076c3 | 14 | .. attention:: This ioctl is deprecated. |
15e7d615 MCC |
15 | |
16 | Synopsis | |
47d23e36 MCC |
17 | -------- |
18 | ||
1b81f010 | 19 | .. c:function:: int open(const char *deviceName, int flags) |
47d23e36 | 20 | |
586027ce | 21 | |
15e7d615 | 22 | Arguments |
586027ce | 23 | --------- |
47d23e36 MCC |
24 | |
25 | .. flat-table:: | |
26 | :header-rows: 0 | |
27 | :stub-columns: 0 | |
28 | ||
29 | ||
30 | - .. row 1 | |
31 | ||
32 | - const char \*deviceName | |
33 | ||
34 | - Name of specific video device. | |
35 | ||
36 | - .. row 2 | |
37 | ||
38 | - int flags | |
39 | ||
40 | - A bit-wise OR of the following flags: | |
41 | ||
42 | - .. row 3 | |
43 | ||
44 | - | |
45 | - O_RDONLY read-only access | |
46 | ||
47 | - .. row 4 | |
48 | ||
49 | - | |
50 | - O_RDWR read/write access | |
51 | ||
52 | - .. row 5 | |
53 | ||
54 | - | |
55 | - O_NONBLOCK open in non-blocking mode | |
56 | ||
57 | - .. row 6 | |
58 | ||
59 | - | |
60 | - (blocking mode is the default) | |
61 | ||
62 | ||
15e7d615 | 63 | Description |
586027ce | 64 | ----------- |
47d23e36 | 65 | |
586027ce MCC |
66 | This system call opens a named video device (e.g. |
67 | /dev/dvb/adapter0/video0) for subsequent use. | |
68 | ||
69 | When an open() call has succeeded, the device will be ready for use. The | |
70 | significance of blocking or non-blocking mode is described in the | |
71 | documentation for functions where there is a difference. It does not | |
72 | affect the semantics of the open() call itself. A device opened in | |
73 | blocking mode can later be put into non-blocking mode (and vice versa) | |
74 | using the F_SETFL command of the fcntl system call. This is a standard | |
75 | system call, documented in the Linux manual page for fcntl. Only one | |
76 | user can open the Video Device in O_RDWR mode. All other attempts to | |
77 | open the device in this mode will fail, and an error-code will be | |
78 | returned. If the Video Device is opened in O_RDONLY mode, the only | |
79 | ioctl call that can be used is VIDEO_GET_STATUS. All other call will | |
80 | return an error code. | |
47d23e36 MCC |
81 | |
82 | ||
15e7d615 | 83 | Return Value |
586027ce MCC |
84 | ------------ |
85 | ||
16dac354 MCC |
86 | .. tabularcolumns:: |p{2.5cm}|p{15.0cm}| |
87 | ||
47d23e36 MCC |
88 | .. flat-table:: |
89 | :header-rows: 0 | |
90 | :stub-columns: 0 | |
91 | ||
92 | ||
93 | - .. row 1 | |
94 | ||
95 | - ``ENODEV`` | |
96 | ||
97 | - Device driver not loaded/available. | |
98 | ||
99 | - .. row 2 | |
100 | ||
101 | - ``EINTERNAL`` | |
102 | ||
103 | - Internal error. | |
104 | ||
105 | - .. row 3 | |
106 | ||
107 | - ``EBUSY`` | |
108 | ||
109 | - Device or resource busy. | |
110 | ||
111 | - .. row 4 | |
112 | ||
113 | - ``EINVAL`` | |
114 | ||
115 | - Invalid argument. |