MythTV  master
tv_rec.h
Go to the documentation of this file.
1 #ifndef TVREC_H
2 #define TVREC_H
3 
4 // C++ headers
5 #include <utility>
6 #include <vector> // for vector
7 
8 // Qt headers
9 #include <QWaitCondition>
10 #include <QStringList>
11 #include <QDateTime>
12 #include <QRunnable>
13 #include <QString>
14 #include <QMap>
15 #include <QMutex> // for QMutex
16 #include <QReadWriteLock>
17 #include <QHash> // for QHash
18 
19 // MythTV headers
20 #include "mythtimer.h"
21 #include "mthread.h"
22 #include "inputinfo.h"
23 #include "mythdeque.h"
24 
25 #include "recordinginfo.h"
26 #include "tv.h"
27 #include "signalmonitorlistener.h"
28 #include "mythtvexp.h" // for MTV_PUBLIC
29 #include "programtypes.h" // for RecStatus, RecStatus::Type, etc
30 #include "videoouttypes.h" // for PictureAttribute
31 
32 #include "mythconfig.h"
33 
34 // locking order
35 // setChannelLock -> stateChangeLock -> triggerEventLoopLock
36 // -> pendingRecLock
37 
38 class MythMediaBuffer;
39 class EITScanner;
40 class RecordingProfile;
41 class LiveTVChain;
42 
43 class RecorderBase;
44 class DTVRecorder;
45 class DVBRecorder;
46 class HDHRRecorder;
47 class ASIRecorder;
48 class CetonRecorder;
49 
50 class SignalMonitor;
51 class DTVSignalMonitor;
52 
53 class ChannelBase;
54 class DTVChannel;
55 class DVBChannel;
56 class FirewireChannel;
57 class V4LChannel;
58 class HDHRChannel;
59 class CetonChannel;
60 
61 class MPEGStreamData;
62 class ProgramMapTable;
63 class RecordingQuality;
64 
66 {
67  public:
68  GeneralDBOptions()= default;
69 
70  QString m_videoDev;
71  QString m_vbiDev;
72  QString m_audioDev;
73  QString m_inputType {"V4L"};
75  bool m_skipBtAudio {false};
78  bool m_waitForSeqstart {false};
79 };
80 
82 {
83  public:
84  DVBDBOptions() = default;
85 
86  bool m_dvbOnDemand {false};
88  bool m_dvbEitScan {true};
89 };
90 
92 {
93  public:
94  FireWireDBOptions() = default;
95 
96  int m_speed {-1};
97  int m_connection {-1};
98  QString m_model;
99 };
100 
102 {
103  public:
104  explicit TuningRequest(uint f) :
105  m_flags(f) {;}
107  m_flags(f), m_program(p) {;}
108  TuningRequest(uint f, QString ch, QString in = QString()) :
109  m_flags(f), m_channel(std::move(ch)), m_input(std::move(in)) {;}
110 
111  QString toString(void) const;
112 
113  bool IsOnSameMultiplex(void) const { return m_minorChan || (m_progNum >= 0); }
114 
115  public:
118  QString m_channel;
119  QString m_input;
122  int m_progNum {-1};
123 };
125 inline TuningRequest myth_deque_init(const TuningRequest */*request*/) { return (TuningRequest)(0); }
126 
128 {
129  public:
130  PendingInfo() = default;
131 
132  ProgramInfo *m_info {nullptr};
133  QDateTime m_recordingStart;
134  bool m_hasLaterShowing {false};
135  bool m_canceled {false};
136  bool m_ask {false};
137  bool m_doNotAsk {false};
138  vector<uint> m_possibleConflicts;
139 };
140 using PendingMap = QMap<uint,PendingInfo>;
141 
142 class MTV_PUBLIC TVRec : public SignalMonitorListener, public QRunnable
143 {
144  Q_DECLARE_TR_FUNCTIONS(TVRec)
145 
146  friend class TuningRequest;
147  friend class TVRecRecordThread;
148 
149  public:
150  explicit TVRec(int _inputid);
151  ~TVRec(void) override;
152 
153  bool Init(void);
154 
155  void RecordPending(const ProgramInfo *rcinfo, int secsleft, bool hasLater);
156  RecStatus::Type StartRecording(ProgramInfo *pginfo);
157  RecStatus::Type GetRecordingStatus(void) const;
158 
159  void StopRecording(bool killFile = false);
161  void FinishRecording(void) { SetFlags(kFlagFinishRecording,
162  __FILE__, __LINE__); }
164  void FrontendReady(void) { SetFlags(kFlagFrontendReady,
165  __FILE__, __LINE__); }
166  void CancelNextRecording(bool cancel);
167  ProgramInfo *GetRecording(void);
168 
170  bool IsRunning(void) const { return HasFlags(kFlagRunMainLoop); }
172  void Stop(void) { ClearFlags(kFlagRunMainLoop, __FILE__, __LINE__); }
173 
174  TVState GetState(void) const;
176  bool IsPlaying(void) { return StateIsPlaying(m_internalState); }
179  bool IsRecording(void) { return StateIsRecording(m_internalState); }
180 
181  bool SetVideoFiltersForChannel(uint sourceid, const QString &channum);
182 
183  bool IsBusy(InputInfo *busy_input = nullptr, int time_buffer = 5) const;
184  bool IsReallyRecording(void);
185 
186  float GetFramerate(void);
187  long long GetFramesWritten(void);
188  long long GetFilePosition(void);
189  long long GetMaxBitrate(void) const;
190  int64_t GetKeyframePosition(uint64_t desired) const;
191  bool GetKeyframePositions(int64_t start, int64_t end, frm_pos_map_t &map) const;
192  bool GetKeyframeDurations(int64_t start, int64_t end, frm_pos_map_t &map) const;
193  void SpawnLiveTV(LiveTVChain *newchain, bool pip, QString startchan);
194  QString GetChainID(void);
195  void StopLiveTV(void);
196  void PauseRecorder(void);
197  void ToggleChannelFavorite(const QString &changroupname);
198 
199  void SetLiveRecording(int recording);
200 
201  QString GetInput(void) const;
202  uint GetSourceID(void) const;
203  QString SetInput(QString input);
204 
207  { SetChannel(QString("NextChannel %1").arg((int)dir)); }
208  void SetChannel(const QString& name, uint requestType = kFlagDetect);
209  bool QueueEITChannelChange(const QString &name);
210 
211  int SetSignalMonitoringRate(int rate, int notifyFrontend = 1);
212  int GetPictureAttribute(PictureAttribute attr);
213  int ChangePictureAttribute(PictureAdjustType type, PictureAttribute attr,
214  bool direction);
215  bool CheckChannel(const QString& name) const;
216  bool ShouldSwitchToAnotherInput(const QString& chanid) const;
217  bool CheckChannelPrefix(const QString &prefix, uint &complete_valid_channel_on_rec,
218  bool &is_extra_char_useful, QString &needed_spacer) const;
219  void GetNextProgram(BrowseDirection direction,
220  QString &title, QString &subtitle,
221  QString &desc, QString &category,
222  QString &starttime, QString &endtime,
223  QString &callsign, QString &iconpath,
224  QString &channum, uint &chanid,
225  QString &seriesid, QString &programid);
226  bool GetChannelInfo(uint &chanid, uint &sourceid,
227  QString &callsign, QString &channum,
228  QString &channame, QString &xmltvid) const;
229  bool SetChannelInfo(uint chanid, uint sourceid, const QString& oldchannum,
230  const QString& callsign, const QString& channum,
231  const QString& channame, const QString& xmltvid);
232 
234  uint GetInputId(void) const { return m_inputId; }
235  uint GetParentId(void) const { return m_parentId; }
236  uint GetMajorId(void) { return m_parentId ? m_parentId : m_inputId; }
238  bool IsErrored(void) const { return HasFlags(kFlagErrored); }
239 
240  void RingBufferChanged(MythMediaBuffer *Buffer, RecordingInfo *pginfo, RecordingQuality *recq);
241  void RecorderPaused(void);
242 
243  void SetNextLiveTVDir(QString dir);
244 
245  uint GetFlags(void) const { return m_stateFlags; }
246 
247  static TVRec *GetTVRec(uint inputid);
248 
249  void AllGood(void) override { WakeEventLoop(); } // SignalMonitorListener
250  void StatusChannelTuned(const SignalMonitorValue &/*val*/) override { } // SignalMonitorListener
251  void StatusSignalLock(const SignalMonitorValue &/*val*/) override { } // SignalMonitorListener
252  void StatusSignalStrength(const SignalMonitorValue &/*val*/) override { } // SignalMonitorListener
253 
254  protected:
255  void run(void) override; // QRunnable
256  bool WaitForEventThreadSleep(bool wake = true, ulong time = ULONG_MAX);
257 
258  private:
259  void SetRingBuffer(MythMediaBuffer* Buffer);
260  void SetPseudoLiveTVRecording(RecordingInfo *pi);
261  void TeardownAll(void);
262  void WakeEventLoop(void);
263 
264  static bool GetDevices(uint inputid,
265  uint &parentid,
266  GeneralDBOptions &gen_opts,
267  DVBDBOptions &dvb_opts,
268  FireWireDBOptions &firewire_opts);
269 
270  static QString GetStartChannel(uint inputid);
271 
272  void TeardownRecorder(uint request_flags);
273  DTVRecorder *GetDTVRecorder(void);
274 
275  bool CreateChannel(const QString &startchannel,
276  bool enter_power_save_mode);
277  void CloseChannel(void);
278  DTVChannel *GetDTVChannel(void);
279  V4LChannel *GetV4LChannel(void);
280 
281  bool SetupSignalMonitor(
282  bool tablemon, bool EITscan, bool notify);
283  bool SetupDTVSignalMonitor(bool EITscan);
284  void TeardownSignalMonitor(void);
285  DTVSignalMonitor *GetDTVSignalMonitor(void);
286 
287  bool HasFlags(uint f) const { return (m_stateFlags & f) == f; }
288  void SetFlags(uint f, const QString & file, int line);
289  void ClearFlags(uint f, const QString & file, int line);
290  static QString FlagToString(uint f);
291 
292  void HandleTuning(void);
293  void TuningShutdowns(const TuningRequest &request);
294  void TuningFrequency(const TuningRequest &request);
295  MPEGStreamData *TuningSignalCheck(void);
296 
297  void TuningNewRecorder(MPEGStreamData *streamData);
298  void TuningRestartRecorder(void);
299  QString TuningGetChanNum(const TuningRequest &request, QString &input) const;
300  bool TuningOnSameMultiplex(TuningRequest &request);
301 
302  void HandleStateChange(void);
303  void ChangeState(TVState nextState);
304  static bool StateIsRecording(TVState state);
305  static bool StateIsPlaying(TVState state);
306  TVState RemovePlaying(TVState state) const;
307  TVState RemoveRecording(TVState state) const;
308 
309  void HandlePendingRecordings(void);
310 
311  bool WaitForNextLiveTVDir(void);
312  bool GetProgramRingBufferForLiveTV(RecordingInfo **pginfo, MythMediaBuffer **Buffer,
313  const QString &channum);
314  bool CreateLiveTVRingBuffer(const QString & channum);
315  bool SwitchLiveTVRingBuffer(const QString & channum,
316  bool discont, bool set_rec);
317 
318  RecordingInfo *SwitchRecordingRingBuffer(const RecordingInfo &rcinfo);
319 
320  void StartedRecording(RecordingInfo *curRec);
321  void FinishedRecording(RecordingInfo *curRec, RecordingQuality *recq);
322  QDateTime GetRecordEndTime(const ProgramInfo *pi) const;
323  void CheckForRecGroupChange(void);
324  void NotifySchedulerOfRecording(RecordingInfo *rec);
325  enum AutoRunInitType { kAutoRunProfile, kAutoRunNone, };
326  void InitAutoRunJobs(RecordingInfo *rec, AutoRunInitType t,
327  RecordingProfile *recpro, int line);
328 
329  void SetRecordingStatus(
330  RecStatus::Type new_status, int line, bool have_lock = false);
331 
332  QString LoadProfile(void *tvchain, RecordingInfo *rec,
333  RecordingProfile &profile) const;
334 
335  // Various components TVRec coordinates
336  RecorderBase *m_recorder {nullptr};
337  ChannelBase *m_channel {nullptr};
338  SignalMonitor *m_signalMonitor {nullptr};
339  EITScanner *m_scanner {nullptr};
340 
342  bool m_signalEventCmdSent {false};
343 
346  uint m_signalMonitorCheckCnt {0};
347  bool m_reachedRecordingDeadline {false};
348  QDateTime m_preFailDeadline;
349  bool m_reachedPreFail {false};
350 
351  // Various threads
353  MThread *m_eventThread {nullptr};
355  MThread *m_recorderThread {nullptr};
356 
357  // Configuration variables from database
358  bool m_transcodeFirst {false};
359  bool m_earlyCommFlag {false};
360  bool m_runJobOnHostOnly {false};
361  int m_eitCrawlIdleStart {60};
362  int m_eitTransportTimeout {5*60};
363  int m_audioSampleRateDB {0};
364  int m_overRecordSecNrml {0};
365  int m_overRecordSecCat {0};
367 
368  // Configuration variables from setup routines
370  uint m_parentId {0};
371  bool m_isPip {false};
372 
373  // Configuration variables from database, based on inputid
377 
379 
380  // State variables
381  mutable QMutex m_setChannelLock;
382  mutable QMutex m_stateChangeLock {QMutex::Recursive};
383  mutable QMutex m_pendingRecLock {QMutex::Recursive};
384  TVState m_internalState {kState_None};
385  TVState m_desiredNextState {kState_None};
386  bool m_changeState {false};
387  bool m_pauseNotify {true};
388  uint m_stateFlags {0};
390  TuningRequest m_lastTuningRequest {0};
392  mutable QMutex m_triggerEventLoopLock {QMutex::NonRecursive};
393  QWaitCondition m_triggerEventLoopWait;
394  bool m_triggerEventLoopSignal {false};
395  mutable QMutex m_triggerEventSleepLock {QMutex::NonRecursive};
396  QWaitCondition m_triggerEventSleepWait;
397  bool m_triggerEventSleepSignal {false};
398  volatile bool m_switchingBuffer {false};
400 
401  // Current recording info
402  RecordingInfo *m_curRecording {nullptr};
403  QDateTime m_recordEndTime;
404  // RecordingInfo::MakeUniqueKey()->autoRun
405  QHash<QString,int> m_autoRunJobs;
406  int m_overrecordseconds {0};
407 
408  // Pending recording info
410 
411  // Pseudo LiveTV recording
412  RecordingInfo *m_pseudoLiveTVRecording {nullptr};
415  QWaitCondition m_triggerLiveTVDir;
417 
418  // LiveTV file chain
419  LiveTVChain *m_tvChain {nullptr};
420 
421  // RingBuffer info
422  MythMediaBuffer *m_buffer {nullptr};
423  QString m_rbFileExt {"ts"};
424 
425  public:
426  static QReadWriteLock s_inputsLock;
427  static QMap<uint,TVRec*> s_inputs;
428 
429  public:
431 
432  // General State flags
433  static const uint kFlagFrontendReady = 0x00000001;
434  static const uint kFlagRunMainLoop = 0x00000002;
435  static const uint kFlagExitPlayer = 0x00000004;
436  static const uint kFlagFinishRecording = 0x00000008;
437  static const uint kFlagErrored = 0x00000010;
438  static const uint kFlagCancelNextRecording = 0x00000020;
439 
440  // Tuning flags
442  static const uint kFlagLiveTV = 0x00000100;
444  static const uint kFlagRecording = 0x00000200;
446  static const uint kFlagAntennaAdjust = 0x00000400;
447  static const uint kFlagRec = 0x00000F00;
448 
449  // Non-recording Commands
451  static const uint kFlagEITScan = 0x00001000;
453  static const uint kFlagCloseRec = 0x00002000;
455  static const uint kFlagKillRec = 0x00004000;
456 
457  static const uint kFlagNoRec = 0x0000F000;
458  static const uint kFlagKillRingBuffer = 0x00010000;
459 
460  // Waiting stuff
461  static const uint kFlagWaitingForRecPause = 0x00100000;
462  static const uint kFlagWaitingForSignal = 0x00200000;
463  static const uint kFlagNeedToStartRecorder = 0x00800000;
464  static const uint kFlagPendingActions = 0x00F00000;
465 
466  // Running stuff
467  static const uint kFlagSignalMonitorRunning = 0x01000000;
468  static const uint kFlagEITScannerRunning = 0x04000000;
469 
470  static const uint kFlagDummyRecorderRunning = 0x10000000;
471  static const uint kFlagRecorderRunning = 0x20000000;
472  static const uint kFlagAnyRecRunning = 0x30000000;
473  static const uint kFlagAnyRunning = 0x3F000000;
474 
475  // Tuning state
476  static const uint kFlagRingBufferReady = 0x40000000;
477  static const uint kFlagDetect = 0x80000000;
478 };
479 
480 #endif
GeneralDBOptions
Definition: tv_rec.h:66
RecStatus::Type
Type
Definition: recStatus.h:16
tv.h
TVRec::m_startRecordingDeadline
QDateTime m_startRecordingDeadline
Definition: tv_rec.h:344
TuningRequest
Definition: tv_rec.h:102
PendingInfo::PendingInfo
PendingInfo()=default
TVRec::GetMajorId
uint GetMajorId(void)
Definition: tv_rec.h:236
TVRec::m_recProfileName
QString m_recProfileName
Definition: tv_rec.h:378
ChannelChangeDirection
ChannelChangeDirection
ChannelChangeDirection is an enumeration of possible channel changing directions.
Definition: tv.h:29
false
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:85
PendingInfo::m_possibleConflicts
vector< uint > m_possibleConflicts
Definition: tv_rec.h:138
TVRec::m_tuningRequests
TuningQueue m_tuningRequests
Definition: tv_rec.h:389
PictureAdjustType
PictureAdjustType
Definition: tv.h:121
title
QString title
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:633
PendingMap
QMap< uint, PendingInfo > PendingMap
Definition: tv_rec.h:140
RecordingInfo
Holds information on a TV Program one might wish to record.
Definition: recordinginfo.h:35
GeneralDBOptions::m_signalTimeout
uint m_signalTimeout
Definition: tv_rec.h:76
mythtvexp.h
TVRec::m_triggerLiveTVDir
QWaitCondition m_triggerLiveTVDir
Definition: tv_rec.h:415
ProgramMapTable
A PMT table maps a program described in the ProgramAssociationTable to various PID's which describe t...
Definition: mpegtables.h:667
GeneralDBOptions::m_inputType
QString m_inputType
Definition: tv_rec.h:73
arg
arg(title).arg(filename).arg(doDelete))
TVRec::m_overRecordCategory
QString m_overRecordCategory
Definition: tv_rec.h:366
PendingInfo::m_hasLaterShowing
bool m_hasLaterShowing
Definition: tv_rec.h:134
TVRec::ChangeChannel
void ChangeChannel(ChannelChangeDirection dir)
Changes to a channel in the 'dir' channel change direction.
Definition: tv_rec.h:206
PendingInfo::m_info
ProgramInfo * m_info
Definition: tv_rec.h:132
RecStatus::Unknown
@ Unknown
Definition: recStatus.h:32
TuningRequest::toString
QString toString(void) const
Definition: tv_rec.cpp:4840
TVRec::FrontendReady
void FrontendReady(void)
Tells TVRec that the frontend's TV class is ready for messages.
Definition: tv_rec.h:164
category
QString category
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:1419
MythMediaBuffer
Definition: mythmediabuffer.h:50
FireWireDBOptions::m_speed
int m_speed
Definition: tv_rec.h:96
CetonChannel
Definition: cetonchannel.h:23
TVRec::m_setChannelLock
QMutex m_setChannelLock
Definition: tv_rec.h:381
build_compdb.file
file
Definition: build_compdb.py:55
TVRec::GetParentId
uint GetParentId(void) const
Definition: tv_rec.h:235
mythdeque.h
hardwareprofile.distros.mythtv_data.data_mythtv.prefix
string prefix
Definition: data_mythtv.py:40
SignalMonitorListener
Definition: signalmonitorlistener.h:22
myth_deque_init
TuningRequest myth_deque_init(const TuningRequest *)
Definition: tv_rec.h:125
TVRec::StatusChannelTuned
void StatusChannelTuned(const SignalMonitorValue &) override
Signal to be sent with change change status.
Definition: tv_rec.h:250
TVRec::AllGood
void AllGood(void) override
Signal to be sent when you have a lock on all values.
Definition: tv_rec.h:249
HDHRChannel
Definition: hdhrchannel.h:21
programtypes.h
TVRec::m_recordEndTime
QDateTime m_recordEndTime
Definition: tv_rec.h:403
ASIRecorder
This is a specialization of DTVRecorder used to handle streams from ASI drivers.
Definition: asirecorder.h:56
TVRec::Stop
void Stop(void)
Tells TVRec to stop event loop.
Definition: tv_rec.h:172
kState_None
@ kState_None
None State, this is the initial state in both TV and TVRec, it indicates that we are ready to change ...
Definition: tv.h:58
GeneralDBOptions::m_channelTimeout
uint m_channelTimeout
Definition: tv_rec.h:77
TVRec::m_inputId
uint m_inputId
Definition: tv_rec.h:369
GeneralDBOptions::m_vbiDev
QString m_vbiDev
Definition: tv_rec.h:71
TVRec::m_pendingRecordings
PendingMap m_pendingRecordings
Definition: tv_rec.h:409
TVRec::GetInputId
uint GetInputId(void) const
Returns the inputid.
Definition: tv_rec.h:234
CetonRecorder
Definition: cetonrecorder.h:21
TVRec::m_autoRunJobs
QHash< QString, int > m_autoRunJobs
Definition: tv_rec.h:405
signalmonitorlistener.h
ChannelBase
Abstract class providing a generic interface to tuning hardware.
Definition: channelbase.h:32
hardwareprofile.scan.profile
profile
Definition: scan.py:99
videoouttypes.h
TuningRequest::m_progNum
int m_progNum
Definition: tv_rec.h:122
hardwareprofile.config.p
p
Definition: config.py:33
hardwareprofile.i18n.t
t
Definition: i18n.py:36
FirewireChannel
FirewireChannel Copyright (c) 2005 by Jim Westfall and Dave Abrahams Distributed as part of MythTV un...
Definition: firewirechannel.h:15
DVBDBOptions::m_dvbOnDemand
bool m_dvbOnDemand
Definition: tv_rec.h:86
DVBDBOptions::m_dvbTuningDelay
uint m_dvbTuningDelay
Definition: tv_rec.h:87
TVRec::kSignalMonitoringRate
static const uint kSignalMonitoringRate
How many milliseconds the signal monitor should wait between checks.
Definition: tv_rec.h:430
MPEGStreamData
Encapsulates data about MPEG stream and emits events for each table.
Definition: mpegstreamdata.h:86
TVRec::m_nextLiveTVDir
QString m_nextLiveTVDir
Definition: tv_rec.h:413
TVRec::m_triggerEventSleepWait
QWaitCondition m_triggerEventSleepWait
Definition: tv_rec.h:396
TVRec::StatusSignalLock
void StatusSignalLock(const SignalMonitorValue &) override
Signal to be sent as true when it is safe to begin or continue recording, and false if it may not be ...
Definition: tv_rec.h:251
GeneralDBOptions::GeneralDBOptions
GeneralDBOptions()=default
SignalMonitorValue
Definition: signalmonitorvalue.h:15
TVRec::m_liveTVStartChannel
QString m_liveTVStartChannel
Definition: tv_rec.h:416
GetState
#define GetState(a, b)
Definition: audiooutputopensles.cpp:50
f
QTextStream t & f
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:600
TVRec::m_eitScanStartTime
QDateTime m_eitScanStartTime
Definition: tv_rec.h:391
TVRec::s_inputsLock
static QReadWriteLock s_inputsLock
Definition: tv_rec.h:426
RecordingQuality
Definition: recordingquality.h:35
DTVRecorder
This is a specialization of RecorderBase used to handle MPEG-2, MPEG-4, MPEG-4 AVC,...
Definition: dtvrecorder.h:36
uint
unsigned int uint
Definition: compat.h:140
FireWireDBOptions::FireWireDBOptions
FireWireDBOptions()=default
TuningRequest::m_minorChan
uint m_minorChan
Definition: tv_rec.h:121
TVRec::m_triggerEventLoopWait
QWaitCondition m_triggerEventLoopWait
Definition: tv_rec.h:393
TVRec::IsErrored
bool IsErrored(void) const
Returns true is "errored" is true, false otherwise.
Definition: tv_rec.h:238
SignalMonitor
Signal monitoring base class.
Definition: signalmonitor.h:33
DVBRecorder
This is a specialization of DTVRecorder used to handle streams from DVB drivers.
Definition: dvbrecorder.h:22
TVRec::IsRunning
bool IsRunning(void) const
Returns true if event loop has not been told to shut down.
Definition: tv_rec.h:170
GeneralDBOptions::m_skipBtAudio
bool m_skipBtAudio
Definition: tv_rec.h:75
frm_pos_map_t
QMap< long long, long long > frm_pos_map_t
Frame # -> File offset map.
Definition: programtypes.h:46
TuningRequest::TuningRequest
TuningRequest(uint f, QString ch, QString in=QString())
Definition: tv_rec.h:108
PictureAttribute
PictureAttribute
Definition: videoouttypes.h:88
MTV_PUBLIC
#define MTV_PUBLIC
Definition: mythtvexp.h:15
TuningRequest::m_majorChan
uint m_majorChan
Definition: tv_rec.h:120
GeneralDBOptions::m_audioSampleRate
int m_audioSampleRate
Definition: tv_rec.h:74
recordinginfo.h
DVBChannel
Provides interface to the tuning hardware when using DVB drivers.
Definition: dvbchannel.h:30
TuningRequest::m_flags
uint m_flags
Definition: tv_rec.h:116
TVRec::m_nextLiveTVDirLock
QMutex m_nextLiveTVDirLock
Definition: tv_rec.h:414
TVRec::m_signalEventCmdTimeout
QDateTime m_signalEventCmdTimeout
Definition: tv_rec.h:341
Buffer
Definition: MythExternControl.h:37
ProgramInfo
Holds information on recordings and videos.
Definition: programinfo.h:68
DVBDBOptions::m_dvbEitScan
bool m_dvbEitScan
Definition: tv_rec.h:88
TVState
TVState
TVState is an enumeration of the states used by TV and TVRec.
Definition: tv.h:51
TVRec::m_genOpt
GeneralDBOptions m_genOpt
Definition: tv_rec.h:374
dir
QDir dir
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:1171
MythDeque< TuningRequest >
TVRec::m_dvbOpt
DVBDBOptions m_dvbOpt
Definition: tv_rec.h:375
RecorderBase
This is the abstract base class for supporting recorder hardware.
Definition: recorderbase.h:74
DVBDBOptions
Definition: tv_rec.h:82
GeneralDBOptions::m_videoDev
QString m_videoDev
Definition: tv_rec.h:70
FireWireDBOptions::m_connection
int m_connection
Definition: tv_rec.h:97
TVRec::StatusSignalStrength
void StatusSignalStrength(const SignalMonitorValue &) override
Signal to be sent with an actual signal value.
Definition: tv_rec.h:252
TVRec
This is the coordinating class of the Recorder Subsystem.
Definition: tv_rec.h:143
FireWireDBOptions
Definition: tv_rec.h:92
TVRec::kAutoRunProfile
@ kAutoRunProfile
Definition: tv_rec.h:325
TuningRequest::IsOnSameMultiplex
bool IsOnSameMultiplex(void) const
Definition: tv_rec.h:113
GeneralDBOptions::m_audioDev
QString m_audioDev
Definition: tv_rec.h:72
MThread
This is a wrapper around QThread that does several additional things.
Definition: mthread.h:49
TVRec::m_signalMonitorDeadline
QDateTime m_signalMonitorDeadline
Definition: tv_rec.h:345
mthread.h
PendingInfo::m_doNotAsk
bool m_doNotAsk
Definition: tv_rec.h:137
DTVSignalMonitor
This class is intended to detect the presence of needed tables.
Definition: dtvsignalmonitor.h:20
inputinfo.h
RecStatus
Definition: recStatus.h:12
DVBDBOptions::DVBDBOptions
DVBDBOptions()=default
InputInfo
Definition: inputinfo.h:15
TuningRequest::TuningRequest
TuningRequest(uint f, RecordingInfo *p)
Definition: tv_rec.h:106
HDHRRecorder
Definition: hdhrrecorder.h:20
mythtimer.h
BrowseDirection
BrowseDirection
Used to request ProgramInfo for channel browsing.
Definition: tv.h:38
PendingInfo::m_ask
bool m_ask
Definition: tv_rec.h:136
TVRec::GetFlags
uint GetFlags(void) const
Definition: tv_rec.h:245
PendingInfo::m_canceled
bool m_canceled
Definition: tv_rec.h:135
DTVChannel
Class providing a generic interface to digital tuning hardware.
Definition: dtvchannel.h:35
TVRec::IsPlaying
bool IsPlaying(void)
Returns "state == kState_RecordingPreRecorded".
Definition: tv_rec.h:176
TuningRequest::TuningRequest
TuningRequest(uint f)
Definition: tv_rec.h:104
RecordingProfile
Definition: recordingprofile.h:40
PendingInfo::m_recordingStart
QDateTime m_recordingStart
Definition: tv_rec.h:133
TuningRequest::m_channel
QString m_channel
Definition: tv_rec.h:118
TVRec::m_fwOpt
FireWireDBOptions m_fwOpt
Definition: tv_rec.h:376
TVRec::HasFlags
bool HasFlags(uint f) const
Definition: tv_rec.h:287
V4LChannel
Implements tuning for TV cards using the V4L driver API, both versions 1 and 2.
Definition: v4lchannel.h:37
TuningRequest::m_input
QString m_input
Definition: tv_rec.h:119
GeneralDBOptions::m_waitForSeqstart
bool m_waitForSeqstart
Definition: tv_rec.h:78
TuningRequest::m_program
RecordingInfo * m_program
Definition: tv_rec.h:117
TVRec::AutoRunInitType
AutoRunInitType
Definition: tv_rec.h:325
EITScanner
Acts as glue between ChannelBase, EITSource, and EITHelper.
Definition: eitscanner.h:31
PendingInfo
Definition: tv_rec.h:128
TVRec::s_inputs
static QMap< uint, TVRec * > s_inputs
Definition: tv_rec.h:427
FireWireDBOptions::m_model
QString m_model
Definition: tv_rec.h:98
LiveTVChain
Keeps track of recordings in a current LiveTV instance.
Definition: livetvchain.h:32
TVRec::IsRecording
bool IsRecording(void)
Returns "state == kState_RecordingRecordedOnly".
Definition: tv_rec.h:179
TVRec::m_preFailDeadline
QDateTime m_preFailDeadline
Definition: tv_rec.h:348