Add linux camera support

This commit is contained in:
Paweł 2023-06-05 18:56:34 +02:00
parent c3e16cda00
commit b88585abfc
16 changed files with 1108 additions and 10 deletions

View file

@ -34,6 +34,17 @@
Returns the position of camera on the device.
</description>
</method>
<method name="set_format">
<return type="bool" />
<param index="0" name="index" type="int" />
<param index="1" name="parameters" type="Dictionary" />
<description>
Sets the feed format parameters for the given index in the [member formats] array. Returns [code]true[/code] on success. By default YUYV encoded stream is transformed to FEED_RGB. YUYV encoded stream output format can be changed with [param parameters].output value:
[code]separate[/code] will result in FEED_YCBCR_SEP
[code]grayscale[/code] will result in desaturated FEED_RGB
[code]copy[/code] will result in FEED_YCBCR
</description>
</method>
</methods>
<members>
<member name="feed_is_active" type="bool" setter="set_active" getter="is_active" default="false">
@ -42,7 +53,22 @@
<member name="feed_transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D(1, 0, 0, -1, 0, 1)">
The transform applied to the camera's image.
</member>
<member name="formats" type="Array" setter="" getter="get_formats" default="[]">
Formats supported by the feed. Each entry is a [Dictionary] describing format parameters.
</member>
</members>
<signals>
<signal name="format_changed">
<description>
Emitted when the format has changed.
</description>
</signal>
<signal name="frame_changed">
<description>
Emitted when a new frame is available.
</description>
</signal>
</signals>
<constants>
<constant name="FEED_NOIMAGE" value="0" enum="FeedDataType">
No image set for the feed.