odstraneni nekolika gui bugu, pridani librtmp, prepsani parseru na aktualni verzi...
[ctkuk.git] / StreamBuffer.cpp
blobd9d97604e287f22f8641ac168556df0ad3b7bd24
1 #include "StreamBuffer.h"
4 StreamBuffer::StreamBuffer(QObject *parent) : QTemporaryFile(parent)
6 //
10 StreamBuffer::~StreamBuffer()
15 bool
16 StreamBuffer::open()
18 setAutoRemove(false);
19 return QTemporaryFile::open(QIODevice::WriteOnly);
23 qint64 StreamBuffer::appendBuffer(const char *data, qint64 len)
25 qint64 _pos = pos();
28 m_mutex.lock();
29 m_rwLock.lockForRead();
31 seek(size());
33 qint64 _out = write(data, len);
35 flush();
37 seek(_pos);
39 m_rwLock.unlock();
40 m_mutex.unlock();
42 return _out;
45 bool StreamBuffer::isSequential () const
47 return true;