-
Notifications
You must be signed in to change notification settings - Fork 4
/
Videos.xml
executable file
·163 lines (123 loc) · 5.54 KB
/
Videos.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<?xml version="1.0" encoding="UTF-8"?>
<!--
- \file Videos.xml
- \author Boubacar DIENE <[email protected]>
- \date 2016 - 2018
- \brief Here are listed some informations needed by the videos module
Note that this latter is also built as a dynamic library to make it
usable alone in order to control video devices.
It's possible to simultaneously capture from several video devices.
-->
<Videos>
<Video>
<!--
General
- priority : Internal threads' priority
0 <=> Lowest
1 <=> Default
2 <=> Highest
- configChoice : Config from which retrieve v4l2 parameters
(Cf. <Configs> tag below to add more configs)
- gfxDest : Name of graphics element where captured video frames are drawn.
Attention ! Make sure that element is defined in Graphics.xml
- serverDest : Name of server used to stream captured video frames.
Attention ! Make sure that server is defined in Servers.xml
Note : Obviously, gfxDest and serverDest are only used if the related modules are enabled
(see Main.xml)
-->
<General priority="1" configChoice="0" gfxDest="videoZoneFromDevice" serverDest="inet-videoServer" />
<!--
Device
- name : Unique name of this video device (Define what you want)
- src : Path to video device to use
- width / height : Device's resolution. If not supported, the closest one should be used instead
by the driver
-->
<Device name="camera0" src="/dev/video0" width="640" height="480" />
<!--
Cropping area : Part of video frame to display
- left / top : Starting point from the top-left corner
- width / height : Area dimensions
-->
<CroppingArea left="0" top="0" width="640" height="480" />
<!--
Composing area : Area where "cropping area" is scaled to
- left / top : Starting point from the top-left corner
- width / height : Area dimensions
-->
<ComposingArea left="0" top="0" width="640" height="480" />
<!--
Buffer
- nbBuffers : Provided to v4l2 when requesting buffers
- desiredFps : Used to set the number of frames to get per second
The provided value needs to be supported by the driver otherwise it won't be
taken into account.
-->
<Buffer nbBuffers="4" desiredFps="25" />
</Video>
<!--
Video configuration choices
- Capabilities : List of v4l2 capabilities the selected video device has to support.
See <linux/videodev2.h> for more details about v4l2 capabilities (Macros whose name
starts with "V4L2_CAP_")
- BufferType : Possible values are listed in "v4l2_buf_type" enum (Cf. <linux/videodev2.h>)
- PixelFormat : See macros whose name starts with "V4L2_PIX_FMT_" in <linux/videodev2.h>
- Colorspace : Possible values are listed in "v4l2_colorspace" enum (Cf. <linux/videodev2.h>)
- Memory : "V4L2_MEMORY_MMAP" or "V4L2_MEMORY_USERPTR" (From "v4l2_memory" enum in <linux/videodev2.h>)
- AwaitMode : It determines how "Videos" module waits for data to be available on video device before
dequeuing buffer :
"VIDEO_AWAIT_MODE_BLOCKING" => Waiting indefinitely until data are available for reading
"VIDEO_AWAIT_MODE_NON_BLOCKING" => Checking regularly (currently every 2s) if data are available
Note : Only the following 4 configs have been tested for now!!
-->
<Configs>
<!-- Choice 0 : MJPEG - MMAP -->
<Config>
<Capabilities>
<Item value="V4L2_CAP_VIDEO_CAPTURE" />
<Item value="V4L2_CAP_STREAMING" />
</Capabilities>
<BufferType value="V4L2_BUF_TYPE_VIDEO_CAPTURE" />
<PixelFormat value="V4L2_PIX_FMT_MJPEG" />
<Colorspace value="V4L2_COLORSPACE_JPEG" />
<Memory value="V4L2_MEMORY_MMAP" />
<AwaitMode value="VIDEO_AWAIT_MODE_BLOCKING" />
</Config>
<!-- Choice 1 : MJPEG - USERPTR -->
<Config>
<Capabilities>
<Item value="V4L2_CAP_VIDEO_CAPTURE" />
<Item value="V4L2_CAP_STREAMING" />
</Capabilities>
<BufferType value="V4L2_BUF_TYPE_VIDEO_CAPTURE" />
<PixelFormat value="V4L2_PIX_FMT_MJPEG" />
<Colorspace value="V4L2_COLORSPACE_JPEG" />
<Memory value="V4L2_MEMORY_USERPTR" />
<AwaitMode value="VIDEO_AWAIT_MODE_BLOCKING" />
</Config>
<!-- Choice 2 : YVYU - MMAP -->
<Config>
<Capabilities>
<Item value="V4L2_CAP_VIDEO_CAPTURE" />
<Item value="V4L2_CAP_STREAMING" />
</Capabilities>
<BufferType value="V4L2_BUF_TYPE_VIDEO_CAPTURE" />
<PixelFormat value="V4L2_PIX_FMT_YVYU" />
<Colorspace value="V4L2_COLORSPACE_SMPTE170M" />
<Memory value="V4L2_MEMORY_MMAP" />
<AwaitMode value="VIDEO_AWAIT_MODE_BLOCKING" />
</Config>
<!-- Choice 3 : YVYU - USERPTR -->
<Config>
<Capabilities>
<Item value="V4L2_CAP_VIDEO_CAPTURE" />
<Item value="V4L2_CAP_STREAMING" />
</Capabilities>
<BufferType value="V4L2_BUF_TYPE_VIDEO_CAPTURE" />
<PixelFormat value="V4L2_PIX_FMT_YVYU" />
<Colorspace value="V4L2_COLORSPACE_SMPTE170M" />
<Memory value="V4L2_MEMORY_USERPTR" />
<AwaitMode value="VIDEO_AWAIT_MODE_BLOCKING" />
</Config>
</Configs>
</Videos>