:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/CameraServer.xml. .. _class_CameraServer: CameraServer ============ **Inherits:** :ref:`Object` Server keeping track of different cameras accessible in Godot. .. rst-class:: classref-introduction-group 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 Linux, macOS, and iOS. On other platforms no :ref:`CameraFeed`\ s will be available. To get a :ref:`CameraFeed` on iOS, the camera plugin from `godot-ios-plugins `__ is required. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +-------------------------+-----------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`monitoring_feeds` | ``false`` | +-------------------------+-----------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_feed`\ (\ feed\: :ref:`CameraFeed`\ ) | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`CameraFeed`\] | :ref:`feeds`\ (\ ) | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ | :ref:`CameraFeed` | :ref:`get_feed`\ (\ index\: :ref:`int`\ ) | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_feed_count`\ (\ ) | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`remove_feed`\ (\ feed\: :ref:`CameraFeed`\ ) | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Signals ------- .. _class_CameraServer_signal_camera_feed_added: .. rst-class:: classref-signal **camera_feed_added**\ (\ id\: :ref:`int`\ ) :ref:`🔗` Emitted when a :ref:`CameraFeed` is added (e.g. a webcam is plugged in). .. rst-class:: classref-item-separator ---- .. _class_CameraServer_signal_camera_feed_removed: .. rst-class:: classref-signal **camera_feed_removed**\ (\ id\: :ref:`int`\ ) :ref:`🔗` Emitted when a :ref:`CameraFeed` is removed (e.g. a webcam is unplugged). .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_CameraServer_FeedImage: .. rst-class:: classref-enumeration enum **FeedImage**: :ref:`🔗` .. _class_CameraServer_constant_FEED_RGBA_IMAGE: .. rst-class:: classref-enumeration-constant :ref:`FeedImage` **FEED_RGBA_IMAGE** = ``0`` The RGBA camera image. .. _class_CameraServer_constant_FEED_YCBCR_IMAGE: .. rst-class:: classref-enumeration-constant :ref:`FeedImage` **FEED_YCBCR_IMAGE** = ``0`` The `YCbCr `__ camera image. .. _class_CameraServer_constant_FEED_Y_IMAGE: .. rst-class:: classref-enumeration-constant :ref:`FeedImage` **FEED_Y_IMAGE** = ``0`` The Y component camera image. .. _class_CameraServer_constant_FEED_CBCR_IMAGE: .. rst-class:: classref-enumeration-constant :ref:`FeedImage` **FEED_CBCR_IMAGE** = ``1`` The CbCr component camera image. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_CameraServer_property_monitoring_feeds: .. rst-class:: classref-property :ref:`bool` **monitoring_feeds** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_monitoring_feeds**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_monitoring_feeds**\ (\ ) If ``true``, the server is actively monitoring available camera feeds. This has a performance cost, so only set it to ``true`` when you're actively accessing the camera. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_CameraServer_method_add_feed: .. rst-class:: classref-method |void| **add_feed**\ (\ feed\: :ref:`CameraFeed`\ ) :ref:`🔗` Adds the camera ``feed`` to the camera server. .. rst-class:: classref-item-separator ---- .. _class_CameraServer_method_feeds: .. rst-class:: classref-method :ref:`Array`\[:ref:`CameraFeed`\] **feeds**\ (\ ) :ref:`🔗` Returns an array of :ref:`CameraFeed`\ s. .. rst-class:: classref-item-separator ---- .. _class_CameraServer_method_get_feed: .. rst-class:: classref-method :ref:`CameraFeed` **get_feed**\ (\ index\: :ref:`int`\ ) :ref:`🔗` Returns the :ref:`CameraFeed` corresponding to the camera with the given ``index``. .. rst-class:: classref-item-separator ---- .. _class_CameraServer_method_get_feed_count: .. rst-class:: classref-method :ref:`int` **get_feed_count**\ (\ ) :ref:`🔗` Returns the number of :ref:`CameraFeed`\ s registered. .. rst-class:: classref-item-separator ---- .. _class_CameraServer_method_remove_feed: .. rst-class:: classref-method |void| **remove_feed**\ (\ feed\: :ref:`CameraFeed`\ ) :ref:`🔗` 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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`