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