blob: e00dc031dcdbeb043f5a176213d34195675c86fa (
plain)
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
|
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CameraServer" inherits="Object" version="4.0">
<brief_description>
Server keeping track of different cameras accessible in Godot.
</brief_description>
<description>
The [CameraServer] keeps track of different cameras accessible in Godot. These are external cameras such as webcams or the cameras on your phone.
It is notably used to provide AR modules with a video feed from the camera.
[b]Note:[/b] This class is currently only implemented on macOS and iOS. On other platforms, no [CameraFeed]s will be available.
</description>
<tutorials>
</tutorials>
<methods>
<method name="add_feed">
<return type="void">
</return>
<argument index="0" name="feed" type="CameraFeed">
</argument>
<description>
Adds the camera [code]feed[/code] to the camera server.
</description>
</method>
<method name="feeds">
<return type="Array">
</return>
<description>
Returns an array of [CameraFeed]s.
</description>
</method>
<method name="get_feed">
<return type="CameraFeed">
</return>
<argument index="0" name="index" type="int">
</argument>
<description>
Returns the [CameraFeed] corresponding to the camera with the given [code]index[/code].
</description>
</method>
<method name="get_feed_count">
<return type="int">
</return>
<description>
Returns the number of [CameraFeed]s registered.
</description>
</method>
<method name="remove_feed">
<return type="void">
</return>
<argument index="0" name="feed" type="CameraFeed">
</argument>
<description>
Removes the specified camera [code]feed[/code].
</description>
</method>
</methods>
<signals>
<signal name="camera_feed_added">
<argument index="0" name="id" type="int">
</argument>
<description>
Emitted when a [CameraFeed] is added (e.g. a webcam is plugged in).
</description>
</signal>
<signal name="camera_feed_removed">
<argument index="0" name="id" type="int">
</argument>
<description>
Emitted when a [CameraFeed] is removed (e.g. a webcam is unplugged).
</description>
</signal>
</signals>
<constants>
<constant name="FEED_RGBA_IMAGE" value="0" enum="FeedImage">
The RGBA camera image.
</constant>
<constant name="FEED_YCBCR_IMAGE" value="0" enum="FeedImage">
The [url=https://en.wikipedia.org/wiki/YCbCr]YCbCr[/url] camera image.
</constant>
<constant name="FEED_Y_IMAGE" value="0" enum="FeedImage">
The Y component camera image.
</constant>
<constant name="FEED_CBCR_IMAGE" value="1" enum="FeedImage">
The CbCr component camera image.
</constant>
</constants>
</class>
|