[mythtv-users] Recording from an IPTV source

Jan Ceuleers jan.ceuleers at gmail.com
Sun Nov 27 08:49:14 UTC 2022


On 27/11/2022 08:16, Jan Ceuleers wrote:
> Resulting logfile below; first weird-looking line is
> 
> Nov 27 07:57:51 hobbiton mythbackend: mythbackend[4402]: W TVRecEvent
> recorders/ExternalStreamHandler.cpp:1482 (ProcessVer2)
> ExternSH[1](/usr/bin/mythexternrecorder --conf
> mythexternrecorder1.conf): ProcessV2('10:LockTimeout?') = 'ERR: Not
> open' took 2ms <-- NOTE
> Nov 27 07:57:51 hobbiton mythbackend: mythbackend[4402]: E TVRecEvent
> recorders/ExternalSignalMonitor.cpp:238 (GetLockTimeout)
> ExternSigMon[1](): GetLockTimeout: invalid response 'ERR: Not open'
> 
> Any ideas as to what that means?

I looked at the source; it comes from this function in
programs/mythexternrecorder/MythExternRecApp.cpp:


Q_SLOT void MythExternRecApp::LockTimeout(const QString & serial)
{
    if (!Open())
    {
        LOG(VB_CHANNEL, LOG_WARNING, LOC +
            "Cannot read LockTimeout from config file.");
        emit SendMessage("LockTimeout", serial, "ERR: Not open");
        return;
    }

    if (m_lockTimeout > 0)
    {
        LOG(VB_CHANNEL, LOG_INFO, LOC +
            QString("Using configured LockTimeout of
%1").arg(m_lockTimeout));
        emit SendMessage("LockTimeout", serial,
                         QString("OK:%1").arg(m_lockTimeout));
        return;
    }
    LOG(VB_CHANNEL, LOG_INFO, LOC +
        "No LockTimeout defined in config, defaulting to 12000ms");
    emit SendMessage("LockTimeout", serial, QString("OK:%1")
                     .arg(m_scanCommand.isEmpty() ? 12000 : 120000));
}

Looking at the MythExternRecApp::Open method there are only 2
circumstances in which false is returned, and they are as follows:

    if (m_fatal)
    {
        emit SendMessage("Open", "0", "ERR:Already dead.");
        return false;
    }

    if (m_command.isEmpty())
    {
        LOG(VB_RECORD, LOG_ERR, LOC + ": No recorder provided.");
        emit SendMessage("Open", "0", "ERR:No recorder provided.");
        return false;
    }

But in both cases messages are emitted that I don't see in the log.
Furthermore:

- m_fatal only becomes true if there is no RECORDER/command (which there
obviously is);

- the command is also not empty

So I don't get it.

Thx, Jan


More information about the mythtv-users mailing list