Go to the documentation of this file.
5 #include <QCoreApplication>
20 bool usereadahead, std::chrono::milliseconds
timeout) :
35 m_sock(remote), m_writemode(
write)
86 LOG(VB_FILE, LOG_INFO,
"calling StopReads()");
89 QMutexLocker locker(&
m_lock);
103 LOG(VB_FILE, LOG_INFO,
"calling StopReads()");
106 QMutexLocker locker(&
m_lock);
115 LOG(VB_FILE, LOG_INFO,
"calling StartReads()");
119 QMutexLocker locker(&
m_lock);
136 QMutexLocker locker(&
m_lock);
144 int request = size - tot;
165 return (ret < 0) ? -1 : tot;
176 QMutexLocker locker(&
m_lock);
184 int request = size - tot;
187 if (received != request)
189 LOG(VB_FILE, LOG_DEBUG,
190 QString(
"WriteBlock(): Read failed. Requested %1 got %2")
191 .arg(request).arg(received));
202 LOG(VB_FILE, LOG_ERR,
203 "WriteBlock(): Read tried too many times, aborting "
204 "(client or network too slow?)");
214 LOG(VB_FILE, LOG_DEBUG,
215 QString(
"WriteBlock(): Write failed. Requested %1 got %2")
216 .arg(received).arg(ret));
226 return (ret < 0) ? -1 : tot;
243 if (whence == SEEK_CUR)
245 long long desired = curpos + pos;
248 pos = desired - realpos;
virtual int DecrRef(void)
Decrements reference count and deletes on 0.
def write(text, progress=True)
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
void UpdateInUseMark(bool force=false)
MythMediaBuffer * m_rbuffer
bool ReOpen(const QString &newFilename="")
QString GetFileName(void)
VERBOSE_PREAMBLE Most true
std::vector< char > m_requestBuffer
Class for communcating between myth backends and frontends.
void MarkAsInUse(bool inuse, const QString &usedFor="")
Tracks a recording's in use status, to prevent deletion and to allow the storage scheduler to perform...
void SetTimeout(bool fast)
~BEFileTransfer() override
void SetReadyReadCallbackEnabled(bool enabled)
int Read(char *data, int size, std::chrono::milliseconds max_wait)
int Write(const char *data, int size)
Holds information on recordings and videos.
QWaitCondition m_readsUnlockedCond
long long Seek(long long curpos, long long pos, int whence)
int RequestBlock(int size)
uint64_t GetFileSize(void)
BEFileTransfer(QString &filename, MythSocket *remote, bool usereadahead, std::chrono::milliseconds timeout)
volatile bool m_readthreadlive
const QString kFileTransferInUseID
General purpose reference counter.