Go to the documentation of this file.
2 #include <QMutexLocker>
14 bool usereadahead, std::chrono::milliseconds
timeout) :
76 LOG(VB_FILE, LOG_INFO,
"calling StopReads()");
78 QMutexLocker locker(&
m_lock);
91 LOG(VB_FILE, LOG_INFO,
"calling StopReads()");
93 QMutexLocker locker(&
m_lock);
102 LOG(VB_FILE, LOG_INFO,
"calling StartReads()");
105 QMutexLocker locker(&
m_lock);
122 QMutexLocker locker(&
m_lock);
130 int request = size - tot;
151 return (ret < 0) ? -1 : tot;
162 QMutexLocker locker(&
m_lock);
170 int request = size - tot;
173 if (received != request)
175 LOG(VB_FILE, LOG_DEBUG,
176 QString(
"WriteBlock(): Read failed. Requested %1 got %2")
177 .arg(request).arg(received));
188 LOG(VB_FILE, LOG_ERR,
189 "WriteBlock(): Read tried too many times, aborting "
190 "(client or network too slow?)");
200 LOG(VB_FILE, LOG_DEBUG,
201 QString(
"WriteBlock(): Write failed. Requested %1 got %2")
202 .arg(received).arg(ret));
212 return (ret < 0) ? -1 : tot;
229 if (whence == SEEK_CUR)
231 long long desired = curpos + pos;
234 pos = desired - realpos;
MythMediaBuffer * m_rbuffer
volatile bool m_readthreadlive
def write(text, progress=True)
QString GetFileName(void)
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
void UpdateInUseMark(bool force=false)
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...
QWaitCondition m_readsUnlockedCond
MythSocket * GetSocket(void)
long long Seek(long long curpos, long long pos, int whence)
void SetReadyReadCallbackEnabled(bool enabled)
bool ReOpen(const QString &newFilename="")
int Read(char *data, int size, std::chrono::milliseconds max_wait)
int RequestBlock(int size)
FileTransfer(QString &filename, MythSocket *remote, MythSocketManager *parent, bool usereadahead, std::chrono::milliseconds timeout)
int Write(const char *data, int size)
Holds information on recordings and videos.
uint64_t GetFileSize(void)
std::vector< char > m_requestBuffer
const QString kFileTransferInUseID
void SetTimeout(bool fast)