192 lines
6.1 KiB
ReStructuredText
192 lines
6.1 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. DO NOT EDIT THIS FILE!!!
|
|
.. Generated automatically from Godot engine sources.
|
|
.. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
|
|
.. XML source: https://github.com/godotengine/godot/tree/3.6/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 macOS and iOS. On other platforms, no :ref:`CameraFeed<class_CameraFeed>`\ s will be available.
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Methods
|
|
-------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+-------------------------------------+----------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`add_feed<class_CameraServer_method_add_feed>` **(** :ref:`CameraFeed<class_CameraFeed>` feed **)** |
|
|
+-------------------------------------+----------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Array<class_Array>` | :ref:`feeds<class_CameraServer_method_feeds>` **(** **)** |
|
|
+-------------------------------------+----------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`CameraFeed<class_CameraFeed>` | :ref:`get_feed<class_CameraServer_method_get_feed>` **(** :ref:`int<class_int>` index **)** |
|
|
+-------------------------------------+----------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_feed_count<class_CameraServer_method_get_feed_count>` **(** **)** |
|
|
+-------------------------------------+----------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`remove_feed<class_CameraServer_method_remove_feed>` **(** :ref:`CameraFeed<class_CameraFeed>` feed **)** |
|
|
+-------------------------------------+----------------------------------------------------------------------------------------------------------------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Signals
|
|
-------
|
|
|
|
.. _class_CameraServer_signal_camera_feed_added:
|
|
|
|
.. rst-class:: classref-signal
|
|
|
|
**camera_feed_added** **(** :ref:`int<class_int>` id **)**
|
|
|
|
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** **(** :ref:`int<class_int>` id **)**
|
|
|
|
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**:
|
|
|
|
.. _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** **(** :ref:`CameraFeed<class_CameraFeed>` 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>` **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** **(** :ref:`int<class_int>` index **)**
|
|
|
|
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** **(** **)**
|
|
|
|
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** **(** :ref:`CameraFeed<class_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.)`
|
|
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|