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.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
moGsFramework Class Reference

#include <moGsGraph.h>

Inheritance diagram for moGsFramework:
moVideoFramework moAbstract

Public Member Functions

 moGsFramework ()
 
virtual ~moGsFramework ()
 
virtual moCaptureDevices * LoadCaptureDevices ()
 
virtual moCaptureDevices * UpdateCaptureDevices ()
 Actualiza los dispositivos de video disponibles. More...
 
virtual bool CheckCaptureDevice (int i)
 Chequea si el dispositivos de video disponible está aún disponible. More...
 
virtual bool AddCaptureDevice (moCaptureDevice &p_capdev)
 Agrega un dispositivo de video. More...
 
- Public Member Functions inherited from moVideoFramework
 moVideoFramework ()
 
virtual ~moVideoFramework ()
 
virtual void SetPreferredDevices (moCaptureDevices *p_pPreferredDevices)
 Fija los dispositivos predeterminados. More...
 
virtual void SetPreferredFormat (const moCaptureDevice &p_CaptureDevice)
 Fija el formato de un dispositivo. More...
 
virtual moCaptureDevices * GetPreferredDevices ()
 Acceso a los dispositivos de video preferidos. More...
 
virtual moCaptureDevices * GetCaptureDevices ()
 Acceso a los dispositivos de video disponibles. More...
 
virtual void CleanCaptureDevices ()
 Limpia el arreglo de dispositivos de video. More...
 
- Public Member Functions inherited from moAbstract
 moAbstract ()
 
virtual ~moAbstract ()
 
virtual MOboolean Init ()
 Inicializa el objeto. More...
 
virtual MOboolean Finish ()
 Finaliza el objeto, libera recursos. More...
 
MOboolean Initialized ()
 Pregunta si está inicializado. More...
 

Additional Inherited Members

- Public Attributes inherited from moAbstract
MOboolean m_bInitialized
 Valor de inicialización More...
 
- Static Public Attributes inherited from moAbstract
static moDebugMODebug2 = new moDebug()
 Clase de impresión de errores para depuración More...
 
static moTextHeapMODebug = new moTextHeap()
 Lista de textos. More...
 
- Protected Attributes inherited from moVideoFramework
moCaptureDevices m_CaptureDevices
 
moCaptureDevices m_PreferredDevices
 Dispositivos de video disponibles. More...
 

Detailed Description

Definition at line 121 of file moGsGraph.h.

Constructor & Destructor Documentation

moGsFramework::moGsFramework ( )

Definition at line 1079 of file moGsGraph.cpp.

moGsFramework::~moGsFramework ( )
virtual

Definition at line 1085 of file moGsGraph.cpp.

Member Function Documentation

bool moGsFramework::AddCaptureDevice ( moCaptureDevice p_capdev)
virtual

Agrega un dispositivo de video.

Si el dispositivo existe entonces esta función devuelve verdadero.

Returns
verdadero si existe y pudo ser agregado, falso si no

try to load: then if couldn't load it return false....

Implements moVideoFramework.

Definition at line 1423 of file moGsGraph.cpp.

bool moGsFramework::CheckCaptureDevice ( int  i)
virtual

Chequea si el dispositivos de video disponible está aún disponible.

En el indice i del arreglo de los dispositivos de video disponibles confirma la disponibilidad de este. Al implementar esta función se puede conectar y reconectar cámaras.

Returns
verdadero si está disponible, falso si no

TODO: implement CheckCaptureDevice

unused

Implements moVideoFramework.

Definition at line 1414 of file moGsGraph.cpp.

moCaptureDevices * moGsFramework::LoadCaptureDevices ( )
virtual

GList* gst_camera_capturer_enum_devices(gchar* device_name) { GstElement* device; GstPropertyProbe* probe; GValueArray* va; GList* list=NULL; guint i=0;

device = gst_element_factory_make (device_name, "source"); gst_element_set_state(device, GST_STATE_READY); gst_element_get_state(device, NULL, NULL, 5 * GST_SECOND); if (!device || !GST_IS_PROPERTY_PROBE(device)) goto finish; probe = GST_PROPERTY_PROBE (device); va = gst_property_probe_get_values_name (probe, "device-name"); if (!va) goto finish; for(i=0; i < va->n_values; ++i) { GValue* v = g_value_array_get_nth(va, i); list = g_list_append(list, g_string_new(g_value_get_string(v))); } g_value_array_free(va);

finish: { gst_element_set_state (device, GST_STATE_NULL); gst_object_unref(GST_OBJECT (device)); return list; } }

GList* +gst_camera_capturer_enum_devices(gchar* device_name) +{

  • GstElement* device;
  • GstPropertyProbe* probe;
  • GValueArray* va;
  • GList* list=NULL;
  • guint i=0;
  • device = gst_element_factory_make (device_name, "source");
  • gst_element_set_state(device, GST_STATE_READY);
  • gst_element_get_state(device, NULL, NULL, 5 * GST_SECOND);
  • if (!device || !GST_IS_PROPERTY_PROBE(device))
  • goto finish;
  • probe = GST_PROPERTY_PROBE (device);
  • va = gst_property_probe_get_values_name (probe, "device-name");
  • if (!va)
  • goto finish;
  • for(i=0; i < va->n_values; ++i) {
  • GValue* v = g_value_array_get_nth(va, i);
  • list = g_list_append(list, g_string_new(g_value_get_string(v)));
  • }
  • g_value_array_free(va);
  • +finish:
  • {
  • gst_element_set_state (device, GST_STATE_NULL);
  • gst_object_unref(GST_OBJECT (device));
  • return list;
  • } +}

iterate thru list and populate m_CaptureDevices (best as we can)

Implements moVideoFramework.

Definition at line 1159 of file moGsGraph.cpp.

moCaptureDevices * moGsFramework::UpdateCaptureDevices ( )
virtual

Actualiza los dispositivos de video disponibles.

devuelve una referencia a los dispositivos de video disponibles esta función debe ser implementada en cada plataforma

Implements moVideoFramework.

Definition at line 1405 of file moGsGraph.cpp.


The documentation for this class was generated from the following files: