MythTV master
asichannel.cpp
Go to the documentation of this file.
1
5// C/C++ includes
6#include <utility>
7
8// MythTV includes
10
11#include "asichannel.h"
12#include "mpeg/mpegtables.h"
13
14#define LOC QString("ASIChan[%1](%2): ").arg(GetInputID()).arg(ASIChannel::GetDevice())
15
16ASIChannel::ASIChannel(TVRec *parent, QString device) :
17 DTVChannel(parent), m_device(std::move(device))
18{
20}
21
23{
26}
27
29{
30 LOG(VB_CHANNEL, LOG_INFO, LOC + "Open()");
31
32 if (m_device.isEmpty())
33 return false;
34
35 if (m_isOpen)
36 return true;
37
38 if (!InitializeInput())
39 return false;
40
41 if (!m_inputId)
42 return false;
43
44 m_isOpen = true;
45
46 return true;
47}
48
50{
51 LOG(VB_CHANNEL, LOG_INFO, LOC + "Close()");
52 m_isOpen = false;
53}
#define LOC
-*- Mode: c++ -*- Class ASIChannel
Definition: asichannel.cpp:14
bool m_isOpen
Definition: asichannel.h:44
bool IsOpen(void) const override
Reports whether channel is already open.
Definition: asichannel.h:32
std::vector< DTVTunerType > m_tunerTypes
Definition: asichannel.h:42
ASIChannel(TVRec *parent, QString device)
Definition: asichannel.cpp:16
~ASIChannel(void) override
Definition: asichannel.cpp:22
bool Open(void) override
Opens the channel changing hardware for use.
Definition: asichannel.cpp:28
QString m_device
Definition: asichannel.h:43
void Close(void) override
Closes the channel changing hardware to use.
Definition: asichannel.cpp:49
uint m_inputId
Definition: channelbase.h:137
virtual bool InitializeInput(void)
Fills in input map from DB.
Class providing a generic interface to digital tuning hardware.
Definition: dtvchannel.h:34
static const int kTunerTypeASI
This is the coordinating class of the Recorder Subsystem.
Definition: tv_rec.h:143
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
STL namespace.