|
MythTV
0.26-pre
|
00001 00005 // MythTV includes 00006 #include "mythlogging.h" 00007 #include "mpegtables.h" 00008 #include "asichannel.h" 00009 00010 #define LOC QString("ASIChan(%1): ").arg(GetDevice()) 00011 00012 ASIChannel::ASIChannel(TVRec *parent, const QString &device) : 00013 DTVChannel(parent), m_device(device), m_isopen(false) 00014 { 00015 m_tuner_types.push_back(DTVTunerType::kTunerTypeASI); 00016 } 00017 00018 ASIChannel::~ASIChannel(void) 00019 { 00020 if (IsOpen()) 00021 Close(); 00022 } 00023 00024 bool ASIChannel::Open(void) 00025 { 00026 LOG(VB_CHANNEL, LOG_INFO, LOC + "Open()"); 00027 00028 if (m_device.isEmpty()) 00029 return false; 00030 00031 if (m_isopen) 00032 return true; 00033 00034 if (!InitializeInputs()) 00035 return false; 00036 00037 if (m_inputs.find(m_currentInputID) == m_inputs.end()) 00038 return false; 00039 00040 m_isopen = true; 00041 00042 return true; 00043 } 00044 00045 void ASIChannel::Close() 00046 { 00047 LOG(VB_CHANNEL, LOG_INFO, LOC + "Close()"); 00048 m_isopen = false; 00049 }
1.7.6.1