summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/msn/webcam/mimicwrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/msn/webcam/mimicwrapper.cpp')
-rw-r--r--kopete/protocols/msn/webcam/mimicwrapper.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/kopete/protocols/msn/webcam/mimicwrapper.cpp b/kopete/protocols/msn/webcam/mimicwrapper.cpp
index f7a43d93..a9d3b131 100644
--- a/kopete/protocols/msn/webcam/mimicwrapper.cpp
+++ b/kopete/protocols/msn/webcam/mimicwrapper.cpp
@@ -18,7 +18,7 @@
//#include <qbytearray.h>
#include <kdebug.h>
-#include <qimage.h>
+#include <tqimage.h>
MimicWrapper::MimicWrapper() : m_init(false)
{
@@ -31,35 +31,35 @@ MimicWrapper::~MimicWrapper()
}
-QPixmap MimicWrapper::decode(const QByteArray& data)
+TQPixmap MimicWrapper::decode(const TQByteArray& data)
{
if(!m_init)
{
if(!mimic_decoder_init(m_mimctx, (guchar*)(data.data())))
{
kdWarning(14140) << k_funcinfo << "Impossible to init decoder" << endl;
- return QPixmap();
+ return TQPixmap();
}
if (!mimic_get_property( m_mimctx, "buffer_size", &m_bufferSize) )
{
kdWarning(14140) << k_funcinfo << "Impossible to get buffer size" << endl;
- return QPixmap();
+ return TQPixmap();
}
m_init=true;
}
- QByteArray buff(m_bufferSize);
+ TQByteArray buff(m_bufferSize);
if(!mimic_decode_frame(m_mimctx, (guchar*)(data.data()) , (guchar*)(buff.data()) ) )
{
kdWarning(14140) << k_funcinfo << "Impossible to decode frame" << endl;
- return QPixmap();
+ return TQPixmap();
}
int width,height;
mimic_get_property(m_mimctx, "width", &width);
mimic_get_property(m_mimctx, "height", &height);
- QByteArray buff2(m_bufferSize*4/3);
+ TQByteArray buff2(m_bufferSize*4/3);
uint b2=0;
for(uint f=0;f<m_bufferSize;f+=3)
{
@@ -70,34 +70,34 @@ QPixmap MimicWrapper::decode(const QByteArray& data)
b2+=4;
}
- QImage img( (uchar*)(buff2.data()) , width , height , 32 , 0L , 0, QImage::BigEndian );
- return QPixmap(img);
+ TQImage img( (uchar*)(buff2.data()) , width , height , 32 , 0L , 0, TQImage::BigEndian );
+ return TQPixmap(img);
}
-QByteArray MimicWrapper::encode(const QByteArray& data)
+TQByteArray MimicWrapper::encode(const TQByteArray& data)
{
if(!m_init)
{
if(!mimic_encoder_init(m_mimctx, MIMIC_RES_HIGH))
{
kdWarning(14140) << k_funcinfo << "Impossible to init encoder" << endl;
- return QByteArray();
+ return TQByteArray();
}
if (!mimic_get_property( m_mimctx, "buffer_size", &m_bufferSize) )
{
kdWarning(14140) << k_funcinfo << "Impossible to get buffer size" << endl;
- return QByteArray();
+ return TQByteArray();
}
m_init=true;
m_numFrames=0;
}
- QByteArray buff(m_bufferSize);
+ TQByteArray buff(m_bufferSize);
int buff_new_size;
if(!mimic_encode_frame(m_mimctx, (guchar*)(data.data()) , (guchar*)(buff.data()) , (gint*)(&buff_new_size) , m_numFrames%15==0 ) )
{
kdWarning(14140) << k_funcinfo << "Impossible to decode frame" << endl;
- return QByteArray();
+ return TQByteArray();
}
buff.resize(buff_new_size);
++m_numFrames;