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