Reeti
 All Classes Functions Variables Groups Pages
Public Member Functions | List of all members
UCamera Class Reference

class to handle the cameras located in the eyes of Reeti More...

#include <UCamera.h>

Inherits UObject.

Public Member Functions

int takePicture (int _camera, string _filename)
 Take a picture and save it in the folder /home/reeti/reetiPrograms/Pictures under the namefile "name". More...
 
int recordVideo (int _camera, string _filename, string _bitrate, string _x264Preset)
 Start the recording of a video and save it under the name: name in /home/reeti/reetiPrograms/Video. The video will be encoded using libx264 and the audio in mp3. The function will return immediately. More...
 
int stopRecord (int _camera)
 Stop the video recording. Does nothing if no recording is active on the specified camera. More...
 

Detailed Description

class to handle the cameras located in the eyes of Reeti

Date
Dec 04, 2014
Author
ROV
Version
2.0.0

Use

This is how the UCamera object is instantiated at Reeti system launch :

Member Function Documentation

int UCamera::takePicture ( int  _camera,
string  _filename 
)

Take a picture and save it in the folder /home/reeti/reetiPrograms/Pictures under the namefile "name".

Parameters
_cameracamera of the video to be saved (0=left, 1=right)
_filenamefilename of the picture to be saved. Must contain an existing picture extension (.jpg, .bmp, ...)
Returns
0 on success
1 on failure
int UCamera::recordVideo ( int  _camera,
string  _filename,
string  _bitrate,
string  _x264Preset 
)

Start the recording of a video and save it under the name: name in /home/reeti/reetiPrograms/Video. The video will be encoded using libx264 and the audio in mp3. The function will return immediately.

Parameters
_cameracamera of the video to be saved (0=left, 1=right)
_filenamefilename of the video to be saved. Must contain a valid extension (.mkv, .avi, ...)
_bitratefor example "500k" ; leave empty for default
_x264Presetfor example "veryfast" (see libav documentation); leave empty for default (ultrafast)
Returns
0 on success
1 on failure
int UCamera::stopRecord ( int  _camera)

Stop the video recording. Does nothing if no recording is active on the specified camera.

Parameters
_cameracamere id to stop (0=left, 1=right)
Returns
0 on success
1 on failure