diff host/pyRealTime.h @ 11:4610f2b8477d

added pyRealTime object impl to host
author fazekasgy
date Mon, 16 Jun 2008 09:44:48 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/host/pyRealTime.h	Mon Jun 16 09:44:48 2008 +0000
@@ -0,0 +1,44 @@
+#ifndef _PYREALTIME_H_
+#define _PYREALTIME_H_
+
+#include "vamp-sdk/Plugin.h"
+
+/* RealTime Type Object's structure    */
+/* Doc:: 10.2 Common Object Structures */
+typedef struct {
+		PyObject_HEAD
+		/*PyObject	*rt_attrs;*/
+		Vamp::RealTime::RealTime *rt;
+} RealTimeObject; 
+
+PyAPI_DATA(PyTypeObject) RealTime_Type;
+
+#define PyRealTime_CheckExact(v)	((v)->ob_type == &RealTime_Type)
+#define PyRealTime_Check(v) PyObject_TypeCheck(v, &RealTime_Type)
+
+/* pyRealTime C API functions */
+//	Example from Python's stringobject.h
+// 	PyAPI_FUNC(PyObject *) PyString_FromString(const char *);
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+	
+PyAPI_FUNC(PyObject *) 
+PyRealTime_FromRealTime(Vamp::RealTime *rt);
+
+PyAPI_FUNC(Vamp::RealTime::RealTime *) 
+PyRealTime_AsPointer (PyObject *self);
+
+/* PyRealTime Module functions */
+
+PyAPI_FUNC(PyObject *)
+RealTime_new(PyObject *ignored, PyObject *args);
+
+PyAPI_FUNC(PyObject *)
+RealTime_frame2RealTime(PyObject *ignored, PyObject *args);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* _PYREALTIME_H_ */