Class CameraServer
Server keeping track of different cameras accessible in Godot.
- Inheritance
-
CameraServer
Remarks
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.
Note: This class is currently only implemented on Linux, macOS, and iOS. On other platforms no CameraFeeds will be available. To get a CameraFeed on iOS, the camera plugin from godot-ios-plugins is required.
Methods
add_feed(CameraFeed)
Adds the camera feed
to the camera server.
void add_feed(CameraFeed feed)
Parameters
feed
CameraFeed
feeds
Returns an array of CameraFeeds.
CameraFeed[] feeds
get_feed(int)
Returns the CameraFeed corresponding to the camera with the given index
.
CameraFeed get_feed(int index)
Parameters
index
int
get_feed_count
Returns the number of CameraFeeds registered.
int get_feed_count
remove_feed(CameraFeed)
Removes the specified camera feed
.
void remove_feed(CameraFeed feed)
Parameters
feed
CameraFeed
Events
camera_feed_added(int)
Emitted when a CameraFeed is added (e.g. a webcam is plugged in).
signal camera_feed_added(int id)
Parameters
id
int
camera_feed_removed(int)
Emitted when a CameraFeed is removed (e.g. a webcam is unplugged).
signal camera_feed_removed(int id)
Parameters
id
int