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 <vector>
8 using namespace std;
9 
10 // Qt headers
11 #include <QString>
12 
13 // MythTV headers
14 #include "dtvchannel.h"
15 #include "ExternalStreamHandler.h"
16 
18 {
19  public:
20  ExternalChannel(TVRec *parent, const QString & device)
21  : DTVChannel(parent), m_device(device),
22  m_loc(ExternalChannel::GetDevice()) {}
23  ~ExternalChannel(void);
24 
25  // Commands
26  bool Open(void) override; // ChannelBase
27  void Close(void) override; // ChannelBase
28 
29  // ATSC/DVB scanning/tuning stuff
30  using DTVChannel::Tune;
31  bool Tune(const DTVMultiplex&) override // DTVChannel
32  { return true; }
33  bool Tune(const QString &channum) override; // DTVChannel
34  bool Tune(const QString &freqid, int /*finetune*/) override; // DTVChannel
35 
36  bool EnterPowerSavingMode(void) override; // DTVChannel
37 
38  // Gets
39  bool IsOpen(void) const override // ChannelBase
40  { return m_stream_handler; }
41  QString GetDevice(void) const override // ChannelBase
42  { return m_device; }
43  bool IsPIDTuningSupported(void) const override // DTVChannel
44  { return true; }
45 
46  QString UpdateDescription(void);
47  QString GetDescription(void);
48 
49  protected:
50  bool IsExternalChannelChangeSupported(void) override // ChannelBase
51  { return true; }
52 
53  private:
54  QString m_device;
55  QStringList m_args;
56  ExternalStreamHandler *m_stream_handler {nullptr};
57  QString m_loc;
58 };
59 
60 #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.
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:150
virtual bool Tune(const DTVMultiplex &tuning)=0
This performs the actual frequency tuning and in some cases input switching.
ExternalChannel(TVRec *parent, const QString &device)