CameraFeed.xml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="CameraFeed" inherits="Reference" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
  3. <brief_description>
  4. A camera feed gives you access to a single physical camera attached to your device.
  5. </brief_description>
  6. <description>
  7. A camera feed gives you access to a single physical camera attached to your device. When enabled, Godot will start capturing frames from the camera which can then be used. See also [CameraServer].
  8. [b]Note:[/b] Many cameras will return YCbCr images which are split into two textures and need to be combined in a shader. Godot does this automatically for you if you set the environment to show the camera image in the background.
  9. </description>
  10. <tutorials>
  11. </tutorials>
  12. <methods>
  13. <method name="get_id" qualifiers="const">
  14. <return type="int" />
  15. <description>
  16. Returns the unique ID for this feed.
  17. </description>
  18. </method>
  19. <method name="get_name" qualifiers="const">
  20. <return type="String" />
  21. <description>
  22. Returns the camera's name.
  23. </description>
  24. </method>
  25. <method name="get_position" qualifiers="const">
  26. <return type="int" enum="CameraFeed.FeedPosition" />
  27. <description>
  28. Returns the position of camera on the device.
  29. </description>
  30. </method>
  31. </methods>
  32. <members>
  33. <member name="feed_is_active" type="bool" setter="set_active" getter="is_active" default="false">
  34. If [code]true[/code], the feed is active.
  35. </member>
  36. <member name="feed_transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D( 1, 0, 0, -1, 0, 1 )">
  37. The transform applied to the camera's image.
  38. </member>
  39. </members>
  40. <constants>
  41. <constant name="FEED_NOIMAGE" value="0" enum="FeedDataType">
  42. No image set for the feed.
  43. </constant>
  44. <constant name="FEED_RGB" value="1" enum="FeedDataType">
  45. Feed supplies RGB images.
  46. </constant>
  47. <constant name="FEED_YCBCR" value="2" enum="FeedDataType">
  48. Feed supplies YCbCr images that need to be converted to RGB.
  49. </constant>
  50. <constant name="FEED_YCBCR_SEP" value="3" enum="FeedDataType">
  51. Feed supplies separate Y and CbCr images that need to be combined and converted to RGB.
  52. </constant>
  53. <constant name="FEED_UNSPECIFIED" value="0" enum="FeedPosition">
  54. Unspecified position.
  55. </constant>
  56. <constant name="FEED_FRONT" value="1" enum="FeedPosition">
  57. Camera is mounted at the front of the device.
  58. </constant>
  59. <constant name="FEED_BACK" value="2" enum="FeedPosition">
  60. Camera is mounted at the back of the device.
  61. </constant>
  62. </constants>
  63. </class>