anyKode Marilou
|
Starting video recording.
bool VideoRecordingStart(xkode::lib::String FilePathOnServer, xkode::lib::String CompressorFCC, bool bReverseImage, int ImageWidth, int ImageHeight, int Fps);
Parameters |
Description |
xkode::lib::String FilePathOnServer |
[in] Full video file path to generate. The path is absolute, on MODA server's computer. If the file already exists, it is deleted. |
xkode::lib::String CompressorFCC |
[in] Compressor (see notes hereafter) |
bool bReverseImage |
[in] Indicates if image must be reversed before file writing. |
int ImageWidth |
[in] Image width (pixels). |
int ImageHeight |
[in] Image height (pixels) |
int Fps |
[in] Images per second to capture. |
true if command has been sent to the server, false otherwise.
VideoRecordingStart starts a video recording using the specified compressor. If a recording is already running, it is stopped. If the chosen compressor is not available the recorder will automatically switch to DIB format (see compressors notes).
The default Windows recorder is the DIB: this is a non compressed format that writes bitmap images.
You can also use the following compressors (if they are installed on your computer):
CompressorFCC |
Description |
DIB |
Not compressed |
divx |
Format DivX |
xvid |
Format Xvid |
fvfw |
ffvfw MPEG-4 encoder |
cvid |
Cinepak Codec by Radius |
iv41 |
Intel Video 4.5 |
iv50 |
Intel Video 5.1 |
iyuv |
Intel I YUV |
mrle |
Microsoft RLE |
msvc |
Microsoft Video 1 |
mpg4 |
Microsoft MPEG-4 Video codec 1 |
mp42 |
Microsoft MPEG-4 Video codec 2 |
mp43 |
Microsoft MPEG-4 Video codec 3 |
#include "stdafx.h" #include "Modacpp.h" #include "conio.h" #define MODASERVER "localhost" int main(int argc, char* argv[]) { //Try connect to MODA server ModaCPP::Connection *connection=new ModaCPP::Connection(true); if(connection->Connect(MODASERVER)) { _cprintf("Connection ok to moda server\r\n"); //run the simulation (ignored if simulation is already running) connection->SimulationRun(); //records images using DIB format _cprintf("Recording DIB video ...\r\n"); connection->VideoRecordingStart("c:\\myavifile.avi","DIB",false,640,480,10); connection->Sleep(5000); connection->VideoRecordingStop(); //records images using Divx format _cprintf("Recording Divx video ...\r\n"); connection->VideoRecordingStart("c:\\mydivxfile.avi","divx",false,640,480,10); connection->Sleep(5000); connection->VideoRecordingStop(); _cprintf("End !\r\n"); } else { _cprintf("Unable to connect to moda server\r\n"); } //Disconnect & delete connection->Disconnect(); delete connection; return 0; }
Documentation v4.7 (18/01/2015), Copyright (c) 2015 anyKode. All rights reserved.
|
What do you think about this topic? Send feedback!
|