Go to the documentation of this file.
12 #define LOC QString("ExternChan[%1](%2): ").arg(m_inputId).arg(m_loc)
22 LOG(VB_CHANNEL, LOG_INFO,
LOC +
"Open()");
32 LOG(VB_GENERAL, LOG_ERR,
LOC +
33 QString(
"Valid stream handler, but app is not open! Resetting."));
48 LOG(VB_GENERAL, LOG_ERR,
LOC +
"Open failed");
54 LOG(VB_RECORD, LOG_INFO,
LOC +
"Opened");
60 LOG(VB_CHANNEL, LOG_INFO,
LOC +
"Close()");
91 LOG(VB_CHANNEL, LOG_INFO,
LOC + QString(
"Tune(%1)").arg(channum));
95 LOG(VB_CHANNEL, LOG_ERR,
LOC +
"Tune failed, not open");
107 LOG(VB_CHANNEL, LOG_ERR,
LOC + QString
108 (
"Failed to retrieve LockTimeout: %1").arg(result));
112 m_tuneTimeout = std::chrono::milliseconds(result.split(
":")[1].toInt());
114 LOG(VB_CHANNEL, LOG_INFO,
LOC + QString(
"Using Tune timeout of %1ms")
118 LOG(VB_CHANNEL, LOG_INFO,
LOC +
"Tuning to " + channum);
123 LOG(VB_CHANNEL, LOG_ERR,
LOC + QString
124 (
"Failed to Tune %1: %2").arg(channum, result));
151 LOG(VB_CHANNEL, LOG_DEBUG,
LOC + QString(
"GetScriptStatus() %1")
159 LOG(VB_CHANNEL, LOG_ERR,
LOC + QString
160 (
"Failed to Tune: %1").arg(result));
166 if (result.startsWith(
"OK:InProgress"))
176 LOG(VB_CHANNEL, LOG_DEBUG,
LOC + QString(
"GetScriptStatus() %1 -> %2")
#define LOC
-*- Mode: c++ -*- Class ExternalChannel
QString GetDescription(void)
bool HasError(void) const
bool HasTuner(void) const
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
ExternalStreamHandler * m_streamHandler
void Close(void) override
Closes the channel changing hardware to use.
QString GetDevice(void) const override
Returns String representing device, useful for debugging.
static ExternalStreamHandler * Get(const QString &devname, int inputid, int majorid)
bool Open(void) override
Opens the channel changing hardware for use.
QString UpdateDescription(void)
bool Tune(const DTVMultiplex &) override
This performs the actual frequency tuning and in some cases input switching.
uint m_systemStatus
These get mapped from the GENERIC_EXIT_* to these values for use with the signalmonitor code.
bool EnterPowerSavingMode(void) override
Enters power saving mode if the card supports it.
~ExternalChannel(void) override
std::chrono::milliseconds m_tuneTimeout
bool ProcessCommand(const QString &cmd, QString &result, std::chrono::milliseconds timeout=4s, uint retry_cnt=3)
virtual int GetInputID(void) const
QString UpdateDescription(void)
bool IsOpen(void) const override
Reports whether channel is already open.
virtual bool InitializeInput(void)
Fills in input map from DB.
static void Return(ExternalStreamHandler *&ref, int inputid)
QString GetDescription(void)