MythTV  master
ExternalChannel.h
Go to the documentation of this file.
1 
3 #ifndef _EXTERNAL_CHANNEL_H_
4 #define _EXTERNAL_CHANNEL_H_
5 
6 #include <cstdint>
7 #include <utility>
8 #include <vector>
9 using namespace std;
10 
11 // Qt headers
12 #include <QString>
13 
14 // MythTV headers
15 #include "dtvchannel.h"
16 #include "ExternalStreamHandler.h"
17 
19 {
20  public:
21  ExternalChannel(TVRec *parent, QString device)
22  : DTVChannel(parent), m_device(std::move(device)),
23  m_loc(ExternalChannel::GetDevice()) {}
24  ~ExternalChannel(void) override;
25 
26  // Commands
27  bool Open(void) override; // ChannelBase
28  void Close(void) override; // ChannelBase
29 
30  // ATSC/DVB scanning/tuning stuff
31  using DTVChannel::Tune;
32  bool Tune(const DTVMultiplex &/*tuning*/) override // DTVChannel
33  { return true; }
34  bool Tune(const QString &channum) override; // DTVChannel
35  bool Tune(const QString &freqid, int /*finetune*/) override; // DTVChannel
36 
37  bool EnterPowerSavingMode(void) override; // DTVChannel
38 
39  // Gets
40  bool IsOpen(void) const override // ChannelBase
41  { return m_streamHandler; }
42  QString GetDevice(void) const override // ChannelBase
43  { return m_device; }
44  bool IsPIDTuningSupported(void) const override // DTVChannel
45  { return true; }
46 
47  QString UpdateDescription(void);
48  QString GetDescription(void);
49 
50  protected:
51  bool IsExternalChannelChangeSupported(void) override // ChannelBase
52  { return true; }
53 
54  private:
55  QString m_device;
56  QStringList m_args;
57  ExternalStreamHandler *m_streamHandler {nullptr};
58  QString m_loc;
59 };
60 
61 #endif // _EXTERNAL_CHANNEL_H_
bool IsExternalChannelChangeSupported(void) override
bool IsPIDTuningSupported(void) const override
QString GetDevice(void) const override
Returns String representing device, useful for debugging.
bool Tune(const DTVMultiplex &) override
This performs the actual frequency tuning and in some cases input switching.
ExternalChannel(TVRec *parent, QString device)
QStringList m_args
bool IsOpen(void) const override
Reports whether channel is already open.
Class providing a generic interface to digital tuning hardware.
Definition: dtvchannel.h:34
This is the coordinating class of the Recorder Subsystem.
Definition: tv_rec.h:142
virtual bool Tune(const DTVMultiplex &tuning)=0
This performs the actual frequency tuning and in some cases input switching.