libmoldeo (Moldeo 1.0 Core)
1.0
libmoldeo is the group of objects and functions that executes the basic operations of Moldeo 1.0 Platform.
|
#include <moVideoManager.h>
Public Member Functions | |
moVideoManager () | |
virtual | ~moVideoManager () |
virtual MOboolean | Init () |
virtual MOboolean | Finish () |
virtual void | Update (moEventList *p_EventList) |
MOswitch | GetStatus (MOdevcode) |
MOswitch | SetStatus (MOdevcode, MOswitch) |
MOint | GetValue (MOdevcode) |
MOpointer | GetPointer (MOdevcode devcode) |
MOdevcode | GetCode (moText) |
moCamera * | GetCamera (int cam_idx) |
moCamera * | GetCameraByName (const moText &camera, bool load=false, moCaptureDevice customCD=moCaptureDevice()) |
moCamera * | CreateCamera (const moCaptureDevice &p_CapDev) |
const moTextArray & | GetCameraNames () |
const moCaptureDevices & | GetCaptureDevices (bool reload=true) |
int | GetCameraCount () |
moCircularVideoBuffer * | GetCircularVideoBuffer (int cb_idx) |
int | GetCircularVideoBufferCount () |
moVideoBufferPath * | GetVideoBufferPath (int vb_idx) |
int | GetVideoBufferPathCount () |
moVideoBuffer * | GetVideoBuffer (int vb_idx) |
int | GetVideoBufferCount () |
Public Member Functions inherited from moResource | |
moResource () | |
virtual | ~moResource () |
moResourceType | GetResourceType () |
Public Member Functions inherited from moMoldeoObject | |
moMoldeoObject () | |
moMoldeoObject (moMoldeoObjectType p_type) | |
virtual | ~moMoldeoObject () |
virtual MOboolean | Init (moResourceManager *p_pResources) |
virtual MOboolean | CreateConnectors () |
virtual MOboolean | UpdateConnectors () |
virtual MOboolean | RefreshValue (moParam ¶m, int value_index) |
virtual MOboolean | ResolveValue (moParam ¶m, int value_index, bool p_refresh=false) |
void | SetResourceManager (moResourceManager *p_pResourceManager) |
moResourceManager * | GetResourceManager () |
MOint | GetId () const |
void | SetId (MOint p_id) |
moMoldeoObjectType | GetType () const |
void | SetType (moMoldeoObjectType p_type) |
void | SetName (const moText &p_name) |
void | SetLabelName (const moText &p_labelname) |
void | SetKeyName (const moText &p_keyname) |
const moText & | GetKeyName () const |
const moText & | GetName () const |
const moText & | GetLabelName () const |
moConfig * | GetConfig () |
void | SyncConnections () |
virtual int | Save (const moText &p_save_filename=moText("")) |
void | SetConfigName (const moText &p_configname) |
const moText & | GetConfigName () const |
const moText & | GetDescription () const |
Devuelve al descripción del objeto. More... | |
void | SetDescription (const moText &p_Description) |
Fija la descripción de este objeto. More... | |
const moMobDefinition & | GetMobDefinition () const |
void | SetMobDefinition (const moMobDefinition &p_MobDef) |
virtual moConfigDefinition * | GetDefinition (moConfigDefinition *p_configdefinition=NULL) |
moOutlets * | GetOutlets () |
moInlets * | GetInlets () |
MOint | GetInletIndex (moText p_connector_name) const |
MOint | GetOutletIndex (moText p_connector_name) const |
virtual void | RegisterFunctions () |
beware ! call only once or die!!! More... | |
virtual int | ScriptCalling (moLuaVirtualMachine &vm, int iFunctionNumber) |
virtual void | HandleReturns (moLuaVirtualMachine &vm, const char *strFunc) |
virtual const moMobState & | GetState () const |
virtual bool | SetState (const moMobState &p_MobState) |
virtual void | Activate () |
virtual void | Deactivate () |
virtual bool | Activated () const |
virtual void | Select () |
virtual void | Unselect () |
virtual bool | Selected () const |
virtual void | SetConsoleParamIndex (MOint p_paramindex) |
virtual void | SetConsoleValueIndex (MOint p_valueindex) |
virtual const moText & | ToJSON () |
Public Member Functions inherited from moAbstract | |
moAbstract () | |
virtual | ~moAbstract () |
MOboolean | Initialized () |
Pregunta si está inicializado. More... | |
Public Member Functions inherited from moScript | |
moScript () | |
virtual | ~moScript (void) |
void | InitScript () |
void | FinishScript () |
bool | IsInitialized () |
bool | CompileFile (const char *strFilename) |
bool | CompileBuffer (unsigned char *pbBuffer, size_t szLen) |
int | RegisterFunction (const char *strFuncName, moScript::Function &fun) |
int | RegisterFunction (const char *strFuncName) |
int | RegisterBaseFunction (const char *strFuncName) |
bool | SelectScriptFunction (const char *strFuncName) |
void | AddFunctionParam (int iInt) |
void | AddFunctionParam (float fFloat) |
void | AddFunctionParam (char *string) |
bool | RunSelectedFunction (int nReturns=0) |
bool | ScriptHasFunction (const char *strScriptName) |
int | methods (void) |
virtual int | ResetScriptCalling () |
virtual int | NextScriptCalling () |
moLuaVirtualMachine & | mvm (void) |
Static Public Member Functions | |
static moText | NanosecondsToTimecode (MOulonglong duration) |
static moText | FramesToTimecode (MOulonglong duration, double framespersecond) |
Public Attributes | |
moTextArray | m_CameraDevices |
Public Attributes inherited from moAbstract | |
MOboolean | m_bInitialized |
Valor de inicialización More... | |
Public Attributes inherited from moScript | |
Function | Functions [255] |
Definition at line 450 of file moVideoManager.h.
moVideoManager::moVideoManager | ( | ) |
Definition at line 746 of file moVideoManager.cpp.
|
virtual |
Definition at line 757 of file moVideoManager.cpp.
moCamera * moVideoManager::CreateCamera | ( | const moCaptureDevice & | p_CapDev | ) |
create
Definition at line 1134 of file moVideoManager.cpp.
|
virtual |
constructor genérico de la clase.
Reimplemented from moResource.
Definition at line 1661 of file moVideoManager.cpp.
|
static |
Definition at line 1402 of file moVideoManager.cpp.
moCamera * moVideoManager::GetCamera | ( | int | cam_idx | ) |
Devuelve el objeto moCamera de cb_idx Se consigue el cam_idx con la función GetCameraByName, y el nombre del dispositivo de captura con las funciones GetCaptureDevices
Definition at line 1126 of file moVideoManager.cpp.
moCamera * moVideoManager::GetCameraByName | ( | const moText & | camera, |
bool | load = false , |
||
moCaptureDevice | customCD = moCaptureDevice() |
||
) |
Devuelve el objeto moCamera cuyo Device Name sea camera en caso de no encontrarlo y el load es true intenta inicializar el dispositivo/camara
camera | es el nombre del dispositivo de captura o cámara asignado por el sistema operativo (v4l2src|dshowvideosrc|osxvideosrc) |
load | si es true inicializa el dispositivo |
Try to create it!!!
Definition at line 1223 of file moVideoManager.cpp.
int moVideoManager::GetCameraCount | ( | ) |
Devuelve la cantidad de objetos de moCamera disponibles
Definition at line 1300 of file moVideoManager.cpp.
const moTextArray & moVideoManager::GetCameraNames | ( | ) |
Devuelve una lista de nombres de dispositivos disponibles
Loads capture devices.... preferred devices go first... or they are just OPENED
m_pLiveSystems->GetVideoFramework(); m_pLiveSystems->GetStatus(devcode);
Definition at line 1307 of file moVideoManager.cpp.
const moCaptureDevices & moVideoManager::GetCaptureDevices | ( | bool | reload = true | ) |
Devuelve el arreglo de dispostivos disponibles (moCapureDevice)
reload | si es true vuelve a consultar al sistema el listado de dispositivos disponibles |
Definition at line 1317 of file moVideoManager.cpp.
moCircularVideoBuffer * moVideoManager::GetCircularVideoBuffer | ( | int | cb_idx | ) |
Devuelve el objeto moCircularVideoBuffer de cb_idx
Definition at line 1326 of file moVideoManager.cpp.
int moVideoManager::GetCircularVideoBufferCount | ( | ) |
Devuelve la cantidad de objetos de moCircularVideoBuffer disponibles
Definition at line 1330 of file moVideoManager.cpp.
Definition at line 1108 of file moVideoManager.cpp.
Definition at line 1633 of file moVideoManager.cpp.
Definition at line 1067 of file moVideoManager.cpp.
Definition at line 1086 of file moVideoManager.cpp.
moVideoBuffer * moVideoManager::GetVideoBuffer | ( | int | vb_idx | ) |
Devuelve el objeto moVideoBuffer del indice vb_idx
Definition at line 1342 of file moVideoManager.cpp.
int moVideoManager::GetVideoBufferCount | ( | ) |
Devuelve la cantidad de objetos de moVideoBuffer disponibles
Definition at line 1356 of file moVideoManager.cpp.
moVideoBufferPath * moVideoManager::GetVideoBufferPath | ( | int | vb_idx | ) |
Devuelve el objeto moVideoBufferPaths del indice vb_idx
Definition at line 1334 of file moVideoManager.cpp.
int moVideoManager::GetVideoBufferPathCount | ( | ) |
Devuelve la cantidad de objetos de moVideoBufferPath disponibles
Definition at line 1338 of file moVideoManager.cpp.
|
virtual |
constructor genérico de la clase.
LOAD AUTORECONNECT PARAMETER...
LOAD PREFERRED DEVICES CONFIGURATION
TODO: create values from default making accesible default camera if present with default value ....
Reimplemented from moResource.
Definition at line 762 of file moVideoManager.cpp.
|
static |
Definition at line 1362 of file moVideoManager.cpp.
RELOAD CAPTURE DEVICES
Definition at line 1056 of file moVideoManager.cpp.
|
virtual |
método de actualización de datos del objeto.
p_EventList | puntero a la lista de eventos. |
Procesa la lista de eventos
MO_MESSAGE -> mensajes que van de un objeto a otro, de un outlet a un inlet Caso de procesar mensajes direccionados a inlets: si son mensajes emitidos hacia este objeto [SON MENSAJES EMERGENTES DE OTROS OUTLETS] => LOS PROCESAMOS si son mensajes emitidos por este objeto [SON MENSAJES EMERGENTES DE OUTLETS PROPIOS] => LOS BORRAMOS!
ATENCION: NO PUEDEN ENVIARSE MENSAJES DE UN PROPIO OUTLET A UN PROPIO INLET (nunca serian borrados)
procesamos el GetState para que ejecute la iteracion del loop interno...obligatorio!!
INVERT RED AND BLUE
finish with pbucket
Procesamos los eventos recibidos de los MoldeoObject Outlets
procesamos aquellos Outlet q estan dirigidos a este objeto
pSample = (moVideoSample*)actual->pointer;
process message:
buscar el inlet...
Only create Data if this is a custom Inlet
si tiene un dato (por ejemplo es el dato referencia de un moParam) copia directamente (ya que se refleja directamente en: pinlet->m_pParam->Data sin embargo al estar interpolado
notifica al inlet que ya esta actualizado...
Broadcasting: borra su propio mensaje....
se fija si es un mensaje generado por este objeto
pasamos al siguiente
generamos los mensajes emergentes de los Outlets
TODO: chequear encadenamiento ( outlet (object2) >> inlet (thisobject) (translatex) outlet (thisobject) (translatex) >> inlet (object3)
Emit the internal Outlet's data
solo notificamos a los inlets si los outlets estan Updated() importante revisar esto... puede deba ser algo condicional: claramente lo es, sobre todo para los Outlets que asociados a parámetros, por ejemplo el alpha.. o el translatex
reset to update false, so it doesnt continue sending!
Reimplemented from moMoldeoObject.
Definition at line 1456 of file moVideoManager.cpp.
|
protected |
Definition at line 542 of file moVideoManager.h.
|
protected |
Definition at line 548 of file moVideoManager.h.
|
protected |
Definition at line 546 of file moVideoManager.h.
moTextArray moVideoManager::m_CameraDevices |
Definition at line 536 of file moVideoManager.h.
|
protected |
Definition at line 541 of file moVideoManager.h.
|
protected |
Definition at line 544 of file moVideoManager.h.
|
protected |
Definition at line 540 of file moVideoManager.h.
|
protected |
Definition at line 545 of file moVideoManager.h.