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;
FileTransfer(QString &filename, MythSocket *remote, MythSocketManager *parent, bool usereadahead, std::chrono::milliseconds timeout)
long long Seek(long long curpos, long long pos, int whence)
QString GetFileName(void)
MythMediaBuffer * m_rbuffer
bool ReOpen(const QString &newFilename="")
QWaitCondition m_readsUnlockedCond
std::vector< char > m_requestBuffer
uint64_t GetFileSize(void)
void SetTimeout(bool fast)
volatile bool m_readthreadlive
int RequestBlock(int size)
Class for communcating between myth backends and frontends.
int Read(char *data, int size, std::chrono::milliseconds max_wait)
void SetReadyReadCallbackEnabled(bool enabled)
int Write(const char *data, int size)
Holds information on recordings and videos.
void UpdateInUseMark(bool force=false)
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...
MythSocket * GetSocket(void) const
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
def write(text, progress=True)
const QString kFileTransferInUseID