MoSync 3.0.1
Camera Functions

Classes

struct  MA_CAMERA_FORMAT
 The camera format, in pixels. More...

Typedefs

typedef struct MA_CAMERA_FORMAT MA_CAMERA_FORMAT
 The camera format, in pixels.

Functions

int maCameraFormatNumber (void)
int maCameraFormat (int index, MA_CAMERA_FORMAT *fmt)
int maCameraStart (void)
int maCameraStop (void)
int maCameraSetPreview (MAHandle widgetHandle)
int maCameraSelect (int cameraNumber)
int maCameraNumber (void)
int maCameraSnapshot (int formatIndex, MAHandle placeholder)
int maCameraRecord (int stopStartFlag)
int maCameraSetProperty (const char *property, const char *value)
int maCameraGetProperty (const char *property, char *value, int bufSize)

Typedef Documentation

The camera format, in pixels.


Function Documentation

int maCameraFormatNumber ( void  )

Returns the number of different output formats supported by the current device's camera. < 0 if there is no camera support. 0 if there is camera support, but the format is unknown.

References maIOCtl().

int maCameraFormat ( int  index,
MA_CAMERA_FORMAT fmt 
)

Stores an output format in fmt. index must be >= 0 and < the number returned by maCameraFormatNumber().

Returns:
0.

References maIOCtl().

int maCameraStart ( void  )

Starts a fullscreen viewfinder. Returns 1 if the viewfinder was started, 0 if it was already running or < 0 on error.

References maIOCtl().

int maCameraStop ( void  )

Stops the viewfinder. Returns 1 if the viewfinder was stopped, 0 if it was not running or < 0 on error.

References maIOCtl().

int maCameraSetPreview ( MAHandle  widgetHandle)

Adds a previewWidget to the camera controller in devices that support native UI. Returns 1 for success, < 0 on error.

References maIOCtl().

int maCameraSelect ( int  cameraNumber)

Selects a Camera from the available ones. Returns 1 for success, < 0 on error.

References maIOCtl().

int maCameraNumber ( void  )

Returns the number of available Camera on the device. Returns 1 for success, < 0 on error.

References maIOCtl().

int maCameraSnapshot ( int  formatIndex,
MAHandle  placeholder 
)

Requires the viewfinder to be active. Takes a snapshot using the specified format. The snapshot is stored as a new data object in the supplied placeholder. Returns 0 on success, or < 0 on error.

References maIOCtl().

int maCameraRecord ( int  stopStartFlag)

Starts or stops recording video. stopStartFlag indicates the operation. 1 for start recording and 0 for stop recording. Returns 1 for success, < 0 on error.

References maIOCtl().

int maCameraSetProperty ( const char *  property,
const char *  value 
)

Sets a specified property on the Selected Camera.

Parameters:
propertyA string representing which property to set.
valueThe value which will be assigned to the property.
Returns:
1 for success and <0 for failure.

References maIOCtl().

int maCameraGetProperty ( const char *  property,
char *  value,
int  bufSize 
)

retrives a specified property on the Selected Camera.

Parameters:
propertyA string representing which property to set.
valueA buffer that will hold the value of the property, represented as a string.
bufSizeSize of the buffer.
Returns:
1 for success and <0 for failure.

References maIOCtl().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines