mirror of
https://github.com/godotengine/godot.git
synced 2024-12-21 10:25:24 +08:00
b68dd2e189
This makes it easier to spot syntax errors when editing the class reference. The schema is referenced locally so validation can still work offline. Each class XML's schema conformance is also checked on GitHub Actions.
77 lines
2.6 KiB
XML
77 lines
2.6 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="CameraServer" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
|
<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" />
|
|
<argument index="0" name="feed" type="CameraFeed" />
|
|
<description>
|
|
Adds the camera [code]feed[/code] to the camera server.
|
|
</description>
|
|
</method>
|
|
<method name="feeds">
|
|
<return type="Array" />
|
|
<description>
|
|
Returns an array of [CameraFeed]s.
|
|
</description>
|
|
</method>
|
|
<method name="get_feed">
|
|
<return type="CameraFeed" />
|
|
<argument index="0" name="index" type="int" />
|
|
<description>
|
|
Returns the [CameraFeed] corresponding to the camera with the given [code]index[/code].
|
|
</description>
|
|
</method>
|
|
<method name="get_feed_count">
|
|
<return type="int" />
|
|
<description>
|
|
Returns the number of [CameraFeed]s registered.
|
|
</description>
|
|
</method>
|
|
<method name="remove_feed">
|
|
<return type="void" />
|
|
<argument index="0" name="feed" type="CameraFeed" />
|
|
<description>
|
|
Removes the specified camera [code]feed[/code].
|
|
</description>
|
|
</method>
|
|
</methods>
|
|
<signals>
|
|
<signal name="camera_feed_added">
|
|
<argument index="0" name="id" type="int" />
|
|
<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" />
|
|
<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>
|