MythTV
master
|
Abstract class providing a generic interface to tuning hardware. More...
#include <libmythtv/recorders/channelbase.h>
Public Member Functions | |
ChannelBase (TVRec *parent) | |
virtual | ~ChannelBase (void) |
virtual bool | Init (QString &startchannel, bool setchan) |
virtual bool | IsTunable (const QString &channum) const |
virtual bool | Open (void)=0 |
Opens the channel changing hardware for use. More... | |
virtual void | Close (void)=0 |
Closes the channel changing hardware to use. More... | |
virtual bool | IsOpen (void) const =0 |
Reports whether channel is already open. More... | |
virtual bool | SetChannelByString (const QString &chan)=0 |
virtual void | SetFormat (const QString &) |
virtual int | SetFreqTable (const QString &) |
virtual void | SetFd (int fd) |
Sets file descriptor. More... | |
virtual int | GetFd (void) const |
Returns file descriptor, -1 if it does not exist. More... | |
virtual bool | Tune (const QString &, int) |
virtual bool | IsExternalChannelChangeInUse (void) |
virtual uint | GetNextChannel (uint chanid, ChannelChangeDirection direction) const |
virtual uint | GetNextChannel (const QString &channum, ChannelChangeDirection direction) const |
virtual QString | GetChannelName (void) const |
virtual int | GetChanID (void) const |
virtual int | GetInputID (void) const |
virtual QString | GetInputName (void) const |
virtual uint | GetSourceID (void) const |
bool | IsCommercialFree (void) const |
Returns true iff commercial detection is not required. More... | |
virtual QString | GetDevice (void) const |
Returns String representing device, useful for debugging. More... | |
virtual void | Renumber (uint sourceid, const QString &oldChanNum, const QString &newChanNum) |
Changes a channum if we have it cached anywhere. More... | |
virtual bool | InitializeInput (void) |
Fills in input map from DB. More... | |
virtual bool | Retune (void) |
virtual void | StoreInputChannels (void) |
Saves current channel as the default channel for the current input. More... | |
virtual bool | InitPictureAttributes (void) |
virtual int | GetPictureAttribute (PictureAttribute) const |
virtual int | ChangePictureAttribute (PictureAdjustType, PictureAttribute, bool) |
bool | CheckChannel (const QString &channum) const |
void | SetInputID (uint _inputid) |
int | GetMajorID (void) |
Static Public Member Functions | |
static ChannelBase * | CreateChannel (TVRec *tvrec, const GeneralDBOptions &genOpt, const DVBDBOptions &dvbOpt, const FireWireDBOptions &fwOpt, const QString &startchannel, bool enter_power_save_mode, QString &rbFileExt, bool setchan) |
Protected Member Functions | |
virtual bool | IsInputAvailable (uint &mplexid_restriction, uint &chanid_restriction) const |
Switches to another input on hardware, and sets the channel is setstarting is true. More... | |
virtual bool | IsExternalChannelChangeSupported (void) |
bool | KillScript (void) |
void | HandleScript (const QString &freqid) |
virtual void | HandleScriptEnd (bool ok) |
uint | GetScriptStatus (bool holding_lock=false) |
bool | ChangeExternalChannel (const QString &changer, const QString &freqid) |
bool | ChangeInternalChannel (const QString &freqid, uint cardinputid) const |
Protected Attributes | |
TVRec * | m_pParent {nullptr} |
QString | m_curChannelName |
bool | m_commFree {false} |
uint | m_inputId {0} |
uint | m_sourceId {0} |
QString | m_name |
QString | m_startChanNum |
QString | m_externalChanger |
QString | m_tuneToChannel |
ChannelInfoList | m_channels |
channels across all inputs More... | |
QMutex | m_systemLock |
MythSystemLegacy * | m_system {nullptr} |
uint | m_systemStatus {0} |
These get mapped from the GENERIC_EXIT_* to these values for use with the signalmonitor code. More... | |
Friends | |
class | SignalMonitor |
Abstract class providing a generic interface to tuning hardware.
This class abstracts channel implementations for analog TV, ATSC, DVB, etc. Also implements many generic functions needed by most derived classes. It is responsible for tuning, i.e. switching channels.
Definition at line 31 of file channelbase.h.
|
explicit |
Definition at line 51 of file channelbase.cpp.
|
virtual |
Definition at line 59 of file channelbase.cpp.
Reimplemented in DVBChannel, and V4LChannel.
Definition at line 66 of file channelbase.cpp.
Referenced by CreateChannel(), V4LChannel::Init(), DVBChannel::Init(), and TVRec::TuningGetChanNum().
|
virtual |
Reimplemented in DummyChannel.
Definition at line 133 of file channelbase.cpp.
Referenced by Init().
|
pure virtual |
Opens the channel changing hardware for use.
Implemented in V4LChannel, DVBChannel, IPTVChannel, CetonChannel, ExternalChannel, HDHRChannel, FirewireChannel, DummyChannel, ASIChannel, and SatIPChannel.
Referenced by CreateChannel(), ChannelScanner::PreScanCommon(), DTVChannel::SetChannelByString(), TVRec::SetupSignalMonitor(), TVRec::TuningFrequency(), and TVRec::TuningNewRecorder().
|
pure virtual |
Closes the channel changing hardware to use.
Implemented in IPTVChannel, V4LChannel, DVBChannel, CetonChannel, ExternalChannel, HDHRChannel, FirewireChannel, DummyChannel, ASIChannel, and SatIPChannel.
Referenced by TVRec::CloseChannel(), CreateChannel(), and TVRec::TuningNewRecorder().
|
pure virtual |
Reports whether channel is already open.
Implemented in V4LChannel, DVBChannel, IPTVChannel, ExternalChannel, FirewireChannel, CetonChannel, HDHRChannel, DummyChannel, ASIChannel, and SatIPChannel.
Referenced by DTVChannel::SetChannelByString(), and TVRec::TuningOnSameMultiplex().
|
pure virtual |
Implemented in CetonChannel, HDHRChannel, DTVChannel, and DummyChannel.
Referenced by Init(), and TVRec::TuningFrequency().
|
inlinevirtual |
Reimplemented in V4LChannel, and DTVChannel.
Definition at line 52 of file channelbase.h.
|
inlinevirtual |
Reimplemented in V4LChannel.
Definition at line 53 of file channelbase.h.
Referenced by DTVChannel::SetChannelByString().
|
inlinevirtual |
Sets file descriptor.
Reimplemented in V4LChannel.
Definition at line 55 of file channelbase.h.
Referenced by TVRec::TeardownRecorder(), TVRec::TuningNewRecorder(), and TVRec::TuningRestartRecorder().
|
inlinevirtual |
Returns file descriptor, -1 if it does not exist.
Reimplemented in V4LChannel, and DVBChannel.
Definition at line 57 of file channelbase.h.
Referenced by AnalogSignalMonitor::AnalogSignalMonitor(), and AnalogSignalMonitor::UpdateValues().
|
inlinevirtual |
Reimplemented in CetonChannel, HDHRChannel, ExternalChannel, V4LChannel, FirewireChannel, and ASIChannel.
Definition at line 58 of file channelbase.h.
|
virtual |
Definition at line 844 of file channelbase.cpp.
Referenced by FirewireChannel::Open(), DTVChannel::SetChannelByString(), SignalMonitor::SignalMonitor(), and ExternalSignalMonitor::UpdateValues().
|
virtual |
Definition at line 203 of file channelbase.cpp.
Referenced by GetNextChannel(), TVRec::GetNextProgram(), and TVRec::TuningGetChanNum().
|
virtual |
Definition at line 222 of file channelbase.cpp.
|
inlinevirtual |
Definition at line 64 of file channelbase.h.
Referenced by TVRec::CreateLiveTVRingBuffer(), TVRec::run(), TVRec::SetSignalMonitoringRate(), EITScanner::StartEITEventProcessing(), TVRec::SwitchLiveTVRingBuffer(), TVRec::ToggleChannelFavorite(), TVRec::TuningFrequency(), TVRec::TuningNewRecorder(), TVRec::TuningOnSameMultiplex(), and TVRec::TuningRestartRecorder().
|
virtual |
Reimplemented in DVBChannel.
Definition at line 498 of file channelbase.cpp.
Referenced by DTVChannel::GetCachedPids(), TVRec::GetChannelInfo(), TVRec::IsBusy(), DTVChannel::SaveCachedPids(), and EITScanner::StartEITEventProcessing().
|
inlinevirtual |
Definition at line 67 of file channelbase.h.
Referenced by SatIPChannel::Close(), ExternalChannel::Close(), HDHRChannel::Close(), CetonChannel::Close(), IPTVChannel::CloseStreamHandler(), ExternalSignalMonitor::ExternalSignalMonitor(), ChannelScanSM::GetChannelList(), HDHRSignalMonitor::HDHRSignalMonitor(), TVRec::IsBusy(), ChannelScanSM::loc(), SatIPChannel::Open(), HDHRRecorder::Open(), HDHRChannel::Open(), ExternalChannel::Open(), CetonChannel::Open(), ExternalRecorder::Open(), IPTVChannel::OpenStreamHandler(), DVBCam::RemoveDuplicateServices(), SatIPChannel::Tune(), ExternalChannel::Tune(), and TVRec::TuningFrequency().
|
inlinevirtual |
Definition at line 69 of file channelbase.h.
Referenced by TVRec::CreateLiveTVRingBuffer(), TVRec::GetInput(), DTVChannel::GetSuggestedTuningMode(), and TVRec::SwitchLiveTVRingBuffer().
|
inlinevirtual |
Definition at line 71 of file channelbase.h.
Referenced by V4LChannel::ChangePictureAttribute(), TVRec::GetChannelInfo(), V4LChannel::GetPictureAttribute(), TVRec::GetProgramRingBufferForLiveTV(), TVRec::GetSourceID(), V4LChannel::InitPictureAttribute(), Renumber(), DTVChannel::SetChannelByString(), TVRec::ToggleChannelFavorite(), TVRec::TuningNewRecorder(), and TVRec::TuningOnSameMultiplex().
|
inline |
Returns true iff commercial detection is not required.
Definition at line 76 of file channelbase.h.
|
inlinevirtual |
Returns String representing device, useful for debugging.
Reimplemented in V4LChannel, DVBChannel, IPTVChannel, ExternalChannel, FirewireChannel, CetonChannel, DummyChannel, HDHRChannel, ASIChannel, and SatIPChannel.
Definition at line 78 of file channelbase.h.
Referenced by CetonSignalMonitor::CetonSignalMonitor(), ExternalSignalMonitor::ExternalSignalMonitor(), HDHRSignalMonitor::HDHRSignalMonitor(), InitializeInput(), and V4L2encSignalMonitor::V4L2encSignalMonitor().
|
virtual |
Changes a channum if we have it cached anywhere.
Definition at line 633 of file channelbase.cpp.
Referenced by TVRec::SetChannelInfo(), and TVRec::TuningFrequency().
|
virtual |
Fills in input map from DB.
Definition at line 554 of file channelbase.cpp.
Referenced by V4LChannel::InitializeInputs(), SatIPChannel::Open(), ASIChannel::Open(), DummyChannel::Open(), FirewireChannel::Open(), ExternalChannel::Open(), HDHRChannel::Open(), CetonChannel::Open(), IPTVChannel::Open(), and DVBChannel::Open().
|
inlinevirtual |
Reimplemented in DVBChannel, V4LChannel, and FirewireChannel.
Definition at line 87 of file channelbase.h.
Referenced by NuppelVideoRecorder::DoV4L2().
|
virtual |
Saves current channel as the default channel for the current input.
Sets starting channel for the each input in the input map.
Definition at line 653 of file channelbase.cpp.
Referenced by TVRec::HandleTuning(), and Renumber().
|
inlinevirtual |
Reimplemented in V4LChannel.
Definition at line 93 of file channelbase.h.
Referenced by DTVChannel::SetChannelByString(), and TVRec::TuningNewRecorder().
|
inlinevirtual |
Reimplemented in V4LChannel.
Definition at line 94 of file channelbase.h.
Referenced by TVRec::GetPictureAttribute().
|
inlinevirtual |
Reimplemented in V4LChannel.
Definition at line 95 of file channelbase.h.
Referenced by TVRec::ChangePictureAttribute().
bool ChannelBase::CheckChannel | ( | const QString & | channum | ) | const |
Definition at line 671 of file channelbase.cpp.
Referenced by TVRec::CheckChannel(), TVRec::CreateLiveTVRingBuffer(), and TVRec::SwitchLiveTVRingBuffer().
|
inline |
Definition at line 101 of file channelbase.h.
Referenced by ChannelScanner::PreScanCommon().
int ChannelBase::GetMajorID | ( | void | ) |
Definition at line 860 of file channelbase.cpp.
Referenced by ExternalSignalMonitor::ExternalSignalMonitor(), HDHRSignalMonitor::HDHRSignalMonitor(), HDHRRecorder::Open(), HDHRChannel::Open(), ExternalChannel::Open(), and ExternalRecorder::Open().
|
static |
Definition at line 704 of file channelbase.cpp.
Referenced by TVRec::CreateChannel().
|
protectedvirtual |
Switches to another input on hardware, and sets the channel is setstarting is true.
Definition at line 231 of file channelbase.cpp.
Referenced by GetNextChannel(), Init(), IsTunable(), DTVChannel::SetChannelByString(), and V4LChannel::Tune().
|
inlineprotectedvirtual |
Reimplemented in V4LChannel, IPTVChannel, ExternalChannel, and FirewireChannel.
Definition at line 121 of file channelbase.h.
Referenced by InitializeInput(), and IsExternalChannelChangeInUse().
|
protected |
Definition at line 270 of file channelbase.cpp.
Referenced by HandleScript(), and ~ChannelBase().
|
protected |
Definition at line 283 of file channelbase.cpp.
Referenced by DTVChannel::SetChannelByString().
|
protectedvirtual |
Reimplemented in DTVChannel.
Definition at line 481 of file channelbase.cpp.
Referenced by GetScriptStatus(), and HandleScript().
Definition at line 433 of file channelbase.cpp.
Referenced by HandleScript(), and SignalMonitor::UpdateValues().
|
protected |
Definition at line 414 of file channelbase.cpp.
Referenced by HandleScript().
|
protected |
Definition at line 368 of file channelbase.cpp.
Referenced by HandleScript().
|
friend |
Definition at line 33 of file channelbase.h.
|
protected |
Definition at line 134 of file channelbase.h.
Referenced by V4LChannel::ChangePictureAttribute(), ChannelBase(), DVBChannel::DVBChannel(), GetMajorID(), InitializeInput(), V4LChannel::InitPictureAttribute(), DTVChannel::SetChannelByString(), and ExternalChannel::Tune().
|
protected |
Definition at line 135 of file channelbase.h.
Referenced by V4LChannel::ChangePictureAttribute(), DummyChannel::DummyChannel(), GetChanID(), DVBChannel::GetChanID(), GetChannelName(), GetNextChannel(), V4LChannel::GetPictureAttribute(), HandleScriptEnd(), V4LChannel::InitPictureAttribute(), Renumber(), DummyChannel::SetChannelByString(), and DTVChannel::SetChannelByString().
Definition at line 136 of file channelbase.h.
Referenced by IsCommercialFree(), and DTVChannel::SetChannelByString().
|
protected |
Definition at line 137 of file channelbase.h.
Referenced by V4LChannel::ChangePictureAttribute(), ChannelBase(), CheckChannel(), GetChanID(), DVBChannel::GetChanID(), V4LChannel::GetFormatForChannel(), GetInputID(), GetMajorID(), GetNextChannel(), V4LChannel::GetPictureAttribute(), DTVChannel::GetSuggestedTuningMode(), HandleScript(), HandleScriptEnd(), InitializeInput(), V4LChannel::InitializeInputs(), V4LChannel::InitPictureAttribute(), IsExternalChannelChangeInUse(), IsInputAvailable(), IsTunable(), ASIChannel::Open(), FirewireChannel::Open(), ExternalChannel::Open(), DVBChannel::Open(), DTVChannel::SetChannelByString(), V4LChannel::SetFormat(), V4LChannel::SetInputAndFormat(), SetInputID(), StoreInputChannels(), ExternalChannel::Tune(), and DVBChannel::Tune().
|
protected |
Definition at line 138 of file channelbase.h.
Referenced by GetChanID(), GetNextChannel(), GetSourceID(), InitializeInput(), IsInputAvailable(), IsTunable(), Renumber(), DTVChannel::SetChannelByString(), and ExternalChannel::Tune().
|
protected |
Definition at line 139 of file channelbase.h.
Referenced by GetInputName(), InitializeInput(), V4LChannel::InitializeInputs(), Renumber(), DTVChannel::SetChannelByString(), and StoreInputChannels().
|
protected |
Definition at line 140 of file channelbase.h.
Referenced by HandleScriptEnd(), InitializeInput(), V4LChannel::InitializeInputs(), Renumber(), and StoreInputChannels().
|
protected |
Definition at line 141 of file channelbase.h.
Referenced by HandleScript(), InitializeInput(), and IsExternalChannelChangeInUse().
|
protected |
Definition at line 142 of file channelbase.h.
Referenced by InitializeInput(), V4LChannel::InitializeInputs(), and DTVChannel::SetChannelByString().
|
protected |
channels across all inputs
Definition at line 143 of file channelbase.h.
Referenced by GetNextChannel(), Init(), and InitializeInput().
|
protected |
Definition at line 145 of file channelbase.h.
Referenced by GetScriptStatus(), HandleScript(), and ~ChannelBase().
|
protected |
Definition at line 146 of file channelbase.h.
Referenced by ChangeExternalChannel(), GetScriptStatus(), HandleScript(), KillScript(), and ~ChannelBase().
|
protected |
These get mapped from the GENERIC_EXIT_* to these values for use with the signalmonitor code.
0 == unknown, 1 == pending, 2 == failed, 3 == success
Definition at line 150 of file channelbase.h.
Referenced by GetScriptStatus(), ExternalChannel::GetTuneStatus(), and HandleScript().