Difference between revisions of "Camera.start"
From GiderosMobile
Line 6: | Line 6: | ||
<translate>Start live streaming of camera images to the specified Texture.</translate> | <translate>Start live streaming of camera images to the specified Texture.</translate> | ||
<source lang="lua"> | <source lang="lua"> | ||
− | (number), (number) = camera.start(texture,device) | + | (number), (number), (number), (number) = camera.start(texture,device,pictureWidth,pictureHeight) |
</source> | </source> | ||
=== <translate>Parameters</translate> === | === <translate>Parameters</translate> === | ||
'''texture''': (Texture) <translate>The texture to render camera stream into</translate> <br/> | '''texture''': (Texture) <translate>The texture to render camera stream into</translate> <br/> | ||
'''device''': (string) <translate>The camera to use or nil to use the default one</translate> '''optional'''<br/> | '''device''': (string) <translate>The camera to use or nil to use the default one</translate> '''optional'''<br/> | ||
+ | '''pictureWidth''': (number) <translate>The required width of pictures or 0 if takePicture() isn't used</translate> '''optional'''<br/> | ||
+ | '''pictureHeight''': (number) <translate>The required height of pictures or 0 if takePicture() isn't used</translate> '''optional'''<br/> | ||
=== <translate>Return values</translate> === | === <translate>Return values</translate> === | ||
'''<translate>Returns</translate>''' (number) <translate>Nominal width of camera images</translate><br/> | '''<translate>Returns</translate>''' (number) <translate>Nominal width of camera images</translate><br/> | ||
'''<translate>Returns</translate>''' (number) <translate>Nominal height of camera images</translate><br/> | '''<translate>Returns</translate>''' (number) <translate>Nominal height of camera images</translate><br/> | ||
+ | '''<translate>Returns</translate>''' (number) <translate>Selected width of taken pictures</translate><br/> | ||
+ | '''<translate>Returns</translate>''' (number) <translate>Selected height of taken pictures</translate><br/> | ||
{{Camera}} | {{Camera}} |
Revision as of 14:45, 18 August 2021
Available since: Gideros 2017.8
Class: camera
Description
Start live streaming of camera images to the specified Texture.
(number), (number), (number), (number) = camera.start(texture,device,pictureWidth,pictureHeight)
Parameters
texture: (Texture) The texture to render camera stream into
device: (string) The camera to use or nil to use the default one optional
pictureWidth: (number) The required width of pictures or 0 if takePicture() isn't used optional
pictureHeight: (number) The required height of pictures or 0 if takePicture() isn't used optional
Return values
Returns (number) Nominal width of camera images
Returns (number) Nominal height of camera images
Returns (number) Selected width of taken pictures
Returns (number) Selected height of taken pictures