123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197 |
- :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<class_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<class_CameraFeed>`\ s will be available. To get a :ref:`CameraFeed<class_CameraFeed>` on iOS, the camera plugin from `godot-ios-plugins <https://github.com/godotengine/godot-ios-plugins>`__ is required.
- .. rst-class:: classref-reftable-group
- Methods
- -------
- .. table::
- :widths: auto
- +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`add_feed<class_CameraServer_method_add_feed>`\ (\ feed\: :ref:`CameraFeed<class_CameraFeed>`\ ) |
- +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+
- | :ref:`Array<class_Array>`\[:ref:`CameraFeed<class_CameraFeed>`\] | :ref:`feeds<class_CameraServer_method_feeds>`\ (\ ) |
- +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+
- | :ref:`CameraFeed<class_CameraFeed>` | :ref:`get_feed<class_CameraServer_method_get_feed>`\ (\ index\: :ref:`int<class_int>`\ ) |
- +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_feed_count<class_CameraServer_method_get_feed_count>`\ (\ ) |
- +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`remove_feed<class_CameraServer_method_remove_feed>`\ (\ feed\: :ref:`CameraFeed<class_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<class_int>`\ ) :ref:`🔗<class_CameraServer_signal_camera_feed_added>`
- Emitted when a :ref:`CameraFeed<class_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<class_int>`\ ) :ref:`🔗<class_CameraServer_signal_camera_feed_removed>`
- Emitted when a :ref:`CameraFeed<class_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:`🔗<enum_CameraServer_FeedImage>`
- .. _class_CameraServer_constant_FEED_RGBA_IMAGE:
- .. rst-class:: classref-enumeration-constant
- :ref:`FeedImage<enum_CameraServer_FeedImage>` **FEED_RGBA_IMAGE** = ``0``
- The RGBA camera image.
- .. _class_CameraServer_constant_FEED_YCBCR_IMAGE:
- .. rst-class:: classref-enumeration-constant
- :ref:`FeedImage<enum_CameraServer_FeedImage>` **FEED_YCBCR_IMAGE** = ``0``
- The `YCbCr <https://en.wikipedia.org/wiki/YCbCr>`__ camera image.
- .. _class_CameraServer_constant_FEED_Y_IMAGE:
- .. rst-class:: classref-enumeration-constant
- :ref:`FeedImage<enum_CameraServer_FeedImage>` **FEED_Y_IMAGE** = ``0``
- The Y component camera image.
- .. _class_CameraServer_constant_FEED_CBCR_IMAGE:
- .. rst-class:: classref-enumeration-constant
- :ref:`FeedImage<enum_CameraServer_FeedImage>` **FEED_CBCR_IMAGE** = ``1``
- The CbCr component camera image.
- .. 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<class_CameraFeed>`\ ) :ref:`🔗<class_CameraServer_method_add_feed>`
- Adds the camera ``feed`` to the camera server.
- .. rst-class:: classref-item-separator
- ----
- .. _class_CameraServer_method_feeds:
- .. rst-class:: classref-method
- :ref:`Array<class_Array>`\[:ref:`CameraFeed<class_CameraFeed>`\] **feeds**\ (\ ) :ref:`🔗<class_CameraServer_method_feeds>`
- Returns an array of :ref:`CameraFeed<class_CameraFeed>`\ s.
- .. rst-class:: classref-item-separator
- ----
- .. _class_CameraServer_method_get_feed:
- .. rst-class:: classref-method
- :ref:`CameraFeed<class_CameraFeed>` **get_feed**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_CameraServer_method_get_feed>`
- Returns the :ref:`CameraFeed<class_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<class_int>` **get_feed_count**\ (\ ) :ref:`🔗<class_CameraServer_method_get_feed_count>`
- Returns the number of :ref:`CameraFeed<class_CameraFeed>`\ s registered.
- .. rst-class:: classref-item-separator
- ----
- .. _class_CameraServer_method_remove_feed:
- .. rst-class:: classref-method
- |void| **remove_feed**\ (\ feed\: :ref:`CameraFeed<class_CameraFeed>`\ ) :ref:`🔗<class_CameraServer_method_remove_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.)`
- .. |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.)`
|