37 #endif // MO_QUICKTIME
38 #endif // MO_DIRECTSHOW
47 #include "FreeImage.h"
59 fif = (int)FIF_UNKNOWN;
76 FIBITMAP* _pImageResult = (FIBITMAP*)pImageResult;
79 hmem = FreeImage_OpenMemory();
83 if ( bufferformat ==
moText(
"JPG")) {
86 }
else if ( bufferformat ==
moText(
"JPGSUPERB") ) {
89 }
else if ( bufferformat ==
moText(
"JPGBAD") ) {
92 }
else if ( bufferformat ==
moText(
"JPGAVERAGE") ) {
95 }
else if ( bufferformat ==
moText(
"JPGGOOD") ) {
98 }
else if ( bufferformat ==
moText(
"TGA") ) {
101 }
else if ( bufferformat ==
moText(
"PNG") ) {
106 +
moText(
" bufferformat unsupported!!") );
109 FreeImage_SaveToMemory( (FREE_IMAGE_FORMAT)
fif, _pImageResult, (FIMEMORY*)
hmem,
options );
113 +
moText(
" Couldn't save image to memory, format may be unsupported") );
124 FreeImage_CloseMemory( (FIMEMORY*)
hmem );
130 fif = (int)FIF_UNKNOWN;
143 m_pResourceManager = NULL;
158 if (!m_pResourceManager)
165 moVideoBuffer::Init(
moText bufferpath,
moText bufferformat,
moResourceManager* p_pResourceManager,
MOuint width,
MOuint height,
MOuint xsource,
MOuint ysource,
MOuint sourcewidth,
MOuint sourceheight,
MOint interpolation,
MOint interpolationjump,
MOint interpolationtime ) {
166 m_pResourceManager = p_pResourceManager;
168 m_BufferPath = bufferpath;
169 m_BufferFormat = bufferformat;
172 m_SourceWidth = sourcewidth;
173 m_SourceHeight = sourceheight;
186 m_Frames.Init( 0, NULL);
192 for(
MOuint i=0; i<m_Frames.Count(); i++) {
199 m_pResourceManager = NULL;
206 FIBITMAP* _pImage = (FIBITMAP*)pImage;
207 FIBITMAP* pImageResult = NULL;
208 FIBITMAP* pImageCropped = NULL;
209 FIBITMAP* pImageScaled = NULL;
211 if (
m_width!=FreeImage_GetWidth(_pImage) ||
m_height!=FreeImage_GetHeight(_pImage) ) {
213 pImageCropped = FreeImage_Copy( _pImage, m_XSource , m_YSource , m_XSource + m_SourceWidth , m_YSource+m_SourceHeight );
214 pImageResult = pImageCropped;
216 }
else pImageResult = _pImage;
228 pImageScaled = FreeImage_Rescale( pImageResult,
m_width,
m_height, FILTER_BICUBIC );
230 FreeImage_Unload(pImageResult);
231 pImageResult = pImageScaled;
237 if (indeximage==-1 || indeximage == (
int)m_Frames.Count() ) {
240 pVideoFrame->
Init( m_BufferFormat, pImageResult );
241 m_Frames.Add(pVideoFrame);
243 }
else if ( indeximage < (
int)m_Frames.Count() ) {
244 pVideoFrame = m_Frames.Get(indeximage);
247 pVideoFrame->
Init( m_BufferFormat, pImageResult );
251 if (pImageResult!=_pImage)
252 FreeImage_Unload(pImageResult);
257 return (pVideoFrame!=NULL);
269 if ( p_i<m_Frames.Count()) {
281 FreeImage_TellMemory((FIMEMORY*)pVideoFrame->
hmem);
282 FreeImage_SeekMemory( (FIMEMORY*)pVideoFrame->
hmem, 0L, SEEK_SET);
287 pImage = FreeImage_LoadFromMemory( (FREE_IMAGE_FORMAT)pVideoFrame->
fif, (FIMEMORY*)pVideoFrame->
hmem, 0);
290 switch (FreeImage_GetBPP(pImage))
294 p_format = GL_LUMINANCE;
301 if (FreeImage_GetBlueMask(pImage) == 0x000000FF) p_format = GL_BGR;
309 if (FreeImage_GetBlueMask(pImage) == 0x000000FF) p_format = GL_BGRA_EXT;
318 FreeImage_Unload( pImage );
323 moText(
"Couldn't load image from memory, texture name: ") +
338 m_pResourceManager = NULL;
355 if (!m_pResourceManager)
363 m_pResourceManager = p_pResourceManager;
365 m_VideoInput = videoinput;
366 m_BufferFormat = bufferformat;
369 m_SourceWidth = sourcewidth;
370 m_SourceHeight = sourceheight;
378 pBlack = FreeImage_Allocate( width, height, 24 );
380 for(
MOint i=0; i<frames; i++) {
383 pVideoFrame->
Init( bufferformat, pBlack );
384 m_Frames.Add(pVideoFrame);
395 for(
MOuint i=0; i<m_Frames.Count(); i++) {
402 m_pResourceManager = NULL;
410 FIBITMAP* pImage = NULL;
413 if (!pvideosample)
return false;
418 if (!pBucket)
return false;
419 pImage = FreeImage_ConvertFromRawBits( pBucket->
GetBuffer(),
428 FIBITMAP* pImageResult = NULL;
429 FIBITMAP* pImageCropped = NULL;
430 FIBITMAP* pImageScaled = NULL;
435 if (
m_width!=FreeImage_GetWidth(pImage) ||
m_height!=FreeImage_GetHeight(pImage) ) {
437 pImageCropped = FreeImage_Copy( pImage, m_XSource , m_YSource , m_XSource + m_SourceWidth , m_YSource+m_SourceHeight );
438 pImageResult = pImageCropped;
440 }
else pImageResult = pImage;
452 pImageScaled = FreeImage_Rescale( pImageResult,
m_width,
m_height, FILTER_BICUBIC );
454 FreeImage_Unload(pImageResult);
455 pImageResult = pImageScaled;
463 if ( m_WriteIndex>= (
MOint)m_Frames.Count() ) {
467 m_ReadIndex = m_WriteIndex;
472 pVideoFrame->
Init( m_BufferFormat, pImageResult );
475 if (pImageResult!=pImage)
476 FreeImage_Unload(pImageResult);
478 FreeImage_Unload(pImage);
482 return (pVideoFrame!=NULL);
494 if ( p_i<m_Frames.Count()) {
496 MOint ddd = ( m_ReadIndex - (int)p_i);
497 if (ddd<0) ddd = m_Frames.Count() + ddd;
498 p_i = ddd % m_Frames.Count();
510 FreeImage_TellMemory((FIMEMORY*)pVideoFrame->
hmem);
511 FreeImage_SeekMemory( (FIMEMORY*)pVideoFrame->
hmem, 0L, SEEK_SET);
516 pImage = FreeImage_LoadFromMemory( (FREE_IMAGE_FORMAT)pVideoFrame->
fif, (FIMEMORY*)pVideoFrame->
hmem, 0);
518 switch (FreeImage_GetBPP(pImage))
522 p_format = GL_LUMINANCE;
529 if (FreeImage_GetBlueMask(pImage) == 0x000000FF) p_format = GL_BGR;
537 if (FreeImage_GetBlueMask(pImage) == 0x000000FF) p_format = GL_BGRA_EXT;
546 FreeImage_Unload( pImage );
554 if (at_position!=-1 && at_position>=0 && at_position<(
long)m_Frames.Count()) {
555 m_WriteIndex = at_position;
575 if ( at_position>=0 && at_position<(
long)m_Frames.Count()) {
576 m_WriteIndex = at_position;
600 m_ImagesProcessed = 0;
602 m_pResourceManager = NULL;
604 m_bLoadCompleted =
false;
623 m_pResourceManager = pResources;
625 if (!m_pResourceManager)
628 m_VideoBufferPath = videobufferpath;
634 if (m_pDirectory) this->m_TotalFiles = (
MOint)m_pDirectory->
GetFiles().Count();
648 return m_bLoadCompleted;
652 return this->m_VideoBufferPath;
656 return this->m_CompletePath;
661 return this->m_TotalFiles;
665 return this->m_ImagesProcessed;
669 return this->m_ActualImage;
679 if (!m_pDirectory)
return false;
681 this->m_TotalFiles = (
MOint)m_pDirectory->
GetFiles().Count();
683 if (m_ActualImage>=(
MOint)m_pDirectory->
GetFiles().Count()) {
684 m_bLoadCompleted =
true;
688 if (m_ActualImage==0)
691 pFile = m_pDirectory->
Find(m_ActualImage);
698 FREE_IMAGE_FORMAT fif;
701 if( fif == FIF_UNKNOWN ) {
706 if( (fif != FIF_UNKNOWN) && FreeImage_FIFSupportsReading(fif) ) {
719 pVideoBuffer->
LoadImage( pImage, m_ActualImage );
721 FreeImage_Unload(pImage);
731 if (counter==maxfiles && maxfiles!=(-1))
734 }
while ( (pFile = m_pDirectory->
FindNext()) );
764 moCaptureDevices* pPreferredDevices;
768 moText confignamecompleto;
784 moText msg =
"In moVideoManager::Init from config file ***********************\n";
785 msg+=
moText(
"Initializing Live...\n");
809 pPreferredDevices =
new moCaptureDevices();
826 for(
MOuint i = 0; i < nvalues; i++) {
830 MOint srcw(0),srch(0),srcbpp(0),flH(0),flV(0);
851 CD.SetVideoFormat( VF );
852 CD.SetPreffered(
true );
854 pPreferredDevices->Add( CD );
957 MOint xsource, ysource, width, height, sourcewidth, sourceheight, frames;
958 MOint interpolation, interpolation_jump, interpolation_time;
960 if (circularbuffer>0)
975 if(videobufferinput!=
moText(
"")) {
981 if (pCircularBuffer) {
982 pCircularBuffer->
Init( videobufferinput, videobufferformat,
GetResourceManager(), frames, width, height, xsource, ysource, sourcewidth, sourceheight);
1003 if (pVideoBufferPath) {
1024 if(videobufferpath!=
moText(
"")) {
1031 pVideoBuffer->
Init( videobufferpath, videobufferformat,
GetResourceManager(), width, height, xsource, ysource, sourcewidth, sourceheight, interpolation, interpolation_jump, interpolation_time);
1039 delete pPreferredDevices;
1059 if (devcode == 0 ) {
1147 if (!pLS)
return NULL;
1149 if (!pLS->
Init())
return NULL;
1237 MODebug2->
Message(
"moVideoManager::GetCameraByName > camera already loaded, returnin:"+camera);
1246 if (m_CapDev.
GetName()==camera
1250 ( camera==
"default" && d>=0 && m_CapDev.
IsPresent() )
1316 const moCaptureDevices&
1348 if (pVideoBufferPath) {
1353 return pVideoBuffer;
1360 #include <gst/gst.h>
1374 onemilisecond = GST_MSECOND;
1375 onesecond = GST_SECOND;
1376 oneminute = 60 * onesecond;
1377 onehour = 60 * oneminute;
1378 oneday = 24 * onehour;
1379 oneyear = 365 * oneday;
1381 years = duration / oneyear; duration = duration - years * oneyear;
1382 days = duration / oneday; duration = duration - days * oneday;
1383 hours = duration / onehour; duration = duration - hours * onehour;
1384 minutes = duration / oneminute; duration = duration - minutes * oneminute;
1385 seconds = duration / onesecond; duration = duration - seconds * onesecond;
1386 miliseconds = duration / onemilisecond; duration = duration - miliseconds * onemilisecond;
1389 if (years>0) timecodestr =
IntToStr(years) +
" years ";
1390 if (days>0) timecodestr+=
IntToStr(days) +
" days ";
1391 if (hours>0) { timecodestr+=
IntToStr(hours,2) +
":"; }
1392 else { timecodestr+=
"00:"; }
1393 if (minutes>0) { timecodestr+=
IntToStr(minutes,2) +
":"; }
1394 else { timecodestr+=
"00:"; }
1395 if (seconds>0) { timecodestr+=
IntToStr(seconds,2) +
"."; }
1396 else { timecodestr+=
"00."; }
1397 if (miliseconds>0) { timecodestr+=
IntToStr(miliseconds/10,2); }
1398 else { timecodestr+=
"00"; }
1405 double years,oneyear;
1407 double hours,onehour;
1408 double minutes,oneminute;
1409 double seconds,onesecond;
1410 double miliseconds,onemilisecond;
1412 double frames,durationF;
1415 onemilisecond = framespersecond/1000.0f;
1416 onesecond = framespersecond;
1417 oneminute = 60 * onesecond;
1418 onehour = 60 * oneminute;
1419 oneday = 24 * onehour;
1420 oneyear = 365 * oneday;
1421 durationF = duration;
1423 years =
moMathd::Floor(durationF / oneyear); duration = duration - (long)(years * oneyear);durationF=duration;
1424 days =
moMathd::Floor(durationF / oneday); duration = duration - (long)(days * oneday);durationF=duration;
1425 hours =
moMathd::Floor(durationF / onehour); duration = duration - (long)(hours * onehour);durationF=duration;
1426 minutes =
moMathd::Floor(durationF / oneminute); duration = duration - (long)(minutes * oneminute);durationF=duration;
1427 seconds =
moMathd::Floor(durationF / onesecond); duration = duration - (long)(seconds * onesecond);durationF=duration;
1428 frames =
moMathd::Floor(durationF); duration = duration - (long)(frames*1.0);durationF=duration;
1429 miliseconds =
moMathd::Floor(durationF / onemilisecond); duration = duration - (long)(miliseconds * onemilisecond);durationF=duration;
1433 if (years>0) timecodestr =
IntToStr((
long)years) +
" years ";
1434 if (days>0) timecodestr+=
IntToStr((
long)days) +
" days ";
1435 if (hours>0) { timecodestr+=
IntToStr((
long)hours) +
":"; }
1436 else { timecodestr+=
"00:"; }
1437 if (minutes>0) { timecodestr+=
IntToStr((
long)minutes,2) +
":"; }
1438 else { timecodestr+=
"00:"; }
1439 if (seconds>0) {timecodestr+=
IntToStr((
long)seconds,2) +
":"; }
1440 else { timecodestr+=
"00:"; }
1441 if (frames>0) { timecodestr+=
IntToStr((
long)frames,2) +
"."; }
1442 else { timecodestr+=
"00."; }
1443 if (miliseconds>0) { timecodestr+=
IntToStr((
int)miliseconds); }
1444 else { timecodestr+=
"000"; }
1472 actual = p_EventList->
First;
1475 while(actual!=NULL) {
1480 if ( pBucketsPool!=NULL ) {
1488 p_EventList->
Delete(actual);
1490 }
else actual = actual->
next;
1503 if ( pBucketsPool!=NULL ) {
1505 if ( pBucketsPool->
IsFull() ) {
1516 if( pSample!=NULL ) {
1543 BYTE* pix = &pbuffer[a];
1578 if (pCircularVideoBuffer &&
1615 if (pVideoBufferPath && !pVideoBufferPath->
LoadCompleted()) {
1647 if (pSample!=NULL) {
1670 if (pVideoBufferPath) {
1671 pVideoBufferPath->
Finish();
1672 delete pVideoBufferPath;
1688 m_pBucketsPool = NULL;
1689 m_pVideoGraph = NULL;
1690 m_pVideoSample = NULL;
1704 m_pBucketsPool = NULL;
1705 m_pVideoGraph = NULL;
1706 m_pVideoSample = NULL;
1709 m_CaptureDevice = p_capdev;
1720 if ( m_pBucketsPool!=NULL )
Finish();
1725 #ifdef MO_DIRECTSHOW
1726 moDsGraph* pDsGraph;
1727 pDsGraph =
new moDsGraph();
1741 if ( m_pVideoGraph ) {
1743 if( m_pVideoGraph->
BuildLiveGraph( m_pBucketsPool , m_CaptureDevice ) ) {
1745 m_pVideoGraph->
Play();
1754 return (m_pBucketsPool && m_pVideoGraph && m_pVideoSample);
1760 if (m_pVideoGraph!=NULL) {
1762 delete m_pVideoGraph;
1763 m_pVideoGraph = NULL;
1766 if (m_pBucketsPool!=NULL) {
1767 delete m_pBucketsPool;
1768 m_pBucketsPool = NULL;
1771 if (m_pVideoSample) {
1772 delete m_pVideoSample;
1773 m_pVideoSample = NULL;
1779 m_pTexture = p_Texture;
1799 return m_CaptureDevice.
GetName();
1812 return m_pVideoSample;
1824 m_CaptureDevice = p_capdev;
1829 return m_CaptureDevice;
1834 return m_pBucketsPool;
1845 #ifdef MO_DIRECTSHOW
1900 return ( pCapDevs->Count() > 0 );
1909 int oldCount = Count();
1911 for(
MOuint i = 0; i < pCapDevs->Count(); i++) {
1913 if ( pCapDevs->Get(i).IsPresent() ) {
1997 return ( (
int)Count() > oldCount );
2008 for(
MOuint i= 0; i< Count(); i++ ) {
2017 return (Count()==0);
2031 pLS = Get( p_devcode );
virtual MOboolean Finish()
#define MO_VIDEO_SOURCEINTERPOLATIONJUMP
virtual void JumpRecording(long at_position)
virtual MOboolean Finish()
Finaliza el objeto, libera recursos.
MOint m_SourceWidth
PUERTO DEL DISPOSITIVO.
virtual MOboolean Finish()
moResourceManager * GetResourceManager()
virtual void SetInterpolation(MOuint p_FrameJump, MOuint p_InterpolationTime)
virtual bool CheckCaptureDevice(int i)=0
Chequea si el dispositivos de video disponible está aún disponible.
moVideoFormat GetVideoFormat()
Devuelve el formato de video.
moBucketsPool * GetBucketsPool()
const moCaptureDevices & GetCaptureDevices(bool reload=true)
void Error(moText p_text)
Anuncia y registra un error.
int GetSourceHeight() const
Devuelve el alto de la imagen de origen.
bool DestroyRetreivedBucket()
void SetName(const moText &p_name)
#define MO_VIDEO_CIRCULARSOURCEWIDTH
#define MO_VIDEO_BUFFERFORMAT
Plataforma de reproducción de video, actualmente GStreamer para todas las plataformas.
virtual void Start()
Inicia el temporizador.
#define MO_VIDEO_CIRCULARBUFFERFORMAT
moValueBase & GetSubValue(MOint p_indexsubvalue=0)
moColorMode
Formatos de codificacion de color.
moVideoSample * GetVideoSample()
#define MO_LIVE_SCALEWIDTH
MOboolean Delete(moEvent *ev)
MOswitch GetStatus(MOdevcode)
moDefineDynamicArray(moCircularVideoBuffers) moDefineDynamicArray(moVideoFrames) moDefineDynamicArray(moVideoBuffers) moDefineDynamicArray(moLiveSystemPtrs) moDefineDynamicArray(moVideoBufferPaths) moVideoFrame
moCamera * GetCameraByName(const moText &camera, bool load=false, moCaptureDevice customCD=moCaptureDevice())
virtual bool IsRunning()=0
Está corriendo.
#define MO_VIDEO_CIRCULARSOURCEHEIGHT
moRenderManager * GetRenderMan()
void SetCaptureDevice(moCaptureDevice p_capdev)
virtual long GetRecordPosition()
virtual MOboolean Finish()
void SetType(moLiveSystemType p_Type)
virtual MOboolean Init()
Inicializa el objeto.
#define MO_VIDEO_CIRCULARWIDTH
int GetParamIndex(moText p_paramname)
Devuelve el índice correspondiente al parámetro por nombre.
MOboolean IsTextureNonPowerOf2Disabled() const
MOfloat m_fFramesPerSecond
bool Unlock()
Libera el acceso al buffer interno.
void SetVideoFormat(const moVideoFormat &p_videoformat)
Devuelve el formato de video del dispositivo.
virtual ~moCircularVideoBuffer()
MOswitch SetStatus(MOdevcode, MOswitch)
moCaptureDevices m_CaptureDevices
MOint AddTexture(MOuint p_type, moText p_name, moTexParam p_tex_param=MODefTex2DParams)
void SetResourceType(moResourceType p_restype)
moCaptureDevice GetCaptureDevice()
MOboolean BuildEmpty(MOuint p_width, MOuint p_height)
virtual bool IsRecording()
#define MO_LIVE_LABELNAME
bool Lock()
Paraliza el acceso al buffer interno.
virtual void CleanCaptureDevices()
Limpia el arreglo de dispositivos de video.
#define MO_VIDEO_SOURCEINTERPOLATIONTIME
#define MO_VIDEO_SOURCEXOFFSET
moFile * Find(MOint index)
#define MO_VIDEO_CIRCULARBUFFERFRAMES
virtual void GetFrame(MOuint p_i)
moLiveSystemType GetType()
virtual void PauseRecording()
#define MO_LIVE_SCALEHEIGHT
#define MO_LIVE_COLORMODE
static double Floor(doublefValue)
virtual MOboolean Init()
Inicializa el objeto.
moVideoFormat & GetVideoFormat()
Devuelve el formato de video del dispositivo.
virtual bool FinishGraph()=0
Finalización del grafo.
virtual moText GetVideoInput()
clase de para manejar textos
moTexture * GetTexture(MOuint p_moid)
virtual MOboolean ActivateInterpolation(MOboolean activate=true)
MOuint GetValuesCount(int p_paramindex)
Devuelve la cantidad de valores que contiene el parámetro indexado.
virtual MOboolean Init()
Inicializa el objeto.
moResourceManager * m_pResourceManager
Puntero al administrador de recursos.
void Stop()
Detiene el temporizador.
Grafo de reproducción de video.
Dispositivo de entrada/salida, típicamente, interfaces humanas de IO y datos ( teclado, mouse, tableta, tcp, udp, serial )
moVideoFramework * GetVideoFramework()
Muestra de video o cuadro.
moCamera * GetCamera(int cam_idx)
void SetCurrentValueIndex(int p_paramindex, int p_valueindex)
Posiciona el puntero de selección del valor del parámetro a la posición indicada.
MOboolean UpdateImages(MOint maxfiles=-1)
bool IsPresent() const
Señala y verifica si está presente el dispositivo.
virtual bool BuildLiveGraph(moBucketsPool *pBucketsPool, moCaptureDevice p_capdev)=0
Grafo de captura de video.
#define MO_LIVE_DEVICENAME
const moText & GetLabelName() const
Devuelve el nombre de código del dispositivo.
moConfig m_Config
Configuración de parámetros del objeto.
Buffer de imágenes para video.
virtual ~moVideoBufferPath()
Sistema de tratamiento de una señal en vivo de video.
void SetLabelName(const moText &p_labelname)
Fija el nombre de código del dispositivo.
Clase de manipulación para el cuadro de un video en memoria.
virtual moStreamState GetState()
Estado de la reproducción.
virtual MOboolean Init()
Inicializa el objeto.
void Present(bool p=true)
Fija la presencia del dispositivo.
const moText & GetName() const
Devuelve el nombre del dispositivo.
#define MO_VIDEO_SOURCEHEIGHT
static moText FramesToTimecode(MOulonglong duration, double framespersecond)
#define MO_MOLDEOOBJECT_UNDEFINED_ID
virtual MOboolean Finish()
moFileManager * GetFileMan()
#define MO_VIDEO_SOURCEINTERPOLATION
static moText NanosecondsToTimecode(MOulonglong duration)
Sistema de tratamiento de señales en vivo de video.
virtual void StartRecording(long at_position=-1)
MOboolean LoadCompleted()
static MOuint NextPowerOf2(MOuint p_seed)
virtual void SetPreferredDevices(moCaptureDevices *p_pPreferredDevices)
Fija los dispositivos predeterminados.
#define MO_VIDEO_CIRCULARBUFFERNAME
clase base para el manejo de una textura
void Pause()
Congela o pausa el temporizador.
Administrador de moBucket 's.
moDirectory * GetDirectory(moText p_Path)
moText GetCompletePath()
Get inmediate folder name: return "PP" for "PP/myFileName.txt".
Administrador de recursos.
virtual moCaptureDevices * LoadCaptureDevices()=0
Carga los dispositivos de video disponibles.
const moText & GetPath() const
Devuelve el camino al dispositivo.
virtual void StopRecording()
moVideoFramework * m_pVideoFramework
void SetLabelName(const moText &p_labelname)
void Continue()
Prosigue el temporizador.
MOboolean IsConfigLoaded()
Indica si ha sido cargado con éxito el archivo de configuración
virtual MOboolean Finish()
Finaliza el objeto, libera recursos.
MOint GetValue(MOdevcode)
virtual MOboolean Init()
Inicializa el objeto.
virtual void GetFrame(MOuint p_i)
int GetSourceWidth() const
Devuelve el ancho de la imagen de origen.
moTextArray m_CameraDevices
#define MO_VIDEO_CIRCULARSOURCEXOFFSET
void * m_pSampleBuffer
Formato de video de la muestra.
virtual void SetPreferredFormat(const moCaptureDevice &p_CaptureDevice)
Fija el formato de un dispositivo.
virtual void Play()=0
Reproducir el video.
static moDebug * MODebug2
Clase de impresión de errores para depuración
void SetVideoSample(moVideoFormat p_videoformat, MOpointer p_buffer)
Fija el formato de video y puntero al buffer de datos.
moLiveSystems * m_pLiveSystems
moCircularVideoBuffers m_CircularVideoBuffers
moDataManager * GetDataMan()
virtual MOboolean Init()
Inicializa el objeto.
Definición de un dispositivo de video, generalmente uno de captura de video, o camara.
moCamera * CreateCamera(const moCaptureDevice &p_CapDev)
virtual void Update(moEventList *p_EventList)
Espacio en memoria para compartir datos entre objetos.
#define MO_VIDEO_CIRCULARSOURCEYOFFSET
moValue & GetValue(MOint i=-1)
const moTextArray & GetCameraNames()
#define MO_VIDEO_CIRCULARBUFFERINPUT
moParam & GetParam(MOint p_paramindex=-1)
Devuelve el parámetro por índice.
moVideoBufferPaths m_VideoBufferPaths
virtual MOboolean Finish()
Finaliza el objeto, libera recursos.
MOpointer GetPointer(MOdevcode devcode)
bool IsPowerOfTwo(int iValue)
#define MO_VIDEO_SOURCEYOFFSET
void SetName(const moText &p_name)
MOdevcode GetCode(moText)
moVideoGraph * GetVideoGraph()
virtual MOboolean LoadSample(moVideoSample *pvideosample)
LIBMOLDEO_API moText0 IntToStr(int a)
virtual void ContinueRecording()
bool Started() const
Devuelve el estado del temporizador.
MOubyte * GetBuffer()
Devuelve el puntero al buffer de datos.
int GetCircularVideoBufferCount()
moBucket * RetreiveBucket()
virtual bool InitGraph()=0
Inicialización del grafo.
moCircularVideoBuffer * GetCircularVideoBuffer(int cb_idx)
bool GetStatus(MOdevcode p_devcode)
bool SetCurrentParamIndex(int)
Selecciona el parámetro por el índice.
MOuint GetSubValueCount()
una textura asociada a una animación de cuadros
MOboolean m_bInitialized
Valor de inicialización
moBucket * RetreivedBucket()
virtual ~moVideoManager()
MOboolean LoadImage(moBitmap *pImage, int indeximage=-1)
int GetVideoBufferPathCount()
virtual MOboolean Finish()
Finaliza el objeto, libera recursos.
Circular Video Buffer for live loop video recording.
void Message(moText p_text)
Anuncia un mensaje al usuario además de guardarlo en el log de texto.
bool LoadLiveSystems(moCaptureDevices *p_pPreferredDevices)
#define MO_VIDEO_CIRCULARHEIGHT
void SetTexture(moTexture *p_Texture)
void SetType(moMoldeoObjectType p_type)
moVideoFormat m_VideoFormat
#define MO_VIDEO_SOURCEWIDTH
moVideoBuffers m_VideoBuffers
moVideoBufferPath * GetVideoBufferPath(int vb_idx)
int GetVideoBufferCount()
moVideoBuffer * GetVideoBuffer(int vb_idx)
moTextureManager * GetTextureMan()
MOboolean SetBuffer(const GLvoid *p_buffer, GLenum p_format=GL_RGBA, GLenum p_type=GL_UNSIGNED_BYTE)
#define MO_VIDEO_BUFFERNAME
virtual moCaptureDevices * UpdateCaptureDevices()=0
Actualiza los dispositivos de video disponibles.