:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/3.5/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/3.5/doc/classes/CameraServer.xml. .. _class_CameraServer: CameraServer ============ **Inherits:** :ref:`Object` Server keeping track of different cameras accessible in Godot. 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. \ **Note:** This class is currently only implemented on macOS and iOS. On other platforms, no :ref:`CameraFeed`\ s will be available. Methods ------- +-------------------------------------+----------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_feed` **(** :ref:`CameraFeed` feed **)** | +-------------------------------------+----------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`feeds` **(** **)** | +-------------------------------------+----------------------------------------------------------------------------------------------------------------+ | :ref:`CameraFeed` | :ref:`get_feed` **(** :ref:`int` index **)** | +-------------------------------------+----------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_feed_count` **(** **)** | +-------------------------------------+----------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_feed` **(** :ref:`CameraFeed` feed **)** | +-------------------------------------+----------------------------------------------------------------------------------------------------------------+ Signals ------- .. _class_CameraServer_signal_camera_feed_added: - **camera_feed_added** **(** :ref:`int` id **)** Emitted when a :ref:`CameraFeed` is added (e.g. a webcam is plugged in). ---- .. _class_CameraServer_signal_camera_feed_removed: - **camera_feed_removed** **(** :ref:`int` id **)** Emitted when a :ref:`CameraFeed` is removed (e.g. a webcam is unplugged). Enumerations ------------ .. _enum_CameraServer_FeedImage: .. _class_CameraServer_constant_FEED_RGBA_IMAGE: .. _class_CameraServer_constant_FEED_YCBCR_IMAGE: .. _class_CameraServer_constant_FEED_Y_IMAGE: .. _class_CameraServer_constant_FEED_CBCR_IMAGE: enum **FeedImage**: - **FEED_RGBA_IMAGE** = **0** --- The RGBA camera image. - **FEED_YCBCR_IMAGE** = **0** --- The `YCbCr `__ camera image. - **FEED_Y_IMAGE** = **0** --- The Y component camera image. - **FEED_CBCR_IMAGE** = **1** --- The CbCr component camera image. Method Descriptions ------------------- .. _class_CameraServer_method_add_feed: - void **add_feed** **(** :ref:`CameraFeed` feed **)** Adds the camera ``feed`` to the camera server. ---- .. _class_CameraServer_method_feeds: - :ref:`Array` **feeds** **(** **)** Returns an array of :ref:`CameraFeed`\ s. ---- .. _class_CameraServer_method_get_feed: - :ref:`CameraFeed` **get_feed** **(** :ref:`int` index **)** Returns the :ref:`CameraFeed` corresponding to the camera with the given ``index``. ---- .. _class_CameraServer_method_get_feed_count: - :ref:`int` **get_feed_count** **(** **)** Returns the number of :ref:`CameraFeed`\ s registered. ---- .. _class_CameraServer_method_remove_feed: - void **remove_feed** **(** :ref:`CameraFeed` feed **)** Removes the specified camera ``feed``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`