anyKode Marilou
|
Démarrer un enregistrement vidéo.
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] Chemin complet du fichier à générer. Il s'agit d'un chemin qui se trouve sur l'ordinateur qui embarque le serveur MODA. Si le fichier existe déjà il est supprimé. |
xkode::lib::String CompressorFCC |
[in] Compresseur à utiliser (voir les Notes) |
bool bReverseImage |
[in] Indique si l'image acquise doit être renversée avant d'être sauvegardée dans le fichier. |
int ImageWidth |
[in] Largeur de l'image en pixels. |
int ImageHeight |
[in] Hauteur de l'image en pixels. |
int Fps |
[in] Nombre d'images à capturer par seconde. |
True si la commande à pu être transmise au serveur, false sinon.
VideoRecordingStart démarre un enregistrement vidéo de la simulation. Si un enregistrement est déjà en cours, celui-ci est interrompu. L'enregistreur choisit automatiquement le compresseur DIB si le compresseur spécifié n'est pas disponible.
L'enregistreur par défaut sur Windows est le DIB : il s'agit d'un format non compressé, chaque image étant enregistrée en bitmap dans un fichier AVI.
En fonction des drivers installés sur votre système, vous pouvez utiliser les compresseurs suivants:
CompressorFCC |
Description |
DIB |
Non compressé |
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!
|