2017-08-20 16:17:24 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2021-11-05 15:02:42 +01:00
<class name= "CameraFeed" inherits= "Reference" version= "3.5" >
2017-08-20 16:17:24 +02:00
<brief_description >
A camera feed gives you access to a single physical camera attached to your device.
</brief_description>
<description >
2022-01-04 19:24:04 +01:00
A camera feed gives you access to a single physical camera attached to your device. When enabled, Godot will start capturing frames from the camera which can then be used. See also [CameraServer].
2019-06-22 01:04:47 +02:00
[b]Note:[/b] Many cameras will return YCbCr images which are split into two textures and need to be combined in a shader. Godot does this automatically for you if you set the environment to show the camera image in the background.
2017-08-20 16:17:24 +02:00
</description>
<tutorials >
</tutorials>
<methods >
<method name= "get_id" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2017-08-20 16:17:24 +02:00
<description >
2019-10-07 01:26:15 +02:00
Returns the unique ID for this feed.
2017-08-20 16:17:24 +02:00
</description>
</method>
<method name= "get_name" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "String" />
2017-08-20 16:17:24 +02:00
<description >
2019-10-07 01:26:15 +02:00
Returns the camera's name.
2017-08-20 16:17:24 +02:00
</description>
</method>
<method name= "get_position" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" enum= "CameraFeed.FeedPosition" />
2017-08-20 16:17:24 +02:00
<description >
2019-10-07 01:26:15 +02:00
Returns the position of camera on the device.
2017-08-20 16:17:24 +02:00
</description>
</method>
</methods>
<members >
2019-06-29 12:38:01 +02:00
<member name= "feed_is_active" type= "bool" setter= "set_active" getter= "is_active" default= "false" >
2019-10-07 01:26:15 +02:00
If [code]true[/code], the feed is active.
2017-08-20 16:17:24 +02:00
</member>
2019-06-29 12:38:01 +02:00
<member name= "feed_transform" type= "Transform2D" setter= "set_transform" getter= "get_transform" default= "Transform2D( 1, 0, 0, -1, 0, 1 )" >
2019-10-07 01:26:15 +02:00
The transform applied to the camera's image.
2017-08-20 16:17:24 +02:00
</member>
</members>
<constants >
<constant name= "FEED_NOIMAGE" value= "0" enum= "FeedDataType" >
No image set for the feed.
</constant>
<constant name= "FEED_RGB" value= "1" enum= "FeedDataType" >
Feed supplies RGB images.
</constant>
2019-06-19 14:21:13 +02:00
<constant name= "FEED_YCBCR" value= "2" enum= "FeedDataType" >
2017-08-20 16:17:24 +02:00
Feed supplies YCbCr images that need to be converted to RGB.
</constant>
2019-06-19 14:21:13 +02:00
<constant name= "FEED_YCBCR_SEP" value= "3" enum= "FeedDataType" >
2017-08-20 16:17:24 +02:00
Feed supplies separate Y and CbCr images that need to be combined and converted to RGB.
</constant>
<constant name= "FEED_UNSPECIFIED" value= "0" enum= "FeedPosition" >
Unspecified position.
</constant>
<constant name= "FEED_FRONT" value= "1" enum= "FeedPosition" >
Camera is mounted at the front of the device.
</constant>
<constant name= "FEED_BACK" value= "2" enum= "FeedPosition" >
2019-06-22 01:04:47 +02:00
Camera is mounted at the back of the device.
2017-08-20 16:17:24 +02:00
</constant>
</constants>
</class>