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