26 changes: 11 additions & 15 deletions mythtv/libs/libmythbase/mythsocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ using std::vector;
.arg((a)->GetSocketDescriptor())
#define LOC SLOC(this)

const uint MythSocket::kShortTimeout = kMythSocketShortTimeout;
const uint MythSocket::kLongTimeout = kMythSocketLongTimeout;

const int MythSocket::kSocketReceiveBufferSize = 128 * 1024;

QMutex MythSocket::s_loopbackCacheLock;
Expand Down Expand Up @@ -326,21 +323,21 @@ bool MythSocket::WriteStringList(const QStringList &list)
return ret;
}

bool MythSocket::ReadStringList(QStringList &list, uint timeoutMS)
bool MythSocket::ReadStringList(QStringList &list, std::chrono::milliseconds timeoutMS)
{
bool ret = false;
QMetaObject::invokeMethod(
this, "ReadStringListReal",
(QThread::currentThread() != m_thread->qthread()) ?
Qt::BlockingQueuedConnection : Qt::DirectConnection,
Q_ARG(QStringList*, &list),
Q_ARG(uint, timeoutMS),
Q_ARG(std::chrono::milliseconds, timeoutMS),
Q_ARG(bool*, &ret));
return ret;
}

bool MythSocket::SendReceiveStringList(
QStringList &strlist, uint min_reply_length, uint timeoutMS)
QStringList &strlist, uint min_reply_length, std::chrono::milliseconds timeoutMS)
{
if (m_callback && m_disableReadyReadCallback.testAndSetOrdered(0,0))
{
Expand Down Expand Up @@ -416,7 +413,7 @@ bool MythSocket::ConnectToHost(const QString &host, quint16 port)
return MythSocket::ConnectToHost(hadr, port);
}

bool MythSocket::Validate(uint timeout_ms, bool error_dialog_desired)
bool MythSocket::Validate(std::chrono::milliseconds timeout, bool error_dialog_desired)
{
if (m_isValidated)
return true;
Expand All @@ -427,7 +424,7 @@ bool MythSocket::Validate(uint timeout_ms, bool error_dialog_desired)

WriteStringList(strlist);

if (!ReadStringList(strlist, timeout_ms) || strlist.empty())
if (!ReadStringList(strlist, timeout) || strlist.empty())
{
LOG(VB_GENERAL, LOG_ERR, "Protocol version check failure.\n\t\t\t"
"The response to MYTH_PROTO_VERSION was empty.\n\t\t\t"
Expand Down Expand Up @@ -540,7 +537,7 @@ int MythSocket::Write(const char *data, int size)
return ret;
}

int MythSocket::Read(char *data, int size, int max_wait_ms)
int MythSocket::Read(char *data, int size, std::chrono::milliseconds max_wait)
{
int ret = -1;
QMetaObject::invokeMethod(
Expand All @@ -549,7 +546,7 @@ int MythSocket::Read(char *data, int size, int max_wait_ms)
Qt::BlockingQueuedConnection : Qt::DirectConnection,
Q_ARG(char*, data),
Q_ARG(int, size),
Q_ARG(int, max_wait_ms),
Q_ARG(std::chrono::milliseconds, max_wait),
Q_ARG(int*, &ret));
return ret;
}
Expand Down Expand Up @@ -804,7 +801,7 @@ void MythSocket::WriteStringListReal(const QStringList *list, bool *ret)
}

void MythSocket::ReadStringListReal(
QStringList *list, uint timeoutMS, bool *ret)
QStringList *list, std::chrono::milliseconds timeoutMS, bool *ret)
{
list->clear();
*ret = false;
Expand All @@ -816,10 +813,10 @@ void MythSocket::ReadStringListReal(
while (m_tcpSocket->bytesAvailable() < 8)
{
elapsed = timer.elapsed();
if (elapsed >= std::chrono::milliseconds(timeoutMS))
if (elapsed >= timeoutMS)
{
LOG(VB_GENERAL, LOG_ERR, LOC + "ReadStringList: " +
QString("Error, timed out after %1 ms.").arg(timeoutMS));
QString("Error, timed out after %1 ms.").arg(timeoutMS.count()));
m_tcpSocket->close();
m_dataAvailable.fetchAndStoreOrdered(0);
return;
Expand Down Expand Up @@ -967,9 +964,8 @@ void MythSocket::WriteReal(const char *data, int size, int *ret)
*ret = m_tcpSocket->write(data, size);
}

void MythSocket::ReadReal(char *data, int size, int max_wait, int *ret)
void MythSocket::ReadReal(char *data, int size, std::chrono::milliseconds max_wait_ms, int *ret)
{
auto max_wait_ms = std::chrono::milliseconds(max_wait);
MythTimer t; t.start();
while ((m_tcpSocket->state() == QAbstractSocket::ConnectedState) &&
(m_tcpSocket->bytesAvailable() < size) &&
Expand Down
16 changes: 8 additions & 8 deletions mythtv/libs/libmythbase/mythsocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class MBASE_PUBLIC MythSocket : public QObject, public ReferenceCounter
bool ConnectToHost(const QHostAddress &address, quint16 port);
void DisconnectFromHost(void);

bool Validate(uint timeout_ms = kMythSocketLongTimeout,
bool Validate(std::chrono::milliseconds timeout = kMythSocketLongTimeout,
bool error_dialog_desired = false);
bool IsValidated(void) const { return m_isValidated; }

Expand All @@ -51,9 +51,9 @@ class MBASE_PUBLIC MythSocket : public QObject, public ReferenceCounter

bool SendReceiveStringList(
QStringList &list, uint min_reply_length = 0,
uint timeoutMS = kLongTimeout);
std::chrono::milliseconds timeoutMS = kLongTimeout);

bool ReadStringList(QStringList &list, uint timeoutMS = kShortTimeout);
bool ReadStringList(QStringList &list, std::chrono::milliseconds timeoutMS = kShortTimeout);
bool WriteStringList(const QStringList &list);

bool IsConnected(void) const;
Expand All @@ -65,11 +65,11 @@ class MBASE_PUBLIC MythSocket : public QObject, public ReferenceCounter

// RemoteFile stuff
int Write(const char *data, int size);
int Read(char *data, int size, int max_wait_ms);
int Read(char *data, int size, std::chrono::milliseconds max_wait);
void Reset(void);

static const uint kShortTimeout;
static const uint kLongTimeout;
static constexpr std::chrono::milliseconds kShortTimeout { kMythSocketShortTimeout };
static constexpr std::chrono::milliseconds kLongTimeout { kMythSocketLongTimeout };

signals:
void CallReadyRead(void);
Expand All @@ -82,13 +82,13 @@ class MBASE_PUBLIC MythSocket : public QObject, public ReferenceCounter
void ReadyReadHandler(void);
void CallReadyReadHandler(void);

void ReadStringListReal(QStringList *list, uint timeoutMS, bool *ret);
void ReadStringListReal(QStringList *list, std::chrono::milliseconds timeoutMS, bool *ret);
void WriteStringListReal(const QStringList *list, bool *ret);
void ConnectToHostReal(const QHostAddress& addr, quint16 port, bool *ret);
void DisconnectFromHostReal(void);

void WriteReal(const char *data, int size, int *ret);
void ReadReal(char *data, int size, int max_wait_ms, int *ret);
void ReadReal(char *data, int size, std::chrono::milliseconds max_wait_ms, int *ret);
void ResetReal(void);

void IsDataAvailableReal(bool *ret) const;
Expand Down
6 changes: 4 additions & 2 deletions mythtv/libs/libmythbase/mythsocket_cb.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

#include "mythbaseexp.h"

#define kMythSocketShortTimeout 7000
#define kMythSocketLongTimeout 30000
using namespace std::chrono_literals;

static constexpr std::chrono::milliseconds kMythSocketShortTimeout { 7s };
static constexpr std::chrono::milliseconds kMythSocketLongTimeout { 30s };

class MythSocket;
class MBASE_PUBLIC MythSocketCBs
Expand Down
16 changes: 9 additions & 7 deletions mythtv/libs/libmythbase/mythsystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
#include "mythsystem.h"
#include "exitcodes.h"

using std::chrono::duration_cast;

class MythSystemLegacyWrapper : public MythSystem
{
public:
Expand Down Expand Up @@ -68,7 +70,7 @@ class MythSystemLegacyWrapper : public MythSystem

~MythSystemLegacyWrapper(void) override
{
MythSystemLegacyWrapper::Wait(0);
MythSystemLegacyWrapper::Wait(0ms);
}

uint GetFlags(void) const override // MythSystem
Expand Down Expand Up @@ -100,11 +102,11 @@ class MythSystemLegacyWrapper : public MythSystem
/// think it is running even though it is not.
/// WARNING The legacy timeout is in seconds not milliseconds,
/// timeout will be rounded.
bool Wait(uint timeout_ms) override // MythSystem
bool Wait(std::chrono::milliseconds timeout) override // MythSystem
{
timeout_ms = (timeout_ms >= 1000) ? timeout_ms + 500 :
((timeout_ms == 0) ? 0 : 1000);
uint legacy_wait_ret = m_legacy->Wait(timeout_ms / 1000);
timeout = (timeout >= 1s) ? timeout + 500ms :
((timeout == 0ms) ? 0ms : 1s);
uint legacy_wait_ret = m_legacy->Wait(duration_cast<std::chrono::seconds>(timeout).count());
return GENERIC_EXIT_RUNNING != legacy_wait_ret;
}

Expand Down Expand Up @@ -132,7 +134,7 @@ class MythSystemLegacyWrapper : public MythSystem
if (!(kMSStdOut & m_flags))
return nullptr;

Wait(0); // legacy getbuffer is not thread-safe, so wait
Wait(0ms); // legacy getbuffer is not thread-safe, so wait

if (!m_legacy->GetBuffer(1)->isOpen() &&
!m_legacy->GetBuffer(1)->open(QIODevice::ReadOnly))
Expand All @@ -150,7 +152,7 @@ class MythSystemLegacyWrapper : public MythSystem
if (!(kMSStdErr & m_flags))
return nullptr;

Wait(0); // legacy getbuffer is not thread-safe, so wait
Wait(0ms); // legacy getbuffer is not thread-safe, so wait

if (!m_legacy->GetBuffer(2)->isOpen() &&
!m_legacy->GetBuffer(2)->open(QIODevice::ReadOnly))
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/mythsystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class MBASE_PUBLIC MythSystem
* this will block until the sub-program exits.
* \return true if program has exited and has been collected.
*/
virtual bool Wait(uint timeout_ms = 0) = 0;
virtual bool Wait(std::chrono::milliseconds timeout = 0ms) = 0;

/// Returns the standard input stream for the program
/// if the kMSStdIn flag was passed to the constructor.
Expand Down
5 changes: 2 additions & 3 deletions mythtv/libs/libmythbase/portchecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,8 @@
* of linkLocalOnly, return true if it was link local and
* was changed, false in other cases.
*/
bool PortChecker::checkPort(QString &host, int port, int timeLimitMS, bool linkLocalOnly)
bool PortChecker::checkPort(QString &host, int port, std::chrono::milliseconds timeLimit, bool linkLocalOnly)
{
auto timeLimit = std::chrono::milliseconds(timeLimitMS);
LOG(VB_GENERAL, LOG_DEBUG, LOC + QString("host %1 port %2 timeLimit %3 linkLocalOnly %4")
.arg(host).arg(port).arg(timeLimit.count()).arg(linkLocalOnly));
m_cancelCheck = false;
Expand Down Expand Up @@ -226,7 +225,7 @@ bool PortChecker::checkPort(QString &host, int port, int timeLimitMS, bool linkL
* false in other cases.
*/
// static method
bool PortChecker::resolveLinkLocal(QString &host, int port, int timeLimit)
bool PortChecker::resolveLinkLocal(QString &host, int port, std::chrono::milliseconds timeLimit)
{
PortChecker checker;
return checker.checkPort(host,port,timeLimit,true);
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythbase/portchecker.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ class MBASE_PUBLIC PortChecker : public QObject
public:
PortChecker() = default;
~PortChecker() override = default;
bool checkPort(QString &host, int port, int timeLimit=30000,
bool checkPort(QString &host, int port, std::chrono::milliseconds timeLimit=30s,
bool linkLocalOnly=false);

static bool resolveLinkLocal(QString &host, int port,
int timeLimit=30000);
std::chrono::milliseconds timeLimit=30s);

public slots:
void cancelPortCheck(void);
Expand Down
16 changes: 8 additions & 8 deletions mythtv/libs/libmythbase/remotefile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,16 @@ static bool RemoteSendReceiveStringList(const QString &host, QStringList &strlis
}

RemoteFile::RemoteFile(QString url, bool write, bool usereadahead,
int timeout_ms,
std::chrono::milliseconds timeout,
const QStringList *possibleAuxiliaryFiles) :
m_path(std::move(url)),
m_useReadAhead(usereadahead), m_timeoutMs(timeout_ms),
m_useReadAhead(usereadahead), m_timeoutMs(timeout),
m_writeMode(write)
{
if (m_writeMode)
{
m_useReadAhead = false;
m_timeoutMs = -1;
m_timeoutMs = -1ms;
}
else if (possibleAuxiliaryFiles)
m_possibleAuxFiles = *possibleAuxiliaryFiles;
Expand Down Expand Up @@ -160,7 +160,7 @@ MythSocket *RemoteFile::openSocket(bool control)
QStringList strlist;

#ifndef IGNORE_PROTO_VER_MISMATCH
if (!gCoreContext->CheckProtoVersion(lsock, 5000))
if (!gCoreContext->CheckProtoVersion(lsock, 5s))
{
LOG(VB_GENERAL, LOG_ERR, loc +
QString("Failed validation to server %1:%2").arg(host).arg(port));
Expand All @@ -186,7 +186,7 @@ MythSocket *RemoteFile::openSocket(bool control)
{
strlist.push_back(QString("ANN FileTransfer %1 %2 %3 %4")
.arg(hostname).arg(static_cast<int>(m_writeMode))
.arg(static_cast<int>(m_useReadAhead)).arg(m_timeoutMs));
.arg(static_cast<int>(m_useReadAhead)).arg(m_timeoutMs.count()));
strlist << QString("%1").arg(dir);
strlist << sgroup;

Expand Down Expand Up @@ -989,7 +989,7 @@ int RemoteFile::Read(void *data, int size)

sent = size;

int waitms = 30;
std::chrono::milliseconds waitms { 30ms };
MythTimer mtimer;
mtimer.start();

Expand All @@ -1002,7 +1002,7 @@ int RemoteFile::Read(void *data, int size)
else if (ret < 0)
error = true;

waitms += (waitms < 200) ? 20 : 0;
waitms += (waitms < 200ms) ? 20ms : 0ms;

if (m_controlSock->IsDataAvailable() &&
m_controlSock->ReadStringList(strlist, MythSocket::kShortTimeout) &&
Expand All @@ -1026,7 +1026,7 @@ int RemoteFile::Read(void *data, int size)
{
// Wait up to 1.5s for the backend to send the size
// MythSocket::ReadString will drop the connection
if (m_controlSock->ReadStringList(strlist, 1500) &&
if (m_controlSock->ReadStringList(strlist, 1500ms) &&
!strlist.isEmpty())
{
sent = strlist[0].toInt(); // -1 on backend error
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythbase/remotefile.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class MBASE_PUBLIC RemoteFile
explicit RemoteFile(QString url = "",
bool write = false,
bool usereadahead = true,
int timeout_ms = 2000/*RingBuffer::kDefaultOpenTimeout*/,
std::chrono::milliseconds timeout = 2s/*RingBuffer::kDefaultOpenTimeout*/,
const QStringList *possibleAuxiliaryFiles = nullptr);
~RemoteFile();

Expand Down Expand Up @@ -77,7 +77,7 @@ class MBASE_PUBLIC RemoteFile

QString m_path;
bool m_useReadAhead {true};
int m_timeoutMs {2000};
std::chrono::milliseconds m_timeoutMs {2s};
long long m_fileSize {-1};
bool m_timeoutIsFast {false};
long long m_readPosition {0LL};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class TestMythSystem: public QObject
cmd->GetStandardInputStream()->write(in);
cmd->GetStandardInputStream()->close();
std::cerr << "stdin_works -- Wait starting" << std::endl;
cmd->Wait(0);
cmd->Wait(0ms);
QVERIFY(cmd->GetExitCode() == 0);
QByteArray out = tempfile.readAll();
QVERIFY(QString(out).contains(QString(in)));
Expand Down Expand Up @@ -256,7 +256,7 @@ class TestMythSystem: public QObject
{
QScopedPointer<MythSystem> cmd(
MythSystem::Create("sleep 2", kMSRunShell));
QVERIFY(!cmd->Wait(1));
QVERIFY(!cmd->Wait(1ms));
}

static void getexitcode_returns_exit_code_when_non_zero(void)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ int FileTransfer::WriteBlock(int size)
while (tot < size)
{
int request = size - tot;
int received = GetSocket()->Read(buf, (uint)request, 200 /*ms */);
int received = GetSocket()->Read(buf, (uint)request, 200ms);

if (received != request)
{
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/captions/textsubtitleparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class RemoteFileWrapper
if (m_isRemote)
{
m_localFile = nullptr;
m_remoteFile = new RemoteFile(filename, false, false, 0);
m_remoteFile = new RemoteFile(filename, false, false, 0s);
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/io/mythfilebuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ bool MythFileBuffer::OpenFile(const QString &Filename, uint _Retry)
}
}

m_remotefile = new RemoteFile(m_filename, false, true, Retry.count(), &auxFiles);
m_remotefile = new RemoteFile(m_filename, false, true, Retry, &auxFiles);
if (!m_remotefile->isOpen())
{
LOG(VB_GENERAL, LOG_ERR, LOC + QString("RingBuffer::RingBuffer(): Failed to open remote file (%1)")
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/iptvtuningdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class MTV_PUBLIC IPTVTuningData
QByteArray buffer;

MythSingleDownload downloader;
downloader.DownloadURL(url, &buffer, 5000, 0, 10000);
downloader.DownloadURL(url, &buffer, 5s, 0, 10000);
if (buffer.isEmpty())
{
LOG(VB_GENERAL, LOG_ERR, QString("IsHLSPlaylist - Open Failed: %1\n\t\t\t%2")
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/recorders/HLS/HLSReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ bool HLSReader::Open(const QString & m3u, int bitrate_index)
#else
MythSingleDownload downloader;
QString redir;
if (!downloader.DownloadURL(m3u, &buffer, 30000, 0, 0, &redir))
if (!downloader.DownloadURL(m3u, &buffer, 30s, 0, 0, &redir))
{
LOG(VB_GENERAL, LOG_ERR,
LOC + "Open failed: " + downloader.ErrorString());
Expand Down Expand Up @@ -678,7 +678,7 @@ bool HLSReader::LoadMetaPlaylists(MythSingleDownload& downloader)
return false;
#else
QString redir;
if (!downloader.DownloadURL(m_curstream->M3U8Url(), &buffer, 30000, 0, 0, &redir))
if (!downloader.DownloadURL(m_curstream->M3U8Url(), &buffer, 30s, 0, 0, &redir))
{
LOG(VB_GENERAL, LOG_WARNING,
LOC + "Download failed: " + downloader.ErrorString());
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ bool MythImage::Load(const QString &filename)
QString mythUrl = RemoteFile::FindFile(fname, url.host(), url.userName());
if (!mythUrl.isEmpty())
{
auto *rf = new RemoteFile(mythUrl, false, false, 0);
auto *rf = new RemoteFile(mythUrl, false, false, 0ms);

QByteArray data;
bool ret = rf->SaveAs(data);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythupnp/mythxmlclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ UPnPResultCode MythXMLClient::GetConnectionInfo( const QString &sPin, DatabasePa
QDomNode wolNode = oNode.namedItem( "WOL" );

pParams->m_wolEnabled = GetNodeValue( wolNode, "Enabled" , false );
pParams->m_wolReconnect = GetNodeValue( wolNode, "Reconnect", 0 );
pParams->m_wolReconnect = std::chrono::seconds(GetNodeValue( wolNode, "Reconnect", 0 ));
pParams->m_wolRetry = GetNodeValue( wolNode, "Retry" , 0 );
pParams->m_wolCommand = GetNodeValue( wolNode, "Command" , QString());

Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythupnp/ssdpcache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ void SSDPCache::Add( const QString &sURI,
else
{
PortChecker checker;
if (checker.checkPort(host, url.port(80), 5000))
if (checker.checkPort(host, url.port(80), 5s))
{
m_goodUrlList.append(hostport);
isGoodUrl=true;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythbackend/filetransfer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ int FileTransfer::WriteBlock(int size)
while (tot < size)
{
int request = size - tot;
int received = m_sock->Read(buf, (uint)request, 200 /*ms */);
int received = m_sock->Read(buf, (uint)request, 200ms);

if (received != request)
{
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythbackend/services/content.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ QFileInfo Content::GetAlbumArt( int nTrackId, int nWidth, int nHeight )
QImage img;
if (sFullFileName.startsWith("myth://"))
{
RemoteFile rf(sFullFileName, false, false, 0);
RemoteFile rf(sFullFileName, false, false, 0s);
QByteArray data;
rf.SaveAs(data);

Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythbackend/services/myth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ DTC::ConnectionInfo* Myth::GetConnectionInfo( const QString &sPin )
pDatabase->setLocalHostName( params.m_localHostName );

pWOL->setEnabled ( params.m_wolEnabled );
pWOL->setReconnect ( params.m_wolReconnect );
pWOL->setReconnect ( params.m_wolReconnect.count() );
pWOL->setRetry ( params.m_wolRetry );
pWOL->setCommand ( params.m_wolCommand );

Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythcommflag/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ static qint64 GetFileSize(ProgramInfo *program_info)

if (filename.startsWith("myth://"))
{
RemoteFile remotefile(filename, false, false, 0);
RemoteFile remotefile(filename, false, false, 0s);
size = remotefile.GetFileSize();
}
else
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythutil/recordingutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static int CheckRecordings(const MythUtilCommandLineParser &cmdline)
.arg(p->GetRecordingStartTime(MythDate::ISODate));
std::cout << "Running - " << qPrintable(command) << std::endl;
QScopedPointer<MythSystem> cmd(MythSystem::Create(command));
cmd->Wait(0);
cmd->Wait(0s);
if (cmd.data()->GetExitCode() != GENERIC_EXIT_OK)
{
std::cout << "ERROR - mythcommflag exited with result: " << cmd.data()->GetExitCode() << std::endl;
Expand Down