Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/gameengine/VideoTexture')
-rw-r--r--source/gameengine/VideoTexture/BlendType.h13
-rw-r--r--source/gameengine/VideoTexture/FilterBase.cpp10
-rw-r--r--source/gameengine/VideoTexture/FilterBase.h12
-rw-r--r--source/gameengine/VideoTexture/FilterBlueScreen.cpp10
-rw-r--r--source/gameengine/VideoTexture/FilterColor.cpp12
-rw-r--r--source/gameengine/VideoTexture/FilterNormal.cpp10
-rw-r--r--source/gameengine/VideoTexture/ImageBase.cpp44
-rw-r--r--source/gameengine/VideoTexture/ImageBase.h36
-rw-r--r--source/gameengine/VideoTexture/ImageBuff.cpp16
-rw-r--r--source/gameengine/VideoTexture/ImageMix.cpp4
-rw-r--r--source/gameengine/VideoTexture/ImageRender.cpp22
-rw-r--r--source/gameengine/VideoTexture/ImageViewport.cpp18
-rw-r--r--source/gameengine/VideoTexture/ImageViewport.h12
-rw-r--r--source/gameengine/VideoTexture/PyTypeList.cpp8
-rw-r--r--source/gameengine/VideoTexture/PyTypeList.h14
-rw-r--r--source/gameengine/VideoTexture/Texture.cpp18
-rw-r--r--source/gameengine/VideoTexture/Texture.h8
-rw-r--r--source/gameengine/VideoTexture/VideoBase.cpp29
-rw-r--r--source/gameengine/VideoTexture/VideoBase.h28
-rw-r--r--source/gameengine/VideoTexture/VideoFFmpeg.cpp12
-rw-r--r--source/gameengine/VideoTexture/VideoFFmpeg.h2
-rw-r--r--source/gameengine/VideoTexture/blendVideoTex.cpp16
22 files changed, 178 insertions, 176 deletions
diff --git a/source/gameengine/VideoTexture/BlendType.h b/source/gameengine/VideoTexture/BlendType.h
index 0131cc61c44..e19aadc49d2 100644
--- a/source/gameengine/VideoTexture/BlendType.h
+++ b/source/gameengine/VideoTexture/BlendType.h
@@ -37,7 +37,7 @@ public:
BlendType (const char * name) : m_name(name) {}
/// check blender type and return pointer to contained object or NULL (if type is not valid)
- PyObj * checkType (PyObject * obj)
+ PyObj *checkType(PyObject *obj)
{
// if pointer to type isn't set
if (m_objType == NULL)
@@ -55,17 +55,18 @@ public:
return NULL;
// return pointer to object, this class can only be used for KX object =>
// the Py object is actually a proxy
- return (PyObj*)BGE_PROXY_REF(obj);
+ return (PyObj *)BGE_PROXY_REF(obj);
}
/// parse arguments to get object
- PyObj * parseArg (PyObject * args)
+ PyObj *parseArg(PyObject *args)
{
// parse arguments
- PyObject * obj;
- if (PyArg_ParseTuple(args, "O", &obj))
+ PyObject *obj;
+ if (PyArg_ParseTuple(args, "O", &obj)) {
// if successfully parsed, return pointer to object
return checkType(obj);
+ }
// otherwise return NULL
return NULL;
}
@@ -74,7 +75,7 @@ protected:
/// name of Python type
const char * m_name;
/// pointer to Python type
- PyTypeObject * m_objType;
+ PyTypeObject *m_objType;
};
diff --git a/source/gameengine/VideoTexture/FilterBase.cpp b/source/gameengine/VideoTexture/FilterBase.cpp
index 90ea8436ffe..6ec5e237ac2 100644
--- a/source/gameengine/VideoTexture/FilterBase.cpp
+++ b/source/gameengine/VideoTexture/FilterBase.cpp
@@ -90,10 +90,10 @@ PyTypeList pyFilterTypes;
// object allocation
-PyObject * Filter_allocNew (PyTypeObject * type, PyObject * args, PyObject * kwds)
+PyObject *Filter_allocNew (PyTypeObject *type, PyObject *args, PyObject *kwds)
{
// allocate object
- PyFilter * self = reinterpret_cast<PyFilter*>(type->tp_alloc(type, 0));
+ PyFilter *self = reinterpret_cast<PyFilter*>(type->tp_alloc(type, 0));
// initialize object structure
self->m_filter = NULL;
// return allocated object
@@ -101,7 +101,7 @@ PyObject * Filter_allocNew (PyTypeObject * type, PyObject * args, PyObject * kwd
}
// object deallocation
-void Filter_dealloc (PyFilter * self)
+void Filter_dealloc (PyFilter *self)
{
// release object attributes
if (self->m_filter != NULL)
@@ -114,7 +114,7 @@ void Filter_dealloc (PyFilter * self)
// get previous pixel filter object
-PyObject * Filter_getPrevious (PyFilter * self, void * closure)
+PyObject *Filter_getPrevious (PyFilter *self, void *closure)
{
// if filter object is available
if (self->m_filter != NULL)
@@ -135,7 +135,7 @@ PyObject * Filter_getPrevious (PyFilter * self, void * closure)
// set previous pixel filter object
-int Filter_setPrevious (PyFilter * self, PyObject * value, void * closure)
+int Filter_setPrevious (PyFilter *self, PyObject *value, void *closure)
{
// if filter object is available
if (self->m_filter != NULL)
diff --git a/source/gameengine/VideoTexture/FilterBase.h b/source/gameengine/VideoTexture/FilterBase.h
index 63561c25ffa..422cf86f23e 100644
--- a/source/gameengine/VideoTexture/FilterBase.h
+++ b/source/gameengine/VideoTexture/FilterBase.h
@@ -118,9 +118,9 @@ extern PyTypeList pyFilterTypes;
// functions for python interface
// object initialization
-template <class T> static int Filter_init (PyObject * pySelf, PyObject * args, PyObject * kwds)
+template <class T> static int Filter_init (PyObject *pySelf, PyObject *args, PyObject *kwds)
{
- PyFilter * self = reinterpret_cast<PyFilter*>(pySelf);
+ PyFilter *self = reinterpret_cast<PyFilter*>(pySelf);
// create filter object
if (self->m_filter != NULL) delete self->m_filter;
self->m_filter = new T();
@@ -129,14 +129,14 @@ template <class T> static int Filter_init (PyObject * pySelf, PyObject * args, P
}
// object allocation
-PyObject * Filter_allocNew (PyTypeObject * type, PyObject * args, PyObject * kwds);
+PyObject *Filter_allocNew(PyTypeObject *type, PyObject *args, PyObject *kwds);
// object deallocation
-void Filter_dealloc (PyFilter * self);
+void Filter_dealloc(PyFilter *self);
// get previous pixel filter object
-PyObject * Filter_getPrevious (PyFilter * self, void * closure);
+PyObject *Filter_getPrevious(PyFilter *self, void *closure);
// set previous pixel filter object
-int Filter_setPrevious (PyFilter * self, PyObject * value, void * closure);
+int Filter_setPrevious(PyFilter *self, PyObject *value, void *closure);
#endif
diff --git a/source/gameengine/VideoTexture/FilterBlueScreen.cpp b/source/gameengine/VideoTexture/FilterBlueScreen.cpp
index 02a6a8f0344..8559e8f87f4 100644
--- a/source/gameengine/VideoTexture/FilterBlueScreen.cpp
+++ b/source/gameengine/VideoTexture/FilterBlueScreen.cpp
@@ -66,21 +66,21 @@ void FilterBlueScreen::setLimits (unsigned short minLimit, unsigned short maxLim
// cast Filter pointer to FilterBlueScreen
-inline FilterBlueScreen * getFilter (PyFilter * self)
+inline FilterBlueScreen * getFilter (PyFilter *self)
{ return static_cast<FilterBlueScreen*>(self->m_filter); }
// python methods and get/sets
// get color
-static PyObject * getColor (PyFilter * self, void * closure)
+static PyObject *getColor (PyFilter *self, void *closure)
{
return Py_BuildValue("[BBB]", getFilter(self)->getColor()[0],
getFilter(self)->getColor()[1], getFilter(self)->getColor()[2]);
}
// set color
-static int setColor (PyFilter * self, PyObject * value, void * closure)
+static int setColor (PyFilter *self, PyObject *value, void *closure)
{
// check validity of parameter
if (value == NULL || !PySequence_Check(value) || PySequence_Size(value) != 3
@@ -100,14 +100,14 @@ static int setColor (PyFilter * self, PyObject * value, void * closure)
}
// get limits
-static PyObject * getLimits (PyFilter * self, void * closure)
+static PyObject *getLimits (PyFilter *self, void *closure)
{
return Py_BuildValue("[II]", getFilter(self)->getLimits()[0],
getFilter(self)->getLimits()[1]);
}
// set limit
-static int setLimits (PyFilter * self, PyObject * value, void * closure)
+static int setLimits (PyFilter *self, PyObject *value, void *closure)
{
// check validity of parameter
if (value == NULL || !PySequence_Check(value) || PySequence_Size(value) != 2
diff --git a/source/gameengine/VideoTexture/FilterColor.cpp b/source/gameengine/VideoTexture/FilterColor.cpp
index ed75b4f8da8..35a6414f383 100644
--- a/source/gameengine/VideoTexture/FilterColor.cpp
+++ b/source/gameengine/VideoTexture/FilterColor.cpp
@@ -108,14 +108,14 @@ void FilterColor::setMatrix (ColorMatrix & mat)
// cast Filter pointer to FilterColor
-inline FilterColor * getFilterColor (PyFilter * self)
+inline FilterColor * getFilterColor (PyFilter *self)
{ return static_cast<FilterColor*>(self->m_filter); }
// python methods and get/sets
// get color matrix
-static PyObject * getMatrix (PyFilter * self, void * closure)
+static PyObject *getMatrix (PyFilter *self, void *closure)
{
ColorMatrix & mat = getFilterColor(self)->getMatrix();
return Py_BuildValue("((hhhhh)(hhhhh)(hhhhh)(hhhhh))",
@@ -126,7 +126,7 @@ static PyObject * getMatrix (PyFilter * self, void * closure)
}
// set color matrix
-static int setMatrix (PyFilter * self, PyObject * value, void * closure)
+static int setMatrix (PyFilter *self, PyObject *value, void *closure)
{
// matrix to store items
ColorMatrix mat;
@@ -243,14 +243,14 @@ void FilterLevel::setLevels (ColorLevel & lev)
// cast Filter pointer to FilterLevel
-inline FilterLevel * getFilterLevel (PyFilter * self)
+inline FilterLevel * getFilterLevel (PyFilter *self)
{ return static_cast<FilterLevel*>(self->m_filter); }
// python methods and get/sets
// get color levels
-static PyObject * getLevels (PyFilter * self, void * closure)
+static PyObject *getLevels (PyFilter *self, void *closure)
{
ColorLevel & lev = getFilterLevel(self)->getLevels();
return Py_BuildValue("((HH)(HH)(HH)(HH))",
@@ -259,7 +259,7 @@ static PyObject * getLevels (PyFilter * self, void * closure)
}
// set color levels
-static int setLevels (PyFilter * self, PyObject * value, void * closure)
+static int setLevels (PyFilter *self, PyObject *value, void *closure)
{
// matrix to store items
ColorLevel lev;
diff --git a/source/gameengine/VideoTexture/FilterNormal.cpp b/source/gameengine/VideoTexture/FilterNormal.cpp
index dda1a493291..03c500a7e14 100644
--- a/source/gameengine/VideoTexture/FilterNormal.cpp
+++ b/source/gameengine/VideoTexture/FilterNormal.cpp
@@ -59,20 +59,20 @@ void FilterNormal::setDepth (float depth)
// cast Filter pointer to FilterNormal
-inline FilterNormal * getFilter (PyFilter * self)
+inline FilterNormal * getFilter (PyFilter *self)
{ return static_cast<FilterNormal*>(self->m_filter); }
// python methods and get/sets
// get index of color used to calculate normal
-static PyObject * getColor (PyFilter * self, void * closure)
+static PyObject *getColor (PyFilter *self, void *closure)
{
return Py_BuildValue("H", getFilter(self)->getColor());
}
// set index of color used to calculate normal
-static int setColor (PyFilter * self, PyObject * value, void * closure)
+static int setColor (PyFilter *self, PyObject *value, void *closure)
{
// check validity of parameter
if (value == NULL || !PyLong_Check(value))
@@ -88,13 +88,13 @@ static int setColor (PyFilter * self, PyObject * value, void * closure)
// get depth
-static PyObject * getDepth (PyFilter * self, void * closure)
+static PyObject *getDepth (PyFilter *self, void *closure)
{
return Py_BuildValue("f", getFilter(self)->getDepth());
}
// set depth
-static int setDepth (PyFilter * self, PyObject * value, void * closure)
+static int setDepth (PyFilter *self, PyObject *value, void *closure)
{
// check validity of parameter
if (value)
diff --git a/source/gameengine/VideoTexture/ImageBase.cpp b/source/gameengine/VideoTexture/ImageBase.cpp
index 9333e0184ec..2de49795681 100644
--- a/source/gameengine/VideoTexture/ImageBase.cpp
+++ b/source/gameengine/VideoTexture/ImageBase.cpp
@@ -128,7 +128,7 @@ PyImage * ImageBase::getSource (const char * id)
// set source object
-bool ImageBase::setSource (const char * id, PyImage * source)
+bool ImageBase::setSource (const char * id, PyImage *source)
{
// find source
ImageSourceList::iterator src = findSource(id);
@@ -315,7 +315,7 @@ bool ImageSource::is (const char * id)
// set source object
-void ImageSource::setSource (PyImage * source)
+void ImageSource::setSource (PyImage *source)
{
// reference new source
if (source != NULL) Py_INCREF(source);
@@ -358,10 +358,10 @@ PyTypeList pyImageTypes;
// functions for python interface
// object allocation
-PyObject * Image_allocNew (PyTypeObject * type, PyObject * args, PyObject * kwds)
+PyObject *Image_allocNew (PyTypeObject *type, PyObject *args, PyObject *kwds)
{
// allocate object
- PyImage * self = reinterpret_cast<PyImage*>(type->tp_alloc(type, 0));
+ PyImage *self = reinterpret_cast<PyImage*>(type->tp_alloc(type, 0));
// initialize object structure
self->m_image = NULL;
// return allocated object
@@ -369,7 +369,7 @@ PyObject * Image_allocNew (PyTypeObject * type, PyObject * args, PyObject * kwds
}
// object deallocation
-void Image_dealloc (PyImage * self)
+void Image_dealloc (PyImage *self)
{
// release object attributes
if (self->m_image != NULL)
@@ -388,7 +388,7 @@ void Image_dealloc (PyImage * self)
}
// get image data
-PyObject * Image_getImage (PyImage * self, char * mode)
+PyObject *Image_getImage (PyImage *self, char * mode)
{
try
{
@@ -463,7 +463,7 @@ PyObject * Image_getImage (PyImage * self, char * mode)
}
}
}
- return (PyObject*)buffer;
+ return (PyObject *)buffer;
}
}
catch (Exception & exp)
@@ -475,28 +475,28 @@ PyObject * Image_getImage (PyImage * self, char * mode)
}
// get image size
-PyObject * Image_getSize (PyImage * self, void * closure)
+PyObject *Image_getSize (PyImage *self, void *closure)
{
return Py_BuildValue("(hh)", self->m_image->getSize()[0],
self->m_image->getSize()[1]);
}
// refresh image
-PyObject * Image_refresh (PyImage * self)
+PyObject *Image_refresh (PyImage *self)
{
self->m_image->refresh();
Py_RETURN_NONE;
}
// get scale
-PyObject * Image_getScale (PyImage * self, void * closure)
+PyObject *Image_getScale (PyImage *self, void *closure)
{
if (self->m_image != NULL && self->m_image->getScale()) Py_RETURN_TRUE;
else Py_RETURN_FALSE;
}
// set scale
-int Image_setScale (PyImage * self, PyObject * value, void * closure)
+int Image_setScale (PyImage *self, PyObject *value, void *closure)
{
// check parameter, report failure
if (value == NULL || !PyBool_Check(value))
@@ -511,14 +511,14 @@ int Image_setScale (PyImage * self, PyObject * value, void * closure)
}
// get flip
-PyObject * Image_getFlip (PyImage * self, void * closure)
+PyObject *Image_getFlip (PyImage *self, void *closure)
{
if (self->m_image != NULL && self->m_image->getFlip()) Py_RETURN_TRUE;
else Py_RETURN_FALSE;
}
// set flip
-int Image_setFlip (PyImage * self, PyObject * value, void * closure)
+int Image_setFlip (PyImage *self, PyObject *value, void *closure)
{
// check parameter, report failure
if (value == NULL || !PyBool_Check(value))
@@ -534,7 +534,7 @@ int Image_setFlip (PyImage * self, PyObject * value, void * closure)
// get filter source object
-PyObject * Image_getSource (PyImage * self, PyObject * args)
+PyObject *Image_getSource (PyImage *self, PyObject *args)
{
// get arguments
char * id;
@@ -543,7 +543,7 @@ PyObject * Image_getSource (PyImage * self, PyObject * args)
if (self->m_image != NULL)
{
// get source object
- PyObject * src = reinterpret_cast<PyObject*>(self->m_image->getSource(id));
+ PyObject *src = reinterpret_cast<PyObject*>(self->m_image->getSource(id));
// if source is available
if (src != NULL)
{
@@ -558,11 +558,11 @@ PyObject * Image_getSource (PyImage * self, PyObject * args)
// set filter source object
-PyObject * Image_setSource (PyImage * self, PyObject * args)
+PyObject *Image_setSource (PyImage *self, PyObject *args)
{
// get arguments
char * id;
- PyObject * obj;
+ PyObject *obj;
if (!PyArg_ParseTuple(args, "sO:setSource", &id, &obj))
return NULL;
if (self->m_image != NULL)
@@ -593,7 +593,7 @@ PyObject * Image_setSource (PyImage * self, PyObject * args)
// get pixel filter object
-PyObject * Image_getFilter (PyImage * self, void * closure)
+PyObject *Image_getFilter (PyImage *self, void *closure)
{
// if image object is available
if (self->m_image != NULL)
@@ -614,7 +614,7 @@ PyObject * Image_getFilter (PyImage * self, void * closure)
// set pixel filter object
-int Image_setFilter (PyImage * self, PyObject * value, void * closure)
+int Image_setFilter (PyImage *self, PyObject *value, void *closure)
{
// if image object is available
if (self->m_image != NULL)
@@ -632,7 +632,7 @@ int Image_setFilter (PyImage * self, PyObject * value, void * closure)
// return success
return 0;
}
-PyObject * Image_valid(PyImage * self, void * closure)
+PyObject *Image_valid(PyImage *self, void *closure)
{
if (self->m_image->isImageAvailable())
{
@@ -674,7 +674,7 @@ static int Image_getbuffer(PyImage *self, Py_buffer *view, int flags)
self->m_image->m_exports++;
return 0;
}
- ret = PyBuffer_FillInfo(view, (PyObject*)self, image, self->m_image->getBuffSize(), 0, flags);
+ ret = PyBuffer_FillInfo(view, (PyObject *)self, image, self->m_image->getBuffSize(), 0, flags);
if (ret >= 0)
self->m_image->m_exports++;
return ret;
@@ -684,7 +684,7 @@ error:
// The bug is fixed in Python SVN 77916, as soon as the python revision used by Blender is
// updated, you can simply return -1 and set the error
static char* buf = (char *)"";
- ret = PyBuffer_FillInfo(view, (PyObject*)self, buf, 0, 0, flags);
+ ret = PyBuffer_FillInfo(view, (PyObject *)self, buf, 0, 0, flags);
if (ret >= 0)
self->m_image->m_exports++;
return ret;
diff --git a/source/gameengine/VideoTexture/ImageBase.h b/source/gameengine/VideoTexture/ImageBase.h
index 6c38b107a4d..bb3f0c19e4b 100644
--- a/source/gameengine/VideoTexture/ImageBase.h
+++ b/source/gameengine/VideoTexture/ImageBase.h
@@ -82,7 +82,7 @@ public:
/// get source object
PyImage * getSource (const char * id);
/// set source object, return true, if source was set
- bool setSource (const char * id, PyImage * source);
+ bool setSource (const char * id, PyImage *source);
/// get pixel filter
PyFilter * getFilter (void) { return m_pyfilter; }
@@ -276,7 +276,7 @@ public:
/// get source object
PyImage * getSource (void) { return m_source; }
/// set source object
- void setSource (PyImage * source);
+ void setSource (PyImage *source);
/// get image from source
unsigned int * getImage (double ts=-1.0);
@@ -312,9 +312,9 @@ extern PyTypeList pyImageTypes;
// functions for python interface
// object initialization
-template <class T> static int Image_init (PyObject * pySelf, PyObject * args, PyObject * kwds)
+template <class T> static int Image_init (PyObject *pySelf, PyObject *args, PyObject *kwds)
{
- PyImage * self = reinterpret_cast<PyImage*>(pySelf);
+ PyImage *self = reinterpret_cast<PyImage*>(pySelf);
// create source object
if (self->m_image != NULL) delete self->m_image;
self->m_image = new T();
@@ -323,37 +323,37 @@ template <class T> static int Image_init (PyObject * pySelf, PyObject * args, Py
}
// object allocation
-PyObject * Image_allocNew (PyTypeObject * type, PyObject * args, PyObject * kwds);
+PyObject *Image_allocNew (PyTypeObject *type, PyObject *args, PyObject *kwds);
// object deallocation
-void Image_dealloc (PyImage * self);
+void Image_dealloc (PyImage *self);
// get image data
-PyObject * Image_getImage (PyImage * self, char * mode);
+PyObject *Image_getImage (PyImage *self, char * mode);
// get image size
-PyObject * Image_getSize (PyImage * self, void * closure);
+PyObject *Image_getSize (PyImage *self, void *closure);
// refresh image - invalidate current content
-PyObject * Image_refresh (PyImage * self);
+PyObject *Image_refresh (PyImage *self);
// get scale
-PyObject * Image_getScale (PyImage * self, void * closure);
+PyObject *Image_getScale (PyImage *self, void *closure);
// set scale
-int Image_setScale (PyImage * self, PyObject * value, void * closure);
+int Image_setScale (PyImage *self, PyObject *value, void *closure);
// get flip
-PyObject * Image_getFlip (PyImage * self, void * closure);
+PyObject *Image_getFlip (PyImage *self, void *closure);
// set flip
-int Image_setFlip (PyImage * self, PyObject * value, void * closure);
+int Image_setFlip (PyImage *self, PyObject *value, void *closure);
// get filter source object
-PyObject * Image_getSource (PyImage * self, PyObject * args);
+PyObject *Image_getSource (PyImage *self, PyObject *args);
// set filter source object
-PyObject * Image_setSource (PyImage * self, PyObject * args);
+PyObject *Image_setSource (PyImage *self, PyObject *args);
// get pixel filter object
-PyObject * Image_getFilter (PyImage * self, void * closure);
+PyObject *Image_getFilter (PyImage *self, void *closure);
// set pixel filter object
-int Image_setFilter (PyImage * self, PyObject * value, void * closure);
+int Image_setFilter (PyImage *self, PyObject *value, void *closure);
// check if a buffer can be extracted
-PyObject * Image_valid(PyImage * self, void * closure);
+PyObject *Image_valid(PyImage *self, void *closure);
// for buffer access to PyImage objects
extern PyBufferProcs imageBufferProcs;
diff --git a/source/gameengine/VideoTexture/ImageBuff.cpp b/source/gameengine/VideoTexture/ImageBuff.cpp
index 17513d20a39..eec0bccbe56 100644
--- a/source/gameengine/VideoTexture/ImageBuff.cpp
+++ b/source/gameengine/VideoTexture/ImageBuff.cpp
@@ -47,7 +47,7 @@ FilterRGB24 defFilter;
// forward declaration;
extern PyTypeObject ImageBuffType;
-static int ImageBuff_init (PyObject * pySelf, PyObject * args, PyObject * kwds)
+static int ImageBuff_init (PyObject *pySelf, PyObject *args, PyObject *kwds)
{
short width = -1;
short height = -1;
@@ -55,7 +55,7 @@ static int ImageBuff_init (PyObject * pySelf, PyObject * args, PyObject * kwds)
PyObject *py_scale = Py_False;
ImageBuff *image;
- PyImage * self = reinterpret_cast<PyImage*>(pySelf);
+ PyImage *self = reinterpret_cast<PyImage*>(pySelf);
// create source object
if (self->m_image != NULL)
delete self->m_image;
@@ -190,7 +190,7 @@ void ImageBuff::plot (ImageBuff* img, short x, short y, short mode)
// cast Image pointer to ImageBuff
-inline ImageBuff * getImageBuff (PyImage * self)
+inline ImageBuff * getImageBuff (PyImage *self)
{ return static_cast<ImageBuff*>(self->m_image); }
@@ -245,7 +245,7 @@ static bool testBGLBuffer(Buffer* buffer, int width, int height, unsigned int pi
// load image
-static PyObject * load (PyImage * self, PyObject * args)
+static PyObject *load(PyImage *self, PyObject *args)
{
// parameters: string image buffer, its size, width, height
Py_buffer buffer;
@@ -306,10 +306,10 @@ static PyObject * load (PyImage * self, PyObject * args)
}
if (PyErr_Occurred())
return NULL;
- Py_RETURN_NONE;
+ Py_RETURN_NONE;
}
-static PyObject * plot (PyImage * self, PyObject * args)
+static PyObject *plot (PyImage *self, PyObject *args)
{
PyImage * other;
Buffer* bglBuffer;
@@ -332,7 +332,7 @@ static PyObject * plot (PyImage * self, PyObject * args)
PyBuffer_Release(&buffer);
if (PyErr_Occurred())
return NULL;
- Py_RETURN_NONE;
+ Py_RETURN_NONE;
}
PyErr_Clear();
// try the other format
@@ -354,7 +354,7 @@ static PyObject * plot (PyImage * self, PyObject * args)
}
if (PyErr_Occurred())
return NULL;
- Py_RETURN_NONE;
+ Py_RETURN_NONE;
}
// methods structure
diff --git a/source/gameengine/VideoTexture/ImageMix.cpp b/source/gameengine/VideoTexture/ImageMix.cpp
index 3907e6c6883..f09454a517b 100644
--- a/source/gameengine/VideoTexture/ImageMix.cpp
+++ b/source/gameengine/VideoTexture/ImageMix.cpp
@@ -101,14 +101,14 @@ void ImageMix::calcImage (unsigned int texId, double ts)
// cast Image pointer to ImageMix
-inline ImageMix * getImageMix (PyImage * self)
+inline ImageMix * getImageMix (PyImage *self)
{ return static_cast<ImageMix*>(self->m_image); }
// python methods
// get source weight
-static PyObject *getWeight (PyImage * self, PyObject * args)
+static PyObject *getWeight (PyImage *self, PyObject *args)
{
// weight
short weight = 0;
diff --git a/source/gameengine/VideoTexture/ImageRender.cpp b/source/gameengine/VideoTexture/ImageRender.cpp
index 6d6cb770afa..2135d0a07eb 100644
--- a/source/gameengine/VideoTexture/ImageRender.cpp
+++ b/source/gameengine/VideoTexture/ImageRender.cpp
@@ -277,7 +277,7 @@ void ImageRender::Render()
// cast Image pointer to ImageRender
-inline ImageRender * getImageRender (PyImage * self)
+inline ImageRender * getImageRender (PyImage *self)
{ return static_cast<ImageRender*>(self->m_image); }
@@ -290,10 +290,10 @@ BlendType<KX_Camera> cameraType ("KX_Camera");
// object initialization
-static int ImageRender_init (PyObject * pySelf, PyObject * args, PyObject * kwds)
+static int ImageRender_init (PyObject *pySelf, PyObject *args, PyObject *kwds)
{
// parameters - scene object
- PyObject * scene;
+ PyObject *scene;
// camera object
PyObject * camera;
// parameter keywords
@@ -317,7 +317,7 @@ static int ImageRender_init (PyObject * pySelf, PyObject * args, PyObject * kwds
if (cameraPtr == NULL) THRWEXCP(CameraInvalid, S_OK);
// get pointer to image structure
- PyImage * self = reinterpret_cast<PyImage*>(pySelf);
+ PyImage *self = reinterpret_cast<PyImage*>(pySelf);
// create source object
if (self->m_image != NULL) delete self->m_image;
self->m_image = new ImageRender(scenePtr, cameraPtr);
@@ -343,7 +343,7 @@ static PyObject *getBackground (PyImage *self, void *closure)
}
// set color
-static int setBackground (PyImage * self, PyObject * value, void * closure)
+static int setBackground (PyImage *self, PyObject *value, void *closure)
{
// check validity of parameter
if (value == NULL || !PySequence_Check(value) || PySequence_Size(value) != 4
@@ -434,14 +434,14 @@ PyTypeObject ImageRenderType =
};
// object initialization
-static int ImageMirror_init (PyObject * pySelf, PyObject * args, PyObject * kwds)
+static int ImageMirror_init (PyObject *pySelf, PyObject *args, PyObject *kwds)
{
// parameters - scene object
- PyObject * scene;
+ PyObject *scene;
// reference object for mirror
- PyObject * observer;
+ PyObject *observer;
// object holding the mirror
- PyObject * mirror;
+ PyObject *mirror;
// material of the mirror
short materialID = 0;
// parameter keywords
@@ -490,7 +490,7 @@ static int ImageMirror_init (PyObject * pySelf, PyObject * args, PyObject * kwds
THRWEXCP(MaterialNotAvail, S_OK);
// get pointer to image structure
- PyImage * self = reinterpret_cast<PyImage*>(pySelf);
+ PyImage *self = reinterpret_cast<PyImage*>(pySelf);
// create source object
if (self->m_image != NULL)
@@ -516,7 +516,7 @@ static PyObject *getClip (PyImage *self, void *closure)
}
// set clip
-static int setClip (PyImage * self, PyObject * value, void * closure)
+static int setClip (PyImage *self, PyObject *value, void *closure)
{
// check validity of parameter
double clip;
diff --git a/source/gameengine/VideoTexture/ImageViewport.cpp b/source/gameengine/VideoTexture/ImageViewport.cpp
index a780fdcc38c..9b503efcf39 100644
--- a/source/gameengine/VideoTexture/ImageViewport.cpp
+++ b/source/gameengine/VideoTexture/ImageViewport.cpp
@@ -165,7 +165,7 @@ void ImageViewport::calcImage (unsigned int texId, double ts)
// cast Image pointer to ImageViewport
-inline ImageViewport * getImageViewport (PyImage * self)
+inline ImageViewport * getImageViewport (PyImage *self)
{ return static_cast<ImageViewport*>(self->m_image); }
@@ -173,14 +173,14 @@ inline ImageViewport * getImageViewport (PyImage * self)
// get whole
-PyObject * ImageViewport_getWhole (PyImage * self, void * closure)
+PyObject *ImageViewport_getWhole (PyImage *self, void *closure)
{
if (self->m_image != NULL && getImageViewport(self)->getWhole()) Py_RETURN_TRUE;
else Py_RETURN_FALSE;
}
// set whole
-int ImageViewport_setWhole (PyImage * self, PyObject * value, void * closure)
+int ImageViewport_setWhole (PyImage *self, PyObject *value, void *closure)
{
// check parameter, report failure
if (value == NULL || !PyBool_Check(value))
@@ -203,14 +203,14 @@ int ImageViewport_setWhole (PyImage * self, PyObject * value, void * closure)
}
// get alpha
-PyObject * ImageViewport_getAlpha (PyImage * self, void * closure)
+PyObject *ImageViewport_getAlpha (PyImage *self, void *closure)
{
if (self->m_image != NULL && getImageViewport(self)->getAlpha()) Py_RETURN_TRUE;
else Py_RETURN_FALSE;
}
// set whole
-int ImageViewport_setAlpha (PyImage * self, PyObject * value, void * closure)
+int ImageViewport_setAlpha (PyImage *self, PyObject *value, void *closure)
{
// check parameter, report failure
if (value == NULL || !PyBool_Check(value))
@@ -226,14 +226,14 @@ int ImageViewport_setAlpha (PyImage * self, PyObject * value, void * closure)
// get position
-static PyObject * ImageViewport_getPosition (PyImage * self, void * closure)
+static PyObject *ImageViewport_getPosition (PyImage *self, void *closure)
{
return Py_BuildValue("(ii)", getImageViewport(self)->getPosition()[0],
getImageViewport(self)->getPosition()[1]);
}
// set position
-static int ImageViewport_setPosition (PyImage * self, PyObject * value, void * closure)
+static int ImageViewport_setPosition (PyImage *self, PyObject *value, void *closure)
{
// check validity of parameter
if (value == NULL || !PySequence_Check(value) || PySequence_Size(value) != 2
@@ -254,14 +254,14 @@ static int ImageViewport_setPosition (PyImage * self, PyObject * value, void * c
}
// get capture size
-PyObject * ImageViewport_getCaptureSize (PyImage * self, void * closure)
+PyObject *ImageViewport_getCaptureSize (PyImage *self, void *closure)
{
return Py_BuildValue("(ii)", getImageViewport(self)->getCaptureSize()[0],
getImageViewport(self)->getCaptureSize()[1]);
}
// set capture size
-int ImageViewport_setCaptureSize (PyImage * self, PyObject * value, void * closure)
+int ImageViewport_setCaptureSize (PyImage *self, PyObject *value, void *closure)
{
// check validity of parameter
if (value == NULL || !PySequence_Check(value) || PySequence_Size(value) != 2
diff --git a/source/gameengine/VideoTexture/ImageViewport.h b/source/gameengine/VideoTexture/ImageViewport.h
index ccc58a41605..198655c6ebf 100644
--- a/source/gameengine/VideoTexture/ImageViewport.h
+++ b/source/gameengine/VideoTexture/ImageViewport.h
@@ -91,12 +91,12 @@ protected:
GLint * getViewportSize (void) { return m_viewport + 2; }
};
-PyObject * ImageViewport_getCaptureSize (PyImage * self, void * closure);
-int ImageViewport_setCaptureSize (PyImage * self, PyObject * value, void * closure);
-PyObject * ImageViewport_getWhole (PyImage * self, void * closure);
-int ImageViewport_setWhole (PyImage * self, PyObject * value, void * closure);
-PyObject * ImageViewport_getAlpha (PyImage * self, void * closure);
-int ImageViewport_setAlpha (PyImage * self, PyObject * value, void * closure);
+PyObject *ImageViewport_getCaptureSize (PyImage *self, void *closure);
+int ImageViewport_setCaptureSize (PyImage *self, PyObject *value, void *closure);
+PyObject *ImageViewport_getWhole (PyImage *self, void *closure);
+int ImageViewport_setWhole (PyImage *self, PyObject *value, void *closure);
+PyObject *ImageViewport_getAlpha (PyImage *self, void *closure);
+int ImageViewport_setAlpha (PyImage *self, PyObject *value, void *closure);
#endif
diff --git a/source/gameengine/VideoTexture/PyTypeList.cpp b/source/gameengine/VideoTexture/PyTypeList.cpp
index ed53e8bd1f1..9fe98544961 100644
--- a/source/gameengine/VideoTexture/PyTypeList.cpp
+++ b/source/gameengine/VideoTexture/PyTypeList.cpp
@@ -41,7 +41,7 @@ PyTypeList::~PyTypeList()
}
/// check, if type is in list
-bool PyTypeList::in (PyTypeObject * type)
+bool PyTypeList::in (PyTypeObject *type)
{
// if list exists
if (m_list.get() != NULL)
@@ -54,7 +54,7 @@ bool PyTypeList::in (PyTypeObject * type)
}
/// add type to list
-void PyTypeList::add (PyTypeObject * type, const char * name)
+void PyTypeList::add (PyTypeObject *type, const char * name)
{
// if list doesn't exist, create it
if (m_list.get() == NULL)
@@ -78,7 +78,7 @@ bool PyTypeList::ready (void)
}
/// register types to module
-void PyTypeList::reg (PyObject * module)
+void PyTypeList::reg(PyObject *module)
{
// if list exists
if (m_list.get() != NULL)
@@ -88,6 +88,6 @@ void PyTypeList::reg (PyObject * module)
// increase ref count
Py_INCREF((*it)->getType());
// add type to module
- PyModule_AddObject(module, (char*)(*it)->getName(), (PyObject*)(*it)->getType());
+ PyModule_AddObject(module, (char*)(*it)->getName(), (PyObject *)(*it)->getType());
}
}
diff --git a/source/gameengine/VideoTexture/PyTypeList.h b/source/gameengine/VideoTexture/PyTypeList.h
index aa1df0ce54b..4872b3c3d5c 100644
--- a/source/gameengine/VideoTexture/PyTypeList.h
+++ b/source/gameengine/VideoTexture/PyTypeList.h
@@ -49,16 +49,16 @@ public:
~PyTypeList();
/// check, if type is in list
- bool in (PyTypeObject * type);
+ bool in (PyTypeObject *type);
/// add type to list
- void add (PyTypeObject * type, const char * name);
+ void add (PyTypeObject *type, const char * name);
/// prepare types
bool ready (void);
/// register types to module
- void reg (PyObject * module);
+ void reg(PyObject *module);
protected:
/// pointer to list of types
@@ -71,21 +71,21 @@ class PyTypeListItem
{
public:
/// constructor adds type into list
- PyTypeListItem (PyTypeObject * type, const char * name)
+ PyTypeListItem (PyTypeObject *type, const char * name)
: m_type(type), m_name(name)
{ }
/// does type match
- PyTypeObject * getType (void) { return m_type; }
+ PyTypeObject *getType (void) { return m_type; }
/// get name of type
const char * getName (void) { return m_name; }
protected:
/// pointer to type object
- PyTypeObject * m_type;
+ PyTypeObject *m_type;
/// name of type
- const char * m_name;
+ const char *m_name;
};
diff --git a/source/gameengine/VideoTexture/Texture.cpp b/source/gameengine/VideoTexture/Texture.cpp
index a189f5f9aaf..f58d17f949c 100644
--- a/source/gameengine/VideoTexture/Texture.cpp
+++ b/source/gameengine/VideoTexture/Texture.cpp
@@ -119,7 +119,7 @@ static KX_LightObject *getLamp(PyObject *obj)
// get material ID
-short getMaterialID(PyObject * obj, const char *name)
+short getMaterialID(PyObject *obj, const char *name)
{
// search for material
for (short matID = 0;; ++matID)
@@ -167,8 +167,8 @@ static PyObject *Texture_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
// forward declaration
-PyObject * Texture_close(Texture * self);
-int Texture_setSource (Texture * self, PyObject * value, void * closure);
+PyObject *Texture_close(Texture * self);
+int Texture_setSource (Texture * self, PyObject *value, void *closure);
// Texture object deallocation
@@ -177,12 +177,12 @@ static void Texture_dealloc(Texture *self)
// release renderer
Py_XDECREF(self->m_source);
// close texture
- PyObject* ret = Texture_close(self);
+ PyObject *ret = Texture_close(self);
Py_DECREF(ret);
// release scaled image buffer
delete [] self->m_scaledImg;
// release object
- Py_TYPE((PyObject *)self)->tp_free((PyObject*)self);
+ Py_TYPE((PyObject *)self)->tp_free((PyObject *)self);
}
@@ -193,7 +193,7 @@ ExpDesc MaterialNotAvailDesc (MaterialNotAvail, "Texture material is not availab
static int Texture_init(Texture *self, PyObject *args, PyObject *kwds)
{
// parameters - game object with video texture
- PyObject * obj = NULL;
+ PyObject *obj = NULL;
// material ID
short matID = 0;
// texture ID
@@ -275,7 +275,7 @@ static int Texture_init(Texture *self, PyObject *args, PyObject *kwds)
// close added texture
-PyObject * Texture_close(Texture * self)
+PyObject *Texture_close(Texture * self)
{
// restore texture
if (self->m_orgSaved)
@@ -301,7 +301,7 @@ PyObject * Texture_close(Texture * self)
static PyObject *Texture_refresh(Texture *self, PyObject *args)
{
// get parameter - refresh source
- PyObject * param;
+ PyObject *param;
double ts = -1.0;
if (!PyArg_ParseTuple(args, "O|d:refresh", &param, &ts) || !PyBool_Check(param))
@@ -435,7 +435,7 @@ static PyObject *Texture_getSource(Texture *self, PyObject *value, void *closure
// set source object
-int Texture_setSource (Texture * self, PyObject * value, void * closure)
+int Texture_setSource (Texture * self, PyObject *value, void *closure)
{
// check new value
if (value == NULL || !pyImageTypes.in(Py_TYPE(value)))
diff --git a/source/gameengine/VideoTexture/Texture.h b/source/gameengine/VideoTexture/Texture.h
index ad5b7b9fb44..cc265725b29 100644
--- a/source/gameengine/VideoTexture/Texture.h
+++ b/source/gameengine/VideoTexture/Texture.h
@@ -78,14 +78,14 @@ struct Texture
extern PyTypeObject TextureType;
// load texture
-void loadTexture (unsigned int texId, unsigned int * texture, short * size,
- bool mipmap = false);
+void loadTexture(unsigned int texId, unsigned int *texture, short *size,
+ bool mipmap = false);
// get material
-RAS_IPolyMaterial * getMaterial (PyObject *obj, short matID);
+RAS_IPolyMaterial *getMaterial(PyObject *obj, short matID);
// get material ID
-short getMaterialID (PyObject * obj, const char *name);
+short getMaterialID(PyObject *obj, const char *name);
// Exceptions
extern ExceptionID MaterialNotAvail;
diff --git a/source/gameengine/VideoTexture/VideoBase.cpp b/source/gameengine/VideoTexture/VideoBase.cpp
index 6662df8d7d1..1eb2e830d37 100644
--- a/source/gameengine/VideoTexture/VideoBase.cpp
+++ b/source/gameengine/VideoTexture/VideoBase.cpp
@@ -116,24 +116,24 @@ void Video_open (VideoBase * self, char * file, short captureID)
// play video
-PyObject * Video_play (PyImage * self)
+PyObject *Video_play(PyImage *self)
{ if (getVideo(self)->play()) Py_RETURN_TRUE; else Py_RETURN_FALSE; }
// pause video
-PyObject * Video_pause (PyImage * self)
+PyObject *Video_pause(PyImage *self)
{ if (getVideo(self)->pause()) Py_RETURN_TRUE; else Py_RETURN_FALSE; }
-PyObject * Video_stop (PyImage * self)
+PyObject *Video_stop(PyImage *self)
{ if (getVideo(self)->stop()) Py_RETURN_TRUE; else Py_RETURN_FALSE; }
// get status
-PyObject * Video_getStatus (PyImage * self, void * closure)
+PyObject *Video_getStatus(PyImage *self, void *closure)
{
return Py_BuildValue("h", getVideo(self)->getStatus());
}
// refresh video
-PyObject * Video_refresh (PyImage * self)
+PyObject *Video_refresh(PyImage *self)
{
getVideo(self)->refresh();
return Video_getStatus(self, NULL);
@@ -141,19 +141,20 @@ PyObject * Video_refresh (PyImage * self)
// get range
-PyObject * Video_getRange (PyImage * self, void * closure)
+PyObject *Video_getRange(PyImage *self, void *closure)
{
return Py_BuildValue("[ff]", getVideo(self)->getRange()[0],
getVideo(self)->getRange()[1]);
}
// set range
-int Video_setRange (PyImage * self, PyObject * value, void * closure)
+int Video_setRange(PyImage *self, PyObject *value, void *closure)
{
// check validity of parameter
- if (value == NULL || !PySequence_Check(value) || PySequence_Size(value) != 2
- || !PyFloat_Check(PySequence_Fast_GET_ITEM(value, 0))
- || !PyFloat_Check(PySequence_Fast_GET_ITEM(value, 1)))
+ if (value == NULL || !PySequence_Check(value) || PySequence_Size(value) != 2 ||
+ /* XXX - this is incorrect if the sequence is not a list/tuple! */
+ !PyFloat_Check(PySequence_Fast_GET_ITEM(value, 0)) ||
+ !PyFloat_Check(PySequence_Fast_GET_ITEM(value, 1)))
{
PyErr_SetString(PyExc_TypeError, "The value must be a sequence of 2 float");
return -1;
@@ -166,11 +167,11 @@ int Video_setRange (PyImage * self, PyObject * value, void * closure)
}
// get repeat
-PyObject * Video_getRepeat (PyImage * self, void * closure)
+PyObject *Video_getRepeat (PyImage *self, void *closure)
{ return Py_BuildValue("h", getVideo(self)->getRepeat()); }
// set repeat
-int Video_setRepeat (PyImage * self, PyObject * value, void * closure)
+int Video_setRepeat(PyImage *self, PyObject *value, void *closure)
{
// check validity of parameter
if (value == NULL || !PyLong_Check(value))
@@ -185,11 +186,11 @@ int Video_setRepeat (PyImage * self, PyObject * value, void * closure)
}
// get frame rate
-PyObject * Video_getFrameRate (PyImage * self, void * closure)
+PyObject *Video_getFrameRate (PyImage *self, void *closure)
{ return Py_BuildValue("f", double(getVideo(self)->getFrameRate())); }
// set frame rate
-int Video_setFrameRate (PyImage * self, PyObject * value, void * closure)
+int Video_setFrameRate(PyImage *self, PyObject *value, void *closure)
{
// check validity of parameter
if (value == NULL || !PyFloat_Check(value))
diff --git a/source/gameengine/VideoTexture/VideoBase.h b/source/gameengine/VideoTexture/VideoBase.h
index e221d876358..4cf913d755d 100644
--- a/source/gameengine/VideoTexture/VideoBase.h
+++ b/source/gameengine/VideoTexture/VideoBase.h
@@ -164,14 +164,14 @@ protected:
// cast Image pointer to Video
-inline VideoBase * getVideo (PyImage * self)
+inline VideoBase *getVideo(PyImage *self)
{ return static_cast<VideoBase*>(self->m_image); }
extern ExceptionID SourceVideoCreation;
// object initialization
-template <class T> void Video_init (PyImage * self)
+template <class T> void Video_init(PyImage *self)
{
// create source video object
if (self->m_image != NULL) delete self->m_image;
@@ -182,18 +182,18 @@ template <class T> void Video_init (PyImage * self)
// video functions
-void Video_open (VideoBase * self, char * file, short captureID);
-PyObject * Video_play (PyImage * self);
-PyObject * Video_pause (PyImage * self);
-PyObject * Video_stop (PyImage * self);
-PyObject * Video_refresh (PyImage * self);
-PyObject * Video_getStatus (PyImage * self, void * closure);
-PyObject * Video_getRange (PyImage * self, void * closure);
-int Video_setRange (PyImage * self, PyObject * value, void * closure);
-PyObject * Video_getRepeat (PyImage * self, void * closure);
-int Video_setRepeat (PyImage * self, PyObject * value, void * closure);
-PyObject * Video_getFrameRate (PyImage * self, void * closure);
-int Video_setFrameRate (PyImage * self, PyObject * value, void * closure);
+void Video_open(VideoBase * self, char * file, short captureID);
+PyObject *Video_play(PyImage *self);
+PyObject *Video_pause(PyImage *self);
+PyObject *Video_stop(PyImage *self);
+PyObject *Video_refresh(PyImage *self);
+PyObject *Video_getStatus(PyImage *self, void *closure);
+PyObject *Video_getRange(PyImage *self, void *closure);
+int Video_setRange(PyImage *self, PyObject *value, void *closure);
+PyObject *Video_getRepeat(PyImage *self, void *closure);
+int Video_setRepeat(PyImage *self, PyObject *value, void *closure);
+PyObject *Video_getFrameRate(PyImage *self, void *closure);
+int Video_setFrameRate(PyImage *self, PyObject *value, void *closure);
#endif
diff --git a/source/gameengine/VideoTexture/VideoFFmpeg.cpp b/source/gameengine/VideoTexture/VideoFFmpeg.cpp
index f1c92f2feb3..cf65362c31d 100644
--- a/source/gameengine/VideoTexture/VideoFFmpeg.cpp
+++ b/source/gameengine/VideoTexture/VideoFFmpeg.cpp
@@ -524,7 +524,7 @@ void VideoFFmpeg::openFile (char * filename)
if (m_codecCtx->gop_size)
m_preseek = (m_codecCtx->gop_size < 25) ? m_codecCtx->gop_size+1 : 25;
- else if (m_codecCtx->has_b_frames)
+ else if (m_codecCtx->has_b_frames)
m_preseek = 25; // should determine gopsize
else
m_preseek = 0;
@@ -1076,14 +1076,14 @@ AVFrame *VideoFFmpeg::grabFrame(long position)
// cast Image pointer to VideoFFmpeg
-inline VideoFFmpeg * getVideoFFmpeg (PyImage * self)
+inline VideoFFmpeg * getVideoFFmpeg (PyImage *self)
{ return static_cast<VideoFFmpeg*>(self->m_image); }
// object initialization
-static int VideoFFmpeg_init (PyObject * pySelf, PyObject * args, PyObject * kwds)
+static int VideoFFmpeg_init (PyObject *pySelf, PyObject *args, PyObject *kwds)
{
- PyImage * self = reinterpret_cast<PyImage*>(pySelf);
+ PyImage *self = reinterpret_cast<PyImage*>(pySelf);
// parameters - video source
// file name or format type for capture (only for Linux: video4linux or dv1394)
char * file = NULL;
@@ -1239,9 +1239,9 @@ PyTypeObject VideoFFmpegType =
};
// object initialization
-static int ImageFFmpeg_init (PyObject * pySelf, PyObject * args, PyObject * kwds)
+static int ImageFFmpeg_init (PyObject *pySelf, PyObject *args, PyObject *kwds)
{
- PyImage * self = reinterpret_cast<PyImage*>(pySelf);
+ PyImage *self = reinterpret_cast<PyImage*>(pySelf);
// parameters - video source
// file name or format type for capture (only for Linux: video4linux or dv1394)
char * file = NULL;
diff --git a/source/gameengine/VideoTexture/VideoFFmpeg.h b/source/gameengine/VideoTexture/VideoFFmpeg.h
index e63032e0c66..cd0edfc09ef 100644
--- a/source/gameengine/VideoTexture/VideoFFmpeg.h
+++ b/source/gameengine/VideoTexture/VideoFFmpeg.h
@@ -204,7 +204,7 @@ private:
static void *cacheThread(void *);
};
-inline VideoFFmpeg * getFFmpeg (PyImage * self)
+inline VideoFFmpeg *getFFmpeg(PyImage *self)
{
return static_cast<VideoFFmpeg*>(self->m_image);
}
diff --git a/source/gameengine/VideoTexture/blendVideoTex.cpp b/source/gameengine/VideoTexture/blendVideoTex.cpp
index 7d595832ffd..dd9d83c043f 100644
--- a/source/gameengine/VideoTexture/blendVideoTex.cpp
+++ b/source/gameengine/VideoTexture/blendVideoTex.cpp
@@ -48,10 +48,10 @@ http://www.gnu.org/copyleft/lesser.txt.
// get material id
-static PyObject * getMaterialID (PyObject *self, PyObject *args)
+static PyObject *getMaterialID (PyObject *self, PyObject *args)
{
// parameters - game object with video texture
- PyObject * obj = NULL;
+ PyObject *obj = NULL;
// material name
char * matName;
@@ -72,13 +72,13 @@ static PyObject * getMaterialID (PyObject *self, PyObject *args)
// get last error description
-static PyObject * getLastError (PyObject *self, PyObject *args)
+static PyObject *getLastError (PyObject *self, PyObject *args)
{
return PyUnicode_FromString(Exception::m_lastError.c_str());
}
// set log file
-static PyObject * setLogFile (PyObject *self, PyObject *args)
+static PyObject *setLogFile (PyObject *self, PyObject *args)
{
// get parameters
if (!PyArg_ParseTuple(args, "s:setLogFile", &Exception::m_logFile))
@@ -89,10 +89,10 @@ static PyObject * setLogFile (PyObject *self, PyObject *args)
// image to numpy array
-static PyObject * imageToArray (PyObject * self, PyObject *args)
+static PyObject *imageToArray(PyObject *self, PyObject *args)
{
// parameter is Image object
- PyObject * pyImg;
+ PyObject *pyImg;
char *mode = NULL;
if (!PyArg_ParseTuple(args, "O|s:imageToArray", &pyImg, &mode) || !pyImageTypes.in(Py_TYPE(pyImg)))
{
@@ -172,7 +172,7 @@ static struct PyModuleDef VideoTexture_module_def = {
PyObject *initVideoTexture(void)
{
- PyObject * m;
+ PyObject *m;
// initialize GL extensions
//bgl::InitExtensions(0);
@@ -210,7 +210,7 @@ PyObject *initVideoTexture(void)
pyFilterTypes.reg(m);
Py_INCREF(&TextureType);
- PyModule_AddObject(m, (char*)"Texture", (PyObject*)&TextureType);
+ PyModule_AddObject(m, (char*)"Texture", (PyObject *)&TextureType);
PyModule_AddIntConstant(m, (char*)"SOURCE_ERROR", SourceError);
PyModule_AddIntConstant(m, (char*)"SOURCE_EMPTY", SourceEmpty);
PyModule_AddIntConstant(m, (char*)"SOURCE_READY", SourceReady);