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.h2
-rw-r--r--source/gameengine/VideoTexture/DeckLink.cpp14
-rw-r--r--source/gameengine/VideoTexture/Exception.h4
-rw-r--r--source/gameengine/VideoTexture/FilterBlueScreen.cpp4
-rw-r--r--source/gameengine/VideoTexture/FilterBlueScreen.h2
-rw-r--r--source/gameengine/VideoTexture/FilterColor.cpp14
-rw-r--r--source/gameengine/VideoTexture/FilterColor.h2
-rw-r--r--source/gameengine/VideoTexture/FilterNormal.cpp4
-rw-r--r--source/gameengine/VideoTexture/FilterSource.cpp6
-rw-r--r--source/gameengine/VideoTexture/FilterSource.h10
-rw-r--r--source/gameengine/VideoTexture/ImageBase.cpp8
-rw-r--r--source/gameengine/VideoTexture/ImageBase.h4
-rw-r--r--source/gameengine/VideoTexture/ImageBuff.cpp12
-rw-r--r--source/gameengine/VideoTexture/ImageMix.cpp2
-rw-r--r--source/gameengine/VideoTexture/ImageRender.cpp16
-rw-r--r--source/gameengine/VideoTexture/ImageViewport.cpp6
-rw-r--r--source/gameengine/VideoTexture/PyTypeList.cpp2
-rw-r--r--source/gameengine/VideoTexture/Texture.cpp12
-rw-r--r--source/gameengine/VideoTexture/VideoBase.cpp4
-rw-r--r--source/gameengine/VideoTexture/VideoDeckLink.cpp16
-rw-r--r--source/gameengine/VideoTexture/VideoDeckLink.h2
-rw-r--r--source/gameengine/VideoTexture/VideoFFmpeg.cpp128
-rw-r--r--source/gameengine/VideoTexture/VideoFFmpeg.h6
-rw-r--r--source/gameengine/VideoTexture/blendVideoTex.cpp10
24 files changed, 145 insertions, 145 deletions
diff --git a/source/gameengine/VideoTexture/BlendType.h b/source/gameengine/VideoTexture/BlendType.h
index 561c6e8768f..2b2d62aa1a0 100644
--- a/source/gameengine/VideoTexture/BlendType.h
+++ b/source/gameengine/VideoTexture/BlendType.h
@@ -43,7 +43,7 @@ public:
/// check blender type and return pointer to contained object or NULL (if type is not valid)
PyObj *checkType(PyObject *obj)
{
- // if pointer to type isn't set
+ // if pointer to type isn't set
if (m_objType == NULL)
{
// compare names of type
diff --git a/source/gameengine/VideoTexture/DeckLink.cpp b/source/gameengine/VideoTexture/DeckLink.cpp
index fa8ab8c641c..4d25eb8bbd0 100644
--- a/source/gameengine/VideoTexture/DeckLink.cpp
+++ b/source/gameengine/VideoTexture/DeckLink.cpp
@@ -203,7 +203,7 @@ public:
virtual HRESULT STDMETHODCALLTYPE GetBytes(void **buffer) { return mpLeftEye->GetBytes(buffer); }
virtual HRESULT STDMETHODCALLTYPE GetTimecode(BMDTimecodeFormat format,IDeckLinkTimecode **timecode)
{ return mpLeftEye->GetTimecode(format, timecode); }
- virtual HRESULT STDMETHODCALLTYPE GetAncillaryData(IDeckLinkVideoFrameAncillary **ancillary)
+ virtual HRESULT STDMETHODCALLTYPE GetAncillaryData(IDeckLinkVideoFrameAncillary **ancillary)
{ return mpLeftEye->GetAncillaryData(ancillary); }
// IDeckLinkVideoFrame3DExtensions
virtual BMDVideo3DPackingFormat STDMETHODCALLTYPE Get3DPackingFormat(void)
@@ -385,8 +385,8 @@ static int DeckLink_init(DeckLink *self, PyObject *args, PyObject *kwds)
// get parameters
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|hs",
const_cast<char**>(kwlist), &cardIdx, &format))
- return -1;
-
+ return -1;
+
try {
if (format == NULL) {
THRWEXCP(AutoDetectionNotAvail, S_OK);
@@ -488,9 +488,9 @@ static int DeckLink_init(DeckLink *self, PyObject *args, PyObject *kwds)
}
}
catch (Exception & exp)
- {
+ {
printf("DeckLink: exception when opening card %d: %s\n", cardIdx, exp.what());
- exp.report();
+ exp.report();
// normally, the object should be deallocated
return -1;
}
@@ -531,7 +531,7 @@ static PyObject *DeckLink_refresh(DeckLink *self, PyObject *args)
// no use to do it if we are still in the same rendering frame.
// We find this out by looking at the engine current clock time
KX_KetsjiEngine* engine = KX_GetActiveEngine();
- if (engine->GetClockTime() != self->m_lastClock)
+ if (engine->GetClockTime() != self->m_lastClock)
{
self->m_lastClock = engine->GetClockTime();
// set source refresh
@@ -757,7 +757,7 @@ static PyMethodDef decklinkMethods[] =
// class DeckLink attributes
static PyGetSetDef decklinkGetSets[] =
-{
+{
{ (char*)"source", (getter)DeckLink_getSource, (setter)DeckLink_setSource, (char*)"source of decklink (left eye)", NULL},
{ (char*)"right", (getter)DeckLink_getRight, (setter)DeckLink_setRight, (char*)"source of decklink (right eye)", NULL },
{ (char*)"keying", (getter)DeckLink_getKeying, (setter)DeckLink_setKeying, (char*)"whether keying is enabled (frame is alpha-composited with passthrough output)", NULL },
diff --git a/source/gameengine/VideoTexture/Exception.h b/source/gameengine/VideoTexture/Exception.h
index c4de85ff34d..4ca1ad09da4 100644
--- a/source/gameengine/VideoTexture/Exception.h
+++ b/source/gameengine/VideoTexture/Exception.h
@@ -87,7 +87,7 @@ public:
~ExceptionID (void) {}
private:
- // not allowed
+ // not allowed
ExceptionID (const ExceptionID & obj) throw() {}
ExceptionID & operator= (const ExceptionID & obj) throw() { return *this; }
};
@@ -149,7 +149,7 @@ private:
// class Exception
-class Exception : public std::exception
+class Exception : public std::exception
{
public:
// constructor
diff --git a/source/gameengine/VideoTexture/FilterBlueScreen.cpp b/source/gameengine/VideoTexture/FilterBlueScreen.cpp
index a25d09e1eee..169a2494a2a 100644
--- a/source/gameengine/VideoTexture/FilterBlueScreen.cpp
+++ b/source/gameengine/VideoTexture/FilterBlueScreen.cpp
@@ -137,7 +137,7 @@ static int setLimits(PyFilter *self, PyObject *value, void *closure)
// attributes structure
static PyGetSetDef filterBSGetSets[] =
-{
+{
{(char*)"color", (getter)getColor, (setter)setColor, (char*)"blue screen color", NULL},
{(char*)"limits", (getter)getLimits, (setter)setLimits, (char*)"blue screen color limits", NULL},
// attributes from FilterBase class
@@ -147,7 +147,7 @@ static PyGetSetDef filterBSGetSets[] =
// define python type
PyTypeObject FilterBlueScreenType =
-{
+{
PyVarObject_HEAD_INIT(NULL, 0)
"VideoTexture.FilterBlueScreen", /*tp_name*/
sizeof(PyFilter), /*tp_basicsize*/
diff --git a/source/gameengine/VideoTexture/FilterBlueScreen.h b/source/gameengine/VideoTexture/FilterBlueScreen.h
index cf74a6705b7..bdfb6888e79 100644
--- a/source/gameengine/VideoTexture/FilterBlueScreen.h
+++ b/source/gameengine/VideoTexture/FilterBlueScreen.h
@@ -78,7 +78,7 @@ protected:
unsigned int dist = (unsigned int)(difRed * difRed + difGreen * difGreen
+ difBlue * difBlue);
// condition for fully transparent color
- if (m_squareLimits[0] >= dist)
+ if (m_squareLimits[0] >= dist)
// return color with zero alpha
VT_A(val) = 0;
// condition for fully opaque color
diff --git a/source/gameengine/VideoTexture/FilterColor.cpp b/source/gameengine/VideoTexture/FilterColor.cpp
index 15a7e9e4cd1..1547418898a 100644
--- a/source/gameengine/VideoTexture/FilterColor.cpp
+++ b/source/gameengine/VideoTexture/FilterColor.cpp
@@ -47,7 +47,7 @@ static PyGetSetDef filterGrayGetSets[] =
// define python type
PyTypeObject FilterGrayType =
-{
+{
PyVarObject_HEAD_INIT(NULL, 0)
"VideoTexture.FilterGray", /*tp_name*/
sizeof(PyFilter), /*tp_basicsize*/
@@ -97,7 +97,7 @@ FilterColor::FilterColor (void)
// reset color matrix to identity
for (int r = 0; r < 4; ++r)
for (int c = 0; c < 5; ++c)
- m_matrix[r][c] = (r == c) ? 256 : 0;
+ m_matrix[r][c] = (r == c) ? 256 : 0;
}
// set color matrix
@@ -106,7 +106,7 @@ void FilterColor::setMatrix (ColorMatrix & mat)
// copy matrix
for (int r = 0; r < 4; ++r)
for (int c = 0; c < 5; ++c)
- m_matrix[r][c] = mat[r][c];
+ m_matrix[r][c] = mat[r][c];
}
@@ -169,7 +169,7 @@ static int setMatrix(PyFilter *self, PyObject *value, void *closure)
// attributes structure
static PyGetSetDef filterColorGetSets[] =
-{
+{
{(char*)"matrix", (getter)getMatrix, (setter)setMatrix, (char*)"matrix [4][5] for color calculation", NULL},
// attributes from FilterBase class
{(char*)"previous", (getter)Filter_getPrevious, (setter)Filter_setPrevious, (char*)"previous pixel filter", NULL},
@@ -178,7 +178,7 @@ static PyGetSetDef filterColorGetSets[] =
// define python type
PyTypeObject FilterColorType =
-{
+{
PyVarObject_HEAD_INIT(NULL, 0)
"VideoTexture.FilterColor", /*tp_name*/
sizeof(PyFilter), /*tp_basicsize*/
@@ -302,7 +302,7 @@ static int setLevels(PyFilter *self, PyObject *value, void *closure)
// attributes structure
static PyGetSetDef filterLevelGetSets[] =
-{
+{
{(char*)"levels", (getter)getLevels, (setter)setLevels, (char*)"levels matrix [4] (min, max)", NULL},
// attributes from FilterBase class
{(char*)"previous", (getter)Filter_getPrevious, (setter)Filter_setPrevious, (char*)"previous pixel filter", NULL},
@@ -311,7 +311,7 @@ static PyGetSetDef filterLevelGetSets[] =
// define python type
PyTypeObject FilterLevelType =
-{
+{
PyVarObject_HEAD_INIT(NULL, 0)
"VideoTexture.FilterLevel", /*tp_name*/
sizeof(PyFilter), /*tp_basicsize*/
diff --git a/source/gameengine/VideoTexture/FilterColor.h b/source/gameengine/VideoTexture/FilterColor.h
index d042863d7e8..77ce04f71c6 100644
--- a/source/gameengine/VideoTexture/FilterColor.h
+++ b/source/gameengine/VideoTexture/FilterColor.h
@@ -149,7 +149,7 @@ protected:
if (col <= levels[idx][0]) col = 0;
else if (col >= levels[idx][1]) col = 0xFF;
else col = (((col - levels[idx][0]) << 8) / levels[idx][2]) & 0xFF;
- return col;
+ return col;
}
/// filter pixel template, source int buffer
diff --git a/source/gameengine/VideoTexture/FilterNormal.cpp b/source/gameengine/VideoTexture/FilterNormal.cpp
index 3a5333710fd..cfd18094680 100644
--- a/source/gameengine/VideoTexture/FilterNormal.cpp
+++ b/source/gameengine/VideoTexture/FilterNormal.cpp
@@ -120,7 +120,7 @@ static int setDepth(PyFilter *self, PyObject *value, void *closure)
// attributes structure
static PyGetSetDef filterNormalGetSets[] =
-{
+{
{(char*)"colorIdx", (getter)getColor, (setter)setColor, (char*)"index of color used to calculate normal (0 - red, 1 - green, 2 - blue)", NULL},
{(char*)"depth", (getter)getDepth, (setter)setDepth, (char*)"depth of relief", NULL},
// attributes from FilterBase class
@@ -130,7 +130,7 @@ static PyGetSetDef filterNormalGetSets[] =
// define python type
PyTypeObject FilterNormalType =
-{
+{
PyVarObject_HEAD_INIT(NULL, 0)
"VideoTexture.FilterNormal", /*tp_name*/
sizeof(PyFilter), /*tp_basicsize*/
diff --git a/source/gameengine/VideoTexture/FilterSource.cpp b/source/gameengine/VideoTexture/FilterSource.cpp
index c8faa1f9f07..fc14a8ce838 100644
--- a/source/gameengine/VideoTexture/FilterSource.cpp
+++ b/source/gameengine/VideoTexture/FilterSource.cpp
@@ -43,7 +43,7 @@
// define python type
PyTypeObject FilterRGB24Type =
-{
+{
PyVarObject_HEAD_INIT(NULL, 0)
"VideoTexture.FilterRGB24", /*tp_name*/
sizeof(PyFilter), /*tp_basicsize*/
@@ -88,7 +88,7 @@ PyTypeObject FilterRGB24Type =
// define python type
PyTypeObject FilterRGBA32Type =
-{
+{
PyVarObject_HEAD_INIT(NULL, 0)
"VideoTexture.FilterRGBA32", /*tp_name*/
sizeof(PyFilter), /*tp_basicsize*/
@@ -133,7 +133,7 @@ PyTypeObject FilterRGBA32Type =
// define python type
PyTypeObject FilterBGR24Type =
-{
+{
PyVarObject_HEAD_INIT(NULL, 0)
"VideoTexture.FilterBGR24", /*tp_name*/
sizeof(PyFilter), /*tp_basicsize*/
diff --git a/source/gameengine/VideoTexture/FilterSource.h b/source/gameengine/VideoTexture/FilterSource.h
index 820576dfff9..8957ed8b4b3 100644
--- a/source/gameengine/VideoTexture/FilterSource.h
+++ b/source/gameengine/VideoTexture/FilterSource.h
@@ -70,13 +70,13 @@ protected:
/// filter pixel, source byte buffer
virtual unsigned int filter (unsigned char *src, short x, short y,
short * size, unsigned int pixSize, unsigned int val)
- {
- if ((intptr_t(src)&0x3) == 0)
+ {
+ if ((intptr_t(src)&0x3) == 0)
return *(unsigned int*)src;
- else
+ else
{
- VT_RGBA(val,src[0],src[1],src[2],src[3]);
- return val;
+ VT_RGBA(val,src[0],src[1],src[2],src[3]);
+ return val;
}
}
};
diff --git a/source/gameengine/VideoTexture/ImageBase.cpp b/source/gameengine/VideoTexture/ImageBase.cpp
index a547d2a7a85..beea19a4a0b 100644
--- a/source/gameengine/VideoTexture/ImageBase.cpp
+++ b/source/gameengine/VideoTexture/ImageBase.cpp
@@ -190,7 +190,7 @@ bool ImageBase::setSource (const char *id, PyImage *source)
if (newSrc != NULL) m_sources.push_back(newSrc);
}
// otherwise source wasn't set
- else
+ else
return false;
// source was set
return true;
@@ -436,7 +436,7 @@ PyObject *Image_getImage(PyImage *self, char *mode)
try
{
unsigned int * image = self->m_image->getImage();
- if (image)
+ if (image)
{
// build BGL buffer
int dimensions = self->m_image->getBuffSize();
@@ -457,7 +457,7 @@ PyObject *Image_getImage(PyImage *self, char *mode)
dimensions /= sizeof(float);
buffer = BGL_MakeBuffer( GL_FLOAT, 1, &dimensions, image);
}
- else
+ else
{
int i, c, ncolor, pixels;
int offset[4];
@@ -826,7 +826,7 @@ static void Image_releaseBuffer(PyImage *self, Py_buffer *buffer)
self->m_image->m_exports--;
}
-PyBufferProcs imageBufferProcs =
+PyBufferProcs imageBufferProcs =
{
(getbufferproc)Image_getbuffer,
(releasebufferproc)Image_releaseBuffer
diff --git a/source/gameengine/VideoTexture/ImageBase.h b/source/gameengine/VideoTexture/ImageBase.h
index 5a09c9a67b3..fee0779c463 100644
--- a/source/gameengine/VideoTexture/ImageBase.h
+++ b/source/gameengine/VideoTexture/ImageBase.h
@@ -311,7 +311,7 @@ public:
/// get image size
short * getSize (void)
- {
+ {
static short defSize [] = {0, 0};
return m_source != NULL ? m_source->m_image->getSize() : defSize;
}
@@ -379,7 +379,7 @@ int Image_setZbuff(PyImage *self, PyObject *value, void *closure);
PyObject *Image_getDepth(PyImage *self, void *closure);
// set depth
int Image_setDepth(PyImage *self, PyObject *value, void *closure);
-
+
// get pixel filter object
PyObject *Image_getFilter(PyImage *self, void *closure);
// set pixel filter object
diff --git a/source/gameengine/VideoTexture/ImageBuff.cpp b/source/gameengine/VideoTexture/ImageBuff.cpp
index 77270865b17..eaaaffde7e7 100644
--- a/source/gameengine/VideoTexture/ImageBuff.cpp
+++ b/source/gameengine/VideoTexture/ImageBuff.cpp
@@ -61,12 +61,12 @@ static int ImageBuff_init(PyObject *pySelf, PyObject *args, PyObject *kwds)
PyImage *self = reinterpret_cast<PyImage*>(pySelf);
// create source object
- if (self->m_image != NULL)
+ if (self->m_image != NULL)
delete self->m_image;
image = new ImageBuff();
self->m_image = image;
- if (PyArg_ParseTuple(args, "hh|bO!:ImageBuff", &width, &height, &color, &PyBool_Type, &py_scale))
+ if (PyArg_ParseTuple(args, "hh|bO!:ImageBuff", &width, &height, &color, &PyBool_Type, &py_scale))
{
// initialize image buffer
image->setScale(py_scale == Py_True);
@@ -206,12 +206,12 @@ static bool testPyBuffer(Py_buffer *buffer, int width, int height, unsigned int
{
PyErr_SetString(PyExc_ValueError, "Buffer must be an array of bytes");
return false;
- }
+ }
if (buffer->len != width*height*pixsize)
{
PyErr_SetString(PyExc_ValueError, "Buffer hasn't the correct size");
return false;
- }
+ }
// multi dimension are ok as long as there is no hole in the memory
Py_ssize_t size = buffer->itemsize;
for (int i=buffer->ndim-1; i>=0 ; i--)
@@ -243,7 +243,7 @@ static bool testBGLBuffer(Buffer *buffer, int width, int height, unsigned int pi
{
PyErr_SetString(PyExc_ValueError, "Buffer hasn't the correct size");
return false;
- }
+ }
return true;
}
@@ -296,7 +296,7 @@ static PyObject *load(PyImage *self, PyObject *args)
// check if buffer size is correct
if (testPyBuffer(&buffer, width, height, pixSize))
{
- try
+ try
{
// if correct, load image
getImageBuff(self)->load((unsigned char*)buffer.buf, width, height);
diff --git a/source/gameengine/VideoTexture/ImageMix.cpp b/source/gameengine/VideoTexture/ImageMix.cpp
index 2de00f5ba05..95b881f9c2e 100644
--- a/source/gameengine/VideoTexture/ImageMix.cpp
+++ b/source/gameengine/VideoTexture/ImageMix.cpp
@@ -83,7 +83,7 @@ void ImageMix::calcImage(unsigned int texId, double ts)
// set its offset
getImageSourceMix(*it)->setOffset(m_sources[0]->getImageBuf());
// otherwise don't calculate image
- else
+ else
return;
// if there is only single source
if (m_sources.size() == 1)
diff --git a/source/gameengine/VideoTexture/ImageRender.cpp b/source/gameengine/VideoTexture/ImageRender.cpp
index 57062343b67..777a541349c 100644
--- a/source/gameengine/VideoTexture/ImageRender.cpp
+++ b/source/gameengine/VideoTexture/ImageRender.cpp
@@ -314,7 +314,7 @@ bool ImageRender::Render()
shift_y,
aspect_ratio,
frustum);
-
+
projmat = m_rasterizer->GetFrustumMatrix(
frustum.x1, frustum.x2, frustum.y1, frustum.y2, frustum.camnear, frustum.camfar);
}
@@ -323,7 +323,7 @@ bool ImageRender::Render()
MT_Transform camtrans(m_camera->GetWorldToCamera());
MT_Matrix4x4 viewmat(camtrans);
-
+
m_rasterizer->SetViewMatrix(viewmat, m_camera->NodeGetWorldOrientation(), m_camera->NodeGetWorldPosition(), m_camera->NodeGetLocalScaling(), m_camera->GetCameraData()->m_perspective);
m_camera->SetModelviewMatrix(viewmat);
// restore the stereo mode now that the matrix is computed
@@ -545,7 +545,7 @@ static PyMethodDef imageRenderMethods[] =
};
// attributes structure
static PyGetSetDef imageRenderGetSets[] =
-{
+{
{(char*)"background", (getter)getBackground, (setter)setBackground, (char*)"background color", NULL},
// attribute from ImageViewport
{(char*)"capsize", (getter)ImageViewport_getCaptureSize, (setter)ImageViewport_setCaptureSize, (char*)"size of render area", NULL},
@@ -631,10 +631,10 @@ static int ImageMirror_init(PyObject *pySelf, PyObject *args, PyObject *kwds)
scenePtr = static_cast<KX_Scene*>BGE_PROXY_REF(scene);
else
THRWEXCP(SceneInvalid, S_OK);
-
+
if (scenePtr==NULL) /* in case the python proxy reference is invalid */
THRWEXCP(SceneInvalid, S_OK);
-
+
// get observer pointer
KX_GameObject * observerPtr (NULL);
if (observer != NULL && PyObject_TypeCheck(observer, &KX_GameObject::Type))
@@ -643,7 +643,7 @@ static int ImageMirror_init(PyObject *pySelf, PyObject *args, PyObject *kwds)
observerPtr = static_cast<KX_Camera*>BGE_PROXY_REF(observer);
else
THRWEXCP(ObserverInvalid, S_OK);
-
+
if (observerPtr==NULL) /* in case the python proxy reference is invalid */
THRWEXCP(ObserverInvalid, S_OK);
@@ -653,7 +653,7 @@ static int ImageMirror_init(PyObject *pySelf, PyObject *args, PyObject *kwds)
mirrorPtr = static_cast<KX_GameObject*>BGE_PROXY_REF(mirror);
else
THRWEXCP(MirrorInvalid, S_OK);
-
+
if (mirrorPtr==NULL) /* in case the python proxy reference is invalid */
THRWEXCP(MirrorInvalid, S_OK);
@@ -706,7 +706,7 @@ static int setClip(PyImage *self, PyObject *value, void *closure)
// attributes structure
static PyGetSetDef imageMirrorGetSets[] =
-{
+{
{(char*)"clip", (getter)getClip, (setter)setClip, (char*)"clipping distance", NULL},
// attribute from ImageRender
{(char*)"background", (getter)getBackground, (setter)setBackground, (char*)"background color", NULL},
diff --git a/source/gameengine/VideoTexture/ImageViewport.cpp b/source/gameengine/VideoTexture/ImageViewport.cpp
index ad3d8875e28..573a94b73a7 100644
--- a/source/gameengine/VideoTexture/ImageViewport.cpp
+++ b/source/gameengine/VideoTexture/ImageViewport.cpp
@@ -61,7 +61,7 @@ ImageViewport::ImageViewport (PyRASOffScreen *offscreen) : m_alpha(false), m_tex
m_viewport[2] = rect.GetWidth();
m_viewport[3] = rect.GetHeight();
}
-
+
//glGetIntegerv(GL_VIEWPORT, m_viewport);
// create buffer for viewport image
// Warning: this buffer is also used to get the depth buffer as an array of
@@ -102,7 +102,7 @@ void ImageViewport::setWhole (bool whole)
void ImageViewport::setCaptureSize (short size[2])
{
m_whole = false;
- if (size == NULL)
+ if (size == NULL)
size = m_capSize;
for (int idx = 0; idx < 2; ++idx)
{
@@ -406,7 +406,7 @@ static PyMethodDef imageViewportMethods[] =
};
// attributes structure
static PyGetSetDef imageViewportGetSets[] =
-{
+{
{(char*)"whole", (getter)ImageViewport_getWhole, (setter)ImageViewport_setWhole, (char*)"use whole viewport to capture", NULL},
{(char*)"position", (getter)ImageViewport_getPosition, (setter)ImageViewport_setPosition, (char*)"upper left corner of captured area", NULL},
{(char*)"capsize", (getter)ImageViewport_getCaptureSize, (setter)ImageViewport_setCaptureSize, (char*)"size of viewport area being captured", NULL},
diff --git a/source/gameengine/VideoTexture/PyTypeList.cpp b/source/gameengine/VideoTexture/PyTypeList.cpp
index 18f477f6178..477fc5fd59c 100644
--- a/source/gameengine/VideoTexture/PyTypeList.cpp
+++ b/source/gameengine/VideoTexture/PyTypeList.cpp
@@ -61,7 +61,7 @@ bool PyTypeList::in (PyTypeObject *type)
void PyTypeList::add (PyTypeObject *type, const char *name)
{
// if list doesn't exist, create it
- if (m_list.get() == NULL)
+ if (m_list.get() == NULL)
m_list.reset(new PyTypeListType());
if (!in(type))
// add new item to list
diff --git a/source/gameengine/VideoTexture/Texture.cpp b/source/gameengine/VideoTexture/Texture.cpp
index 48dc4c705bf..41b19cdf8b5 100644
--- a/source/gameengine/VideoTexture/Texture.cpp
+++ b/source/gameengine/VideoTexture/Texture.cpp
@@ -94,7 +94,7 @@ void loadTexture(unsigned int texId, unsigned int *texture, short *size,
glTexImage2D(GL_TEXTURE_2D, i, GL_RGBA, mip->x, mip->y, 0, GL_RGBA, GL_UNSIGNED_BYTE, mip->rect);
}
IMB_freeImBuf(ibuf);
- }
+ }
else
{
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
@@ -147,7 +147,7 @@ short getMaterialID(PyObject *obj, const char *name)
// get material
RAS_IPolyMaterial * mat = getMaterial(obj, matID);
// if material is not available, report that no material was found
- if (mat == NULL)
+ if (mat == NULL)
break;
// name is a material name if it starts with MA and a UV texture name if it starts with IM
if (name[0] == 'I' && name[1] == 'M') {
@@ -227,7 +227,7 @@ static int Texture_init(Texture *self, PyObject *args, PyObject *kwds)
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|hhO!",
const_cast<char**>(kwlist), &obj, &matID, &texID, &TextureType,
&texObj))
- return -1;
+ return -1;
// if parameters are available
if (obj != NULL)
@@ -241,7 +241,7 @@ static int Texture_init(Texture *self, PyObject *args, PyObject *kwds)
if (mat != NULL)
{
// is it blender material or polygon material
- if (mat->GetFlag() & RAS_BLENDERGLSL)
+ if (mat->GetFlag() & RAS_BLENDERGLSL)
{
self->m_imgTexture = static_cast<KX_BlenderMaterial*>(mat)->getImage(texID);
self->m_useMatTexture = false;
@@ -331,7 +331,7 @@ static PyObject *Texture_refresh(Texture *self, PyObject *args)
// no use to do it if we are still in the same rendering frame.
// We find this out by looking at the engine current clock time
KX_KetsjiEngine* engine = KX_GetActiveEngine();
- if (engine->GetClockTime() != self->m_lastClock)
+ if (engine->GetClockTime() != self->m_lastClock)
{
self->m_lastClock = engine->GetClockTime();
// set source refresh
@@ -481,7 +481,7 @@ static PyMethodDef textureMethods[] =
// class Texture attributes
static PyGetSetDef textureGetSets[] =
-{
+{
{(char*)"source", (getter)Texture_getSource, (setter)Texture_setSource, (char*)"source of texture", NULL},
{(char*)"mipmap", (getter)Texture_getMipmap, (setter)Texture_setMipmap, (char*)"mipmap texture", NULL},
{(char*)"bindId", (getter)Texture_getBindId, NULL, (char*)"OpenGL Bind Name", NULL},
diff --git a/source/gameengine/VideoTexture/VideoBase.cpp b/source/gameengine/VideoTexture/VideoBase.cpp
index d373055b5df..38d5a12c77f 100644
--- a/source/gameengine/VideoTexture/VideoBase.cpp
+++ b/source/gameengine/VideoTexture/VideoBase.cpp
@@ -112,9 +112,9 @@ void Video_open(VideoBase *self, char *file, short captureID)
if (file == NULL) THRWEXCP(SourceVideoEmpty, S_OK);
// open video file or capture device
- if (captureID >= 0)
+ if (captureID >= 0)
self->openCam(file, captureID);
- else
+ else
self->openFile(file);
}
diff --git a/source/gameengine/VideoTexture/VideoDeckLink.cpp b/source/gameengine/VideoTexture/VideoDeckLink.cpp
index c588a4b33cf..f62df790d34 100644
--- a/source/gameengine/VideoTexture/VideoDeckLink.cpp
+++ b/source/gameengine/VideoTexture/VideoDeckLink.cpp
@@ -428,7 +428,7 @@ mBufferCacheSize(cacheSize)
// do it once
if (!mGPUDirectInitialized) {
#ifdef WIN32
- // In windows, AMD_pinned_memory option is not available,
+ // In windows, AMD_pinned_memory option is not available,
// we must use special DVP API only available for Quadro cards
const char* renderer = (const char *)glGetString(GL_RENDERER);
mHasDvp = (strstr(renderer, "Quadro") != NULL);
@@ -722,7 +722,7 @@ VideoDeckLink::~VideoDeckLink ()
}
mDLInput = NULL;
}
-
+
if (mpAllocator)
{
// if the device was properly cleared, this should be 0
@@ -768,7 +768,7 @@ void VideoDeckLink::openCam (char *format, short camIdx)
BMDTimeValue frameDuration;
BMDTimeScale frameTimescale;
IDeckLink* pDL;
- uint32_t displayFlags, inputFlags;
+ uint32_t displayFlags, inputFlags;
char *pPixel, *p3D, *pEnd, *pSize;
size_t len;
int i, modeIdx, cacheSize;
@@ -845,7 +845,7 @@ void VideoDeckLink::openCam (char *format, short camIdx)
if (!mDLInput)
THRWEXCP(VideoDeckLinkOpenCard, S_OK);
-
+
// check if display mode and pixel format are supported
if (mDLInput->GetDisplayModeIterator(&pDLDisplayModeIterator) != S_OK)
THRWEXCP(DeckLinkInternalError, S_OK);
@@ -966,7 +966,7 @@ void VideoDeckLink::openCam (char *format, short camIdx)
if (mDLInput->EnableVideoInput(mDisplayMode, mPixelFormat, ((mUse3D) ? bmdVideoInputDualStream3D : bmdVideoInputFlagDefault)) != S_OK)
// this shouldn't failed, we tested above
- THRWEXCP(DeckLinkInternalError, S_OK);
+ THRWEXCP(DeckLinkInternalError, S_OK);
// just in case it is needed to capture from certain cards, we don't check error because we don't need audio
mDLInput->EnableAudioInput(bmdAudioSampleRate48kHz, bmdAudioSampleType16bitInteger, 2);
@@ -1085,7 +1085,7 @@ void VideoDeckLink::calcImage (unsigned int texId, double ts)
mpAllocator->TransferBuffer(videoPixels, &mTextureDesc, texId);
}
}
- }
+ }
catch (Exception &) {
pFrame->Release();
throw;
@@ -1134,7 +1134,7 @@ static int VideoDeckLink_init(PyObject *pySelf, PyObject *args, PyObject *kwds)
// get parameters
if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|h",
const_cast<char**>(kwlist), &format, &capt))
- return -1;
+ return -1;
try {
// create video object
@@ -1177,7 +1177,7 @@ static PyGetSetDef videoGetSets[] =
// python type declaration
PyTypeObject VideoDeckLinkType =
-{
+{
PyVarObject_HEAD_INIT(NULL, 0)
"VideoTexture.VideoDeckLink", /*tp_name*/
sizeof(PyImage), /*tp_basicsize*/
diff --git a/source/gameengine/VideoTexture/VideoDeckLink.h b/source/gameengine/VideoTexture/VideoDeckLink.h
index d5419176691..c0e7a95b1f8 100644
--- a/source/gameengine/VideoTexture/VideoDeckLink.h
+++ b/source/gameengine/VideoTexture/VideoDeckLink.h
@@ -216,7 +216,7 @@ private:
HRESULT _ReleaseBuffer(void* buffer);
uint32_t mRefCount;
- // protect the cache and the allocated map,
+ // protect the cache and the allocated map,
// not the pinnedBuffer map as it is only used from main thread
pthread_mutex_t mMutex;
std::map<void*, uint32_t> mAllocatedSize;
diff --git a/source/gameengine/VideoTexture/VideoFFmpeg.cpp b/source/gameengine/VideoTexture/VideoFFmpeg.cpp
index 11ec97ca5f8..defc64d7558 100644
--- a/source/gameengine/VideoTexture/VideoFFmpeg.cpp
+++ b/source/gameengine/VideoTexture/VideoFFmpeg.cpp
@@ -60,11 +60,11 @@ const double defFrameRate = 25.0;
// class RenderVideo
// constructor
-VideoFFmpeg::VideoFFmpeg (HRESULT * hRslt) : VideoBase(),
-m_codec(NULL), m_formatCtx(NULL), m_codecCtx(NULL),
+VideoFFmpeg::VideoFFmpeg (HRESULT * hRslt) : VideoBase(),
+m_codec(NULL), m_formatCtx(NULL), m_codecCtx(NULL),
m_frame(NULL), m_frameDeinterlaced(NULL), m_frameRGB(NULL), m_imgConvertCtx(NULL),
m_deinterlace(false), m_preseek(0), m_videoStream(-1), m_baseFrameRate(25.0),
-m_lastFrame(-1), m_eof(false), m_externTime(false), m_curPosition(-1), m_startTime(0),
+m_lastFrame(-1), m_eof(false), m_externTime(false), m_curPosition(-1), m_startTime(0),
m_captWidth(0), m_captHeight(0), m_captRate(0.f), m_isImage(false),
m_isThreaded(false), m_isStreaming(false), m_stopThread(false), m_cacheStarted(false)
{
@@ -83,7 +83,7 @@ m_isThreaded(false), m_isStreaming(false), m_stopThread(false), m_cacheStarted(f
}
// destructor
-VideoFFmpeg::~VideoFFmpeg ()
+VideoFFmpeg::~VideoFFmpeg ()
{
}
@@ -144,15 +144,15 @@ AVFrame *VideoFFmpeg::allocFrameRGB()
frame = av_frame_alloc();
if (m_format == RGBA32)
{
- avpicture_fill((AVPicture*)frame,
+ avpicture_fill((AVPicture*)frame,
(uint8_t*)MEM_callocN(avpicture_get_size(
AV_PIX_FMT_RGBA,
m_codecCtx->width, m_codecCtx->height),
"ffmpeg rgba"),
AV_PIX_FMT_RGBA, m_codecCtx->width, m_codecCtx->height);
- } else
+ } else
{
- avpicture_fill((AVPicture*)frame,
+ avpicture_fill((AVPicture*)frame,
(uint8_t*)MEM_callocN(avpicture_get_size(
AV_PIX_FMT_RGB24,
m_codecCtx->width, m_codecCtx->height),
@@ -193,7 +193,7 @@ int VideoFFmpeg::openStream(const char *filename, AVInputFormat *inputFormat, AV
for (i=0; i<formatCtx->nb_streams; i++)
{
if (formatCtx->streams[i] &&
- get_codec_from_stream(formatCtx->streams[i]) &&
+ get_codec_from_stream(formatCtx->streams[i]) &&
(get_codec_from_stream(formatCtx->streams[i])->codec_type==AVMEDIA_TYPE_VIDEO))
{
videoStream=i;
@@ -201,7 +201,7 @@ int VideoFFmpeg::openStream(const char *filename, AVInputFormat *inputFormat, AV
}
}
- if (videoStream==-1)
+ if (videoStream==-1)
{
avformat_close_input(&formatCtx);
return -1;
@@ -211,7 +211,7 @@ int VideoFFmpeg::openStream(const char *filename, AVInputFormat *inputFormat, AV
/* Find the decoder for the video stream */
codec=avcodec_find_decoder(codecCtx->codec_id);
- if (codec==NULL)
+ if (codec==NULL)
{
avformat_close_input(&formatCtx);
return -1;
@@ -230,7 +230,7 @@ int VideoFFmpeg::openStream(const char *filename, AVInputFormat *inputFormat, AV
#else
m_baseFrameRate = av_q2d(av_get_r_frame_rate_compat(formatCtx, formatCtx->streams[videoStream]));
#endif
- if (m_baseFrameRate <= 0.0)
+ if (m_baseFrameRate <= 0.0)
m_baseFrameRate = defFrameRate;
m_codec = codec;
@@ -241,18 +241,18 @@ int VideoFFmpeg::openStream(const char *filename, AVInputFormat *inputFormat, AV
m_frameDeinterlaced = av_frame_alloc();
// allocate buffer if deinterlacing is required
- avpicture_fill((AVPicture*)m_frameDeinterlaced,
+ avpicture_fill((AVPicture*)m_frameDeinterlaced,
(uint8_t*)MEM_callocN(avpicture_get_size(
m_codecCtx->pix_fmt,
- m_codecCtx->width, m_codecCtx->height),
- "ffmpeg deinterlace"),
+ m_codecCtx->width, m_codecCtx->height),
+ "ffmpeg deinterlace"),
m_codecCtx->pix_fmt, m_codecCtx->width, m_codecCtx->height);
// check if the pixel format supports Alpha
if (m_codecCtx->pix_fmt == AV_PIX_FMT_RGB32 ||
m_codecCtx->pix_fmt == AV_PIX_FMT_BGR32 ||
m_codecCtx->pix_fmt == AV_PIX_FMT_RGB32_1 ||
- m_codecCtx->pix_fmt == AV_PIX_FMT_BGR32_1)
+ m_codecCtx->pix_fmt == AV_PIX_FMT_BGR32_1)
{
// allocate buffer to store final decoded frame
m_format = RGBA32;
@@ -303,11 +303,11 @@ int VideoFFmpeg::openStream(const char *filename, AVInputFormat *inputFormat, AV
/*
* This thread is used to load video frame asynchronously.
- * It provides a frame caching service.
+ * It provides a frame caching service.
* The main thread is responsible for positioning the frame pointer in the
* file correctly before calling startCache() which starts this thread.
* The cache is organized in two layers: 1) a cache of 20-30 undecoded packets to keep
- * memory and CPU low 2) a cache of 5 decoded frames.
+ * memory and CPU low 2) a cache of 5 decoded frames.
* If the main thread does not find the frame in the cache (because the video has restarted
* or because the GE is lagging), it stops the cache with StopCache() (this is a synchronous
* function: it sends a signal to stop the cache thread and wait for confirmation), then
@@ -333,12 +333,12 @@ void *VideoFFmpeg::cacheThread(void *data)
// In case the stream/file contains other stream than the one we are looking for,
// allow a bit of cycling to get rid quickly of those frames
frameFinished = 0;
- while ( !endOfFile
- && (cachePacket = (CachePacket *)video->m_packetCacheFree.first) != NULL
+ while ( !endOfFile
+ && (cachePacket = (CachePacket *)video->m_packetCacheFree.first) != NULL
&& frameFinished < 25)
{
// free packet => packet cache is not full yet, just read more
- if (av_read_frame(video->m_formatCtx, &cachePacket->packet)>=0)
+ if (av_read_frame(video->m_formatCtx, &cachePacket->packet)>=0)
{
if (cachePacket->packet.stream_index == video->m_videoStream)
{
@@ -353,7 +353,7 @@ void *VideoFFmpeg::cacheThread(void *data)
av_free_packet(&cachePacket->packet);
frameFinished++;
}
-
+
} else {
if (video->m_isFile)
// this mark the end of the file
@@ -363,7 +363,7 @@ void *VideoFFmpeg::cacheThread(void *data)
}
}
// frame cache is also used by main thread, lock
- if (currentFrame == NULL)
+ if (currentFrame == NULL)
{
// no current frame being decoded, take free one
pthread_mutex_lock(&video->m_cacheMutex);
@@ -380,18 +380,18 @@ void *VideoFFmpeg::cacheThread(void *data)
BLI_remlink(&video->m_packetCacheBase, cachePacket);
// use m_frame because when caching, it is not used in main thread
// we can't use currentFrame directly because we need to convert to RGB first
- avcodec_decode_video2(video->m_codecCtx,
- video->m_frame, &frameFinished,
+ avcodec_decode_video2(video->m_codecCtx,
+ video->m_frame, &frameFinished,
&cachePacket->packet);
- if (frameFinished)
+ if (frameFinished)
{
AVFrame * input = video->m_frame;
/* This means the data wasnt read properly, this check stops crashing */
- if ( input->data[0]!=0 || input->data[1]!=0
+ if ( input->data[0]!=0 || input->data[1]!=0
|| input->data[2]!=0 || input->data[3]!=0)
{
- if (video->m_deinterlace)
+ if (video->m_deinterlace)
{
if (avpicture_deinterlace(
(AVPicture*) video->m_frameDeinterlaced,
@@ -422,8 +422,8 @@ void *VideoFFmpeg::cacheThread(void *data)
}
av_free_packet(&cachePacket->packet);
BLI_addtail(&video->m_packetCacheFree, cachePacket);
- }
- if (currentFrame && endOfFile)
+ }
+ if (currentFrame && endOfFile)
{
// no more packet and end of file => put a special frame that indicates that
currentFrame->framePosition = -1;
@@ -462,7 +462,7 @@ bool VideoFFmpeg::startCache()
frame->frame = allocFrameRGB();
BLI_addtail(&m_frameCacheFree, frame);
}
- for (int i=0; i<CACHE_PACKET_SIZE; i++)
+ for (int i=0; i<CACHE_PACKET_SIZE; i++)
{
CachePacket *packet = new CachePacket();
BLI_addtail(&m_packetCacheFree, packet);
@@ -565,7 +565,7 @@ void VideoFFmpeg::openFile (char *filename)
m_formatCtx->flags |= AVFMT_FLAG_NONBLOCK;
}
- if (m_isImage)
+ if (m_isImage)
{
// the file is to be treated as an image, i.e. load the first frame only
m_isFile = false;
@@ -602,7 +602,7 @@ void VideoFFmpeg::openCam (char *file, short camIdx)
return;
sprintf(filename, "%d", camIdx);
#else
- // In Linux we support two types of devices: VideoForLinux and DV1394.
+ // In Linux we support two types of devices: VideoForLinux and DV1394.
// the user specify it with the filename:
// [<device_type>][:<standard>]
// <device_type> : 'v4l' for VideoForLinux, 'dv1394' for DV1394. By default 'v4l'
@@ -618,12 +618,12 @@ void VideoFFmpeg::openCam (char *file, short camIdx)
// v4l:pal
char *p;
- if (file && strstr(file, "1394") != NULL)
+ if (file && strstr(file, "1394") != NULL)
{
// the user specifies a driver, check if it is v4l or d41394
inputFormat = av_find_input_format("dv1394");
sprintf(filename, "/dev/dv1394/%d", camIdx);
- } else
+ } else
{
const char *formats[] = {"video4linux2,v4l2", "video4linux2", "video4linux"};
int i, formatsCount = sizeof(formats) / sizeof(char*);
@@ -637,7 +637,7 @@ void VideoFFmpeg::openCam (char *file, short camIdx)
if (!inputFormat)
// these format should be supported, check ffmpeg compilation
return;
- if (file && strncmp(file, "/dev", 4) == 0)
+ if (file && strncmp(file, "/dev", 4) == 0)
{
// user does not specify a driver
strncpy(filename, file, sizeof(filename));
@@ -774,7 +774,7 @@ void VideoFFmpeg::calcImage (unsigned int texId, double ts)
{
// allow setting timestamp only when not streaming
actTime = ts;
- if (actTime * actFrameRate() < m_lastFrame)
+ if (actTime * actFrameRate() < m_lastFrame)
{
// user is asking to rewind, force a cache clear to make sure we will do a seek
// note that this does not decrement m_repeat if ts didn't reach m_range[1]
@@ -793,7 +793,7 @@ void VideoFFmpeg::calcImage (unsigned int texId, double ts)
// in any case, this resets the cache
stopCache();
// if repeats are set, decrease them
- if (m_repeat > 0)
+ if (m_repeat > 0)
--m_repeat;
// if video has to be replayed
if (m_repeat != 0)
@@ -803,7 +803,7 @@ void VideoFFmpeg::calcImage (unsigned int texId, double ts)
m_startTime += (m_range[1] - m_range[0]) / m_frameRate;
}
// if video has to be stopped, stop it
- else
+ else
{
m_status = SourceStopped;
return;
@@ -818,11 +818,11 @@ void VideoFFmpeg::calcImage (unsigned int texId, double ts)
// get image
if ((frame = grabFrame(actFrame)) != NULL)
{
- if (!m_isFile && !m_cacheStarted)
+ if (!m_isFile && !m_cacheStarted)
{
// streaming without cache: detect synchronization problem
double execTime = PIL_check_seconds_timer() - startTime;
- if (execTime > 0.005)
+ if (execTime > 0.005)
{
// exec time is too long, it means that the function was blocking
// resynchronize the stream from this time
@@ -902,14 +902,14 @@ AVFrame *VideoFFmpeg::grabFrame(long position)
}
return NULL;
}
- if (frame->framePosition == -1)
+ if (frame->framePosition == -1)
{
// this frame mark the end of the file (only used for file)
// leave in cache to make sure we don't miss it
m_eof = true;
return NULL;
}
- // for streaming, always return the next frame,
+ // for streaming, always return the next frame,
// that's what grabFrame does in non cache mode anyway.
if (m_isStreaming || frame->framePosition == position)
{
@@ -917,7 +917,7 @@ AVFrame *VideoFFmpeg::grabFrame(long position)
}
// for cam, skip old frames to keep image realtime.
// There should be no risk of clock drift since it all happens on the same CPU
- if (frame->framePosition > position)
+ if (frame->framePosition > position)
{
// this can happen after rewind if the seek didn't find the first frame
// the frame in the buffer is ahead of time, just leave it there
@@ -941,17 +941,17 @@ AVFrame *VideoFFmpeg::grabFrame(long position)
{
// first check if the position that we are looking for is in the preseek range
// if so, just read the frame until we get there
- if (position > m_curPosition + 1
- && m_preseek
- && position - (m_curPosition + 1) < m_preseek)
+ if (position > m_curPosition + 1
+ && m_preseek
+ && position - (m_curPosition + 1) < m_preseek)
{
while (av_read_frame(m_formatCtx, &packet)>=0)
{
- if (packet.stream_index == m_videoStream)
+ if (packet.stream_index == m_videoStream)
{
avcodec_decode_video2(
- m_codecCtx,
- m_frame, &frameFinished,
+ m_codecCtx,
+ m_frame, &frameFinished,
&packet);
if (frameFinished)
{
@@ -964,8 +964,8 @@ AVFrame *VideoFFmpeg::grabFrame(long position)
}
}
// if the position is not in preseek, do a direct jump
- if (position != m_curPosition + 1)
- {
+ if (position != m_curPosition + 1)
+ {
int64_t pos = (int64_t)((position - m_preseek) / (m_baseFrameRate*timeBase));
if (pos < 0)
@@ -993,10 +993,10 @@ AVFrame *VideoFFmpeg::grabFrame(long position)
else
#endif
{
- // current position is now lost, guess a value.
+ // current position is now lost, guess a value.
if (av_seek_frame(m_formatCtx, m_videoStream, pos, AVSEEK_FLAG_BACKWARD) >= 0)
{
- // current position is now lost, guess a value.
+ // current position is now lost, guess a value.
// It's not important because it will be set at this end of this function
m_curPosition = position - m_preseek - 1;
}
@@ -1022,7 +1022,7 @@ AVFrame *VideoFFmpeg::grabFrame(long position)
// return the next frame. This is not quite correct, may need more work
while (av_read_frame(m_formatCtx, &packet) >= 0)
{
- if (packet.stream_index == m_videoStream)
+ if (packet.stream_index == m_videoStream)
{
AVFrame *input = m_frame;
short counter = 0;
@@ -1035,28 +1035,28 @@ AVFrame *VideoFFmpeg::grabFrame(long position)
// remember dts to compute exact frame number
dts = packet.dts;
- if (frameFinished && !posFound)
+ if (frameFinished && !posFound)
{
if (dts >= targetTs)
{
posFound = 1;
}
- }
+ }
- if (frameFinished && posFound == 1)
+ if (frameFinished && posFound == 1)
{
AVFrame * input = m_frame;
- /* This means the data wasnt read properly,
+ /* This means the data wasnt read properly,
* this check stops crashing */
- if ( input->data[0]==0 && input->data[1]==0
+ if ( input->data[0]==0 && input->data[1]==0
&& input->data[2]==0 && input->data[3]==0)
{
av_free_packet(&packet);
break;
}
- if (m_deinterlace)
+ if (m_deinterlace)
{
if (avpicture_deinterlace(
(AVPicture*) m_frameDeinterlaced,
@@ -1131,7 +1131,7 @@ static int VideoFFmpeg_init(PyObject *pySelf, PyObject *args, PyObject *kwds)
// get parameters
if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|hfhh",
const_cast<char**>(kwlist), &file, &capt, &rate, &width, &height))
- return -1;
+ return -1;
try
{
@@ -1227,7 +1227,7 @@ static PyGetSetDef videoGetSets[] =
// python type declaration
PyTypeObject VideoFFmpegType =
-{
+{
PyVarObject_HEAD_INIT(NULL, 0)
"VideoTexture.VideoFFmpeg", /*tp_name*/
sizeof(PyImage), /*tp_basicsize*/
@@ -1278,7 +1278,7 @@ static int ImageFFmpeg_init(PyObject *pySelf, PyObject *args, PyObject *kwds)
// get parameters
if (!PyArg_ParseTuple(args, "s:ImageFFmpeg", &file))
- return -1;
+ return -1;
try
{
@@ -1346,7 +1346,7 @@ static PyGetSetDef imageGetSets[] =
// python type declaration
PyTypeObject ImageFFmpegType =
-{
+{
PyVarObject_HEAD_INIT(NULL, 0)
"VideoTexture.ImageFFmpeg", /*tp_name*/
sizeof(PyImage), /*tp_basicsize*/
diff --git a/source/gameengine/VideoTexture/VideoFFmpeg.h b/source/gameengine/VideoTexture/VideoFFmpeg.h
index 0a49a0b19bb..63a3dba4778 100644
--- a/source/gameengine/VideoTexture/VideoFFmpeg.h
+++ b/source/gameengine/VideoTexture/VideoFFmpeg.h
@@ -144,7 +144,7 @@ protected:
/// width of capture in pixel
short m_captWidth;
-
+
/// height of capture in pixel
short m_captHeight;
@@ -181,7 +181,7 @@ protected:
/// in case of caching, put the frame back in free queue
void releaseFrame(AVFrame* frame);
- /// start thread to load the video file/capture/stream
+ /// start thread to load the video file/capture/stream
bool startCache();
void stopCache();
@@ -211,7 +211,7 @@ private:
inline VideoFFmpeg *getFFmpeg(PyImage *self)
{
- return static_cast<VideoFFmpeg*>(self->m_image);
+ return static_cast<VideoFFmpeg*>(self->m_image);
}
#endif /* WITH_FFMPEG */
diff --git a/source/gameengine/VideoTexture/blendVideoTex.cpp b/source/gameengine/VideoTexture/blendVideoTex.cpp
index 9b046d46412..037d6648b56 100644
--- a/source/gameengine/VideoTexture/blendVideoTex.cpp
+++ b/source/gameengine/VideoTexture/blendVideoTex.cpp
@@ -187,7 +187,7 @@ static struct PyModuleDef VideoTexture_module_def = {
PyMODINIT_FUNC initVideoTexturePythonBinding(void)
{
PyObject *m;
-
+
// initialize GL extensions
//bgl::InitExtensions(0);
@@ -197,9 +197,9 @@ PyMODINIT_FUNC initVideoTexturePythonBinding(void)
if (!pyImageTypes.ready())
return NULL;
- if (!pyFilterTypes.ready())
+ if (!pyFilterTypes.ready())
return NULL;
- if (PyType_Ready(&TextureType) < 0)
+ if (PyType_Ready(&TextureType) < 0)
return NULL;
#ifdef WITH_GAMEENGINE_DECKLINK
if (PyType_Ready(&DeckLinkType) < 0)
@@ -209,7 +209,7 @@ PyMODINIT_FUNC initVideoTexturePythonBinding(void)
m = PyModule_Create(&VideoTexture_module_def);
PyDict_SetItemString(PySys_GetObject("modules"), VideoTexture_module_def.m_name, m);
- if (m == NULL)
+ if (m == NULL)
return NULL;
// initialize classes
@@ -259,7 +259,7 @@ PyMODINIT_FUNC initVideoTexturePythonBinding(void)
// init last error description
Exception::m_lastError = "";
-
+
return m;
}