MythTV  master
tv_play.h
Go to the documentation of this file.
1 // -*- Mode: c++ -*-
2 
3 #ifndef TVPLAY_H
4 #define TVPLAY_H
5 
6 // C++
7 #include <cstdint>
8 #include <utility>
9 #include <vector>
10 using namespace std;
11 
12 // Qt
13 #include <QReadWriteLock>
14 #include <QWaitCondition>
15 #include <QStringList>
16 #include <QDateTime>
17 #include <QObject>
18 #include <QRegExp>
19 #include <QString>
20 #include <QMutex>
21 #include <QMap>
22 #include <QSet>
23 
24 // MythTV
25 #include "mythdeque.h"
26 #include "tv.h"
27 #include "channelinfo.h"
28 #include "videoouttypes.h"
29 #include "volumebase.h"
30 #include "inputinfo.h"
31 #include "channelgroup.h"
32 #include "mythtimer.h"
33 #include "osd.h"
34 #include "decoders/decoderbase.h"
35 #include "mythmiscutil.h"
36 
37 class QEvent;
38 class QKeyEvent;
39 class QTimerEvent;
40 class QDateTime;
41 class QDomDocument;
42 class QDomNode;
43 class OSD;
44 class RemoteEncoder;
45 class MythPlayer;
46 class DetectLetterbox;
47 class MythMediaBuffer;
48 class ProgramInfo;
49 class PlayerContext;
50 class TvPlayWindow;
51 class TV;
52 class TVBrowseHelper;
53 struct osdInfo;
54 
55 using EMBEDRETURNVOID = void (*) (void *, bool);
56 using EMBEDRETURNVOIDEPG = void (*) (uint, const QString &, const QDateTime, TV *, bool, bool, int);
57 using EMBEDRETURNVOIDFINDER = void (*) (TV *, bool, bool);
58 using EMBEDRETURNVOIDSCHEDIT = void (*) (const ProgramInfo *, void *);
59 
60 // Locking order
61 //
62 // playerLock -> askAllowLock -> osdLock
63 // -> progListLock -> osdLock
64 // -> chanEditMapLock -> osdLock
65 // -> lastProgramLock
66 // -> recorderPlaybackInfoLock
67 // -> timerIdLock
68 // -> mainLoopCondLock
69 // -> channelGroupLock
70 //
71 // When holding one of these locks, you may lock any lock of the locks to
72 // the right of the current lock, but may not lock any lock to the left of
73 // this lock (which will cause a deadlock). Nor should you lock any other
74 // lock in the TV class without first adding it to the locking order list
75 // above.
76 //
77 // Note: Taking a middle lock such as askAllowLock, without taking a
78 // playerLock first does not violate these rules, but once you are
79 // holding it, you cannot later lock playerLock.
80 //
81 // It goes without saying that any locks outside of this class should only
82 // be taken one at a time, and should be taken last and released first of
83 // all the locks required for any algorithm. (Unless you use tryLock and
84 // release all locks if it can't gather them all at once, see the
85 // "multi_lock()" function as an example; but this is not efficient nor
86 // desirable and should be avoided when possible.)
87 //
88 
95 };
96 
101 {
104  kNoTuners = 2,
105 };
106 
107 enum {
114 };
115 
117 {
118  public:
119  AskProgramInfo() = default;
120  AskProgramInfo(QDateTime e, bool r, bool l, ProgramInfo *i) :
121  m_expiry(std::move(e)), m_hasRec(r), m_hasLater(l), m_info(i) {}
122 
123  QDateTime m_expiry;
124  bool m_hasRec {false};
125  bool m_hasLater {false};
126  bool m_isInSameInputGroup {false};
127  bool m_isConflicting {false};
128  ProgramInfo *m_info {nullptr};
129 };
130 
135 };
140 };
141 
146 };
147 
148 class MenuBase;
149 
151 {
152 public:
153  // Constructor for a menu element.
155  const QDomNode &node,
156  QString menuName,
158  bool doDisplay) :
159  m_menu(menu),
160  m_node(node),
161  m_category(kMenuCategoryMenu),
162  m_menuName(std::move(menuName)),
163  m_showContext(kMenuShowAlways),
164  m_currentContext(current),
165  m_action(""),
166  m_actionText(""),
167  m_doDisplay(doDisplay) {}
168  // Constructor for an item element.
170  const QDomNode &node,
171  MenuShowContext showContext,
173  QString action,
174  QString actionText,
175  bool doDisplay) :
176  m_menu(menu),
177  m_node(node),
178  m_category(kMenuCategoryItem),
179  m_menuName(""),
180  m_showContext(showContext),
181  m_currentContext(current),
182  m_action(std::move(action)),
183  m_actionText(std::move(actionText)),
184  m_doDisplay(doDisplay) {}
185  // Constructor for an itemlist element.
187  const QDomNode &node,
188  MenuShowContext showContext,
190  QString action,
191  bool doDisplay) :
192  m_menu(menu),
193  m_node(node),
194  m_category(kMenuCategoryItemlist),
195  m_menuName(""),
196  m_showContext(showContext),
197  m_currentContext(current),
198  m_action(std::move(action)),
199  m_actionText(""),
200  m_doDisplay(doDisplay) {}
201  const MenuBase &m_menu;
202  const QDomNode &m_node;
204  const QString m_menuName;
207  const QString m_action;
208  const QString m_actionText;
210 };
211 
213 {
214 public:
215  virtual bool MenuItemDisplay(const MenuItemContext &c) = 0;
216 };
217 
218 class MenuBase
219 {
220 public:
221  MenuBase() = default;
222  ~MenuBase();
223  bool LoadFromFile(const QString &filename,
224  const QString &menuname,
225  const char *translationContext,
226  const QString &keyBindingContext);
227  bool LoadFromString(const QString &text,
228  const QString &menuname,
229  const char *translationContext,
230  const QString &keyBindingContext);
231  bool IsLoaded(void) const { return (m_document != nullptr); }
232  QDomElement GetRoot(void) const;
233  QString Translate(const QString &text) const;
234  bool Show(const QDomNode &node, const QDomNode &selected,
235  MenuItemDisplayer &displayer,
236  bool doDisplay = true) const;
237  QString GetName(void) const { return m_menuName; }
238  const char *GetTranslationContext(void) const {
239  return m_translationContext;
240  }
241  const QString &GetKeyBindingContext(void) const {
242  return m_keyBindingContext;
243  }
244 private:
245  bool LoadFileHelper(const QString &filename,
246  const QString &menuname,
247  const char *translationContext,
248  const QString &keyBindingContext,
249  int includeLevel);
250  bool LoadStringHelper(const QString &text,
251  const QString &menuname,
252  const char *translationContext,
253  const QString &keyBindingContext,
254  int includeLevel);
255  void ProcessIncludes(QDomElement &root, int includeLevel);
256  QDomDocument *m_document {nullptr};
257  const char *m_translationContext {""};
258  QString m_menuName;
260 };
261 
280 class MTV_PUBLIC TV : public QObject, public MenuItemDisplayer
281 {
282  friend class PlaybackBox;
283  friend class GuideGrid;
284  friend class ProgFinder;
285  friend class ViewScheduled;
286  friend class ScheduleEditor;
287  friend class TvPlayWindow;
288  friend class TVBrowseHelper;
289 
290  Q_OBJECT
291  public:
292  // Check whether we already have a TV object
293  static bool IsTVRunning(void);
294  static TV* CurrentTVInstance(void) { return gTV; }
295  // Start media playback
296  static bool StartTV(ProgramInfo *tvrec,
297  uint flags,
298  const ChannelInfoList &selection = ChannelInfoList());
299  static bool IsPaused(void);
300 
301  // Public event handling
302  bool event(QEvent *e) override; // QObject
303  bool eventFilter(QObject *o, QEvent *e) override; // QObject
304 
305  // Public PlaybackBox methods
307  bool IsSameProgram(int player_idx, const ProgramInfo *rcinfo) const;
308 
309  // Public recorder methods
310  void FinishRecording(int player_ctx);
311 
312  // static functions
313  static void InitKeys(void);
314  static void ReloadKeys(void);
315  static void SetFuncPtr(const char *string, void *lptr);
316  static int ConfiguredTunerCards(void);
317  static bool IsTunable(uint chanid);
318 
321  {
322  public:
323  SleepTimerInfo(QString str, unsigned long secs)
324  : dispString(std::move(str)), seconds(secs) { ; }
325  QString dispString;
326  unsigned long seconds;
327  };
328 
329  public slots:
330  void HandleOSDClosed(int osdType);
331  void timerEvent(QTimerEvent *te) override; // QObject
332  void StopPlayback(void);
333 
334  signals:
336 
337  protected:
338  // Protected event handling
339  void customEvent(QEvent *e) override; // QObject
340 
341  static QStringList lastProgramStringList;
347 
348  protected slots:
349  void onApplicationStateChange(Qt::ApplicationState state);
350 
351  private:
352  TV();
353  ~TV() override;
354  static TV* GetTV(void);
355  static void ReleaseTV(TV* tv);
356  static QMutex *gTVLock;
357  static TV *gTV;
358 
359  // Private initialisation
360  bool Init(bool createWindow = true);
361  void InitFromDB(void);
362  static QList<QKeyEvent> ConvertScreenPressKeyMap(const QString& keyList);
363 
364  // Top level playback methods
365  bool LiveTV(bool showDialogs, const ChannelInfoList &selection);
366  int Playback(const ProgramInfo &rcinfo);
367  void PlaybackLoop(void);
368 
369  // Private event handling
370  bool ProcessKeypressOrGesture(PlayerContext *actx, QEvent *e);
371  bool TranslateKeyPressOrGesture(const QString &context, QEvent *e,
372  QStringList &actions, bool isLiveTV,
373  bool allowJumps = true);
374  bool TranslateGesture(const QString &context, MythGestureEvent *e,
375  QStringList &actions, bool isLiveTV);
376  void ProcessNetworkControlCommand(PlayerContext *ctx, const QString &command);
377 
378  bool HandleTrackAction(PlayerContext *ctx, const QString &action);
379  bool ActiveHandleAction(PlayerContext *ctx,
380  const QStringList &actions,
381  bool isDVD, bool isDVDStillFrame);
382  bool BrowseHandleAction(PlayerContext *ctx, const QStringList &actions);
383  void OSDDialogEvent(int result, const QString& text, QString action);
384  bool PxPHandleAction(PlayerContext *ctx,const QStringList &actions);
385  bool ToggleHandleAction(PlayerContext *ctx,
386  const QStringList &actions, bool isDVD);
387  bool FFRewHandleAction(PlayerContext *ctx, const QStringList &actions);
388  bool ActivePostQHandleAction(PlayerContext *ctx, const QStringList &actions);
389  bool HandleJumpToProgramAction(PlayerContext *ctx,
390  const QStringList &actions);
391  bool SeekHandleAction(PlayerContext *actx, const QStringList &actions,
392  bool isDVD);
393  bool TimeStretchHandleAction(PlayerContext *ctx,
394  const QStringList &actions);
395  static bool DiscMenuHandleAction(PlayerContext *ctx, const QStringList &actions);
396  bool Handle3D(PlayerContext *ctx, const QString &action);
397 
398  // Timers and timer events
399  int StartTimer(int interval, int line);
400  void KillTimer(int id);
401 
402  void SetSpeedChangeTimer(uint when, int line);
403  void HandleEndOfPlaybackTimerEvent(void);
404  void HandleIsNearEndWhenEmbeddingTimerEvent(void);
405  void HandleEndOfRecordingExitPromptTimerEvent(void);
406  void HandleVideoExitDialogTimerEvent(void);
407  void HandlePseudoLiveTVTimerEvent(void);
408  void HandleSpeedChangeTimerEvent(void);
409  void ToggleSleepTimer(const PlayerContext *ctx);
410  void ToggleSleepTimer(const PlayerContext *ctx, const QString &time);
411  bool HandlePxPTimerEvent(void);
412  bool HandleLCDTimerEvent(void);
413  void HandleLCDVolumeTimerEvent(void);
414  void HandleSaveLastPlayPosEvent();
415 
416  // Commands used by frontend UI screens (PlaybackBox, GuideGrid etc)
417  void EditSchedule(const PlayerContext *ctx,
418  int editType = kScheduleProgramGuide);
419  bool StartEmbedding(const QRect &embedRect);
420  void StopEmbedding(void);
421  static bool IsTunable(const PlayerContext *ctx, uint chanid);
422  static QSet<uint> IsTunableOn(const PlayerContext *ctx, uint chanid);
423  void ChangeChannel(const PlayerContext *ctx, const ChannelInfoList &options);
424  void DoEditSchedule(int editType = kScheduleProgramGuide);
425  QString GetRecordingGroup(int player_idx) const;
426  void ChangeVolume(PlayerContext *ctx, bool up, int newvolume = -1);
427  void ToggleMute(PlayerContext *ctx, bool muteIndividualChannels = false);
428  void UpdateChannelList(int groupID);
429 
430  // Lock handling
431  OSD *GetOSDL(const char *file, int location);
432  OSD *GetOSDL(const PlayerContext *ctx, const char *file, int location);
433  void ReturnOSDLock(const PlayerContext *ctx, OSD *&osd);
434  PlayerContext *GetPlayerWriteLock(
435  int which, const char *file, int location);
436  PlayerContext *GetPlayerReadLock(
437  int which, const char *file, int location);
438  const PlayerContext *GetPlayerReadLock(
439  int which, const char *file, int location) const;
440  PlayerContext *GetPlayerHaveLock(
441  PlayerContext *locked_context,
442  int which, const char *file, int location);
443  const PlayerContext *GetPlayerHaveLock(
444  const PlayerContext *locked_context,
445  int which, const char *file, int location) const;
446  void ReturnPlayerLock(PlayerContext *&ctx);
447  void ReturnPlayerLock(const PlayerContext *&ctx) const;
448 
449  // Other toggles
450  void ToggleAutoExpire(PlayerContext *ctx);
451  void QuickRecord(PlayerContext *ctx);
452 
453  // General TV state
454  static bool StateIsRecording(TVState state);
455  static bool StateIsPlaying(TVState state);
456  static bool StateIsLiveTV(TVState state);
457 
458  TVState GetState(int player_idx) const;
459  static TVState GetState(const PlayerContext *actx);
460  void HandleStateChange(PlayerContext *mctx, PlayerContext *ctx);
461  void GetStatus(void);
462  void ForceNextStateNone(PlayerContext *ctx);
463  void ScheduleStateChange(PlayerContext *ctx);
464  void SetErrored(PlayerContext *ctx);
465  void setInPlayList(bool setting) { m_inPlaylist = setting; }
466  void setUnderNetworkControl(bool setting) { m_underNetworkControl = setting; }
467  void PrepToSwitchToRecordedProgram(PlayerContext *ctx,
468  const ProgramInfo &p);
472  kBookmarkAuto // set iff db_playback_exit_prompt==2
473  };
474  void PrepareToExitPlayer(PlayerContext *ctx, int line,
475  BookmarkAction bookmark = kBookmarkAuto);
476  void SetExitPlayer(bool set_it, bool wants_to);
477 
478  bool RequestNextRecorder(PlayerContext *ctx, bool showDialogs,
479  const ChannelInfoList &sel = ChannelInfoList());
481 
482  bool StartRecorder(PlayerContext *ctx, int maxWait=-1);
483  void StopStuff(PlayerContext *mctx, PlayerContext *ctx,
484  bool stopRingBuffer, bool stopPlayer, bool stopRecorder);
485  void TeardownPlayer(PlayerContext *mctx, PlayerContext *ctx);
486 
487 
488  bool StartPlayer(PlayerContext *mctx, PlayerContext *ctx,
489  TVState desiredState);
490 
491  vector<long long> TeardownAllPlayers(PlayerContext *lctx);
492  void RestartAllPlayers(PlayerContext *lctx,
493  const vector<long long> &pos,
494  MuteState mctx_mute);
495  void RestartMainPlayer(PlayerContext *mctx);
496 
498  bool IsSwitchingCards(void) const { return m_switchToRec; }
500  bool getAllowRerecord(void) const { return m_allowRerecord; }
503  bool getEndOfRecording(void) const { return m_endOfRecording; }
506  bool getJumpToProgram(void) const { return m_jumpToProgram; }
507  static bool IsDeleteAllowed(const PlayerContext *ctx);
508 
509  // Channels
510  static void ToggleChannelFavorite(PlayerContext *ctx);
511  static void ToggleChannelFavorite(PlayerContext *ctx, const QString &changroup_name);
512  void ChangeChannel(PlayerContext *ctx, ChannelChangeDirection direction);
513  void ChangeChannel(PlayerContext *ctx, uint chanid, const QString &channum);
514 
515  void ShowPreviousChannel(PlayerContext *ctx);
516  void PopPreviousChannel(PlayerContext *ctx, bool immediate_change);
517 
518  // key queue commands
519  void AddKeyToInputQueue(PlayerContext *ctx, char key);
520  void ClearInputQueues(const PlayerContext *ctx, bool hideosd);
521  bool CommitQueuedInput(PlayerContext *ctx);
522  bool ProcessSmartChannel(const PlayerContext *ctx, QString &inputStr);
523 
524  // query key queues
525  bool HasQueuedInput(void) const
526  { return !GetQueuedInput().isEmpty(); }
527  bool HasQueuedChannel(void) const
528  { return m_queuedChanID || !GetQueuedChanNum().isEmpty(); }
529 
530  // get queued up input
531  QString GetQueuedInput(void) const;
532  int GetQueuedInputAsInt(bool *ok = nullptr, int base = 10) const;
533  QString GetQueuedChanNum(void) const;
534  uint GetQueuedChanID(void) const { return m_queuedChanID; }
535 
536  // Source and input
537  void SwitchSource(PlayerContext *ctx, uint source_direction);
538  void SwitchInputs(PlayerContext *ctx,
539  uint chanid = 0, QString channum = "", uint inputid = 0);
540 
541  // Pause/play
542  void PauseLiveTV(PlayerContext *ctx);
543  void UnpauseLiveTV(PlayerContext *ctx, bool bQuietly = false);
544  void DoPlay(PlayerContext *ctx);
545  float DoTogglePauseStart(PlayerContext *ctx);
546  void DoTogglePauseFinish(PlayerContext *ctx, float time, bool showOSD);
547  void DoTogglePause(PlayerContext *ctx, bool showOSD);
548  vector<bool> DoSetPauseState(PlayerContext *lctx, const vector<bool>&pause);
549  static bool ContextIsPaused(PlayerContext *ctx, const char *file, int location);
550 
551  // Program jumping stuff
552  void SetLastProgram(const ProgramInfo *rcinfo);
553  ProgramInfo *GetLastProgram(void) const;
554 
555  // Seek, skip, jump, speed
556  void DoSeek(PlayerContext *ctx, float time, const QString &mesg,
557  bool timeIsOffset, bool honorCutlist);
558  bool DoPlayerSeek(PlayerContext *ctx, float time);
559  bool DoPlayerSeekToFrame(PlayerContext *ctx, uint64_t target);
561  ARBSEEK_SET = 0,
564  ARBSEEK_END
565  };
566  void DoSeekAbsolute(PlayerContext *ctx, long long seconds, bool honorCutlist);
567  void DoArbSeek(PlayerContext *ctx, ArbSeekWhence whence, bool honorCutlist);
568  void DoJumpFFWD(PlayerContext *ctx);
569  void DoJumpRWND(PlayerContext *ctx);
570  void DoSeekFFWD(PlayerContext *ctx);
571  void DoSeekRWND(PlayerContext *ctx);
572  void NormalSpeed(PlayerContext *ctx);
573  void ChangeSpeed(PlayerContext *ctx, int direction);
574  void ToggleTimeStretch(PlayerContext *ctx);
575  void ChangeTimeStretch(PlayerContext *ctx, int dir, bool allowEdit = true);
576  void DVDJumpBack(PlayerContext *ctx);
577  void DVDJumpForward(PlayerContext *ctx);
578  float StopFFRew(PlayerContext *ctx);
579  void ChangeFFRew(PlayerContext *ctx, int direction);
580  void SetFFRew(PlayerContext *ctx, int index);
581 
582  // Private audio methods
583  void EnableUpmix(PlayerContext *ctx, bool enable, bool toggle = false);
584  void ChangeAudioSync(PlayerContext *ctx, int dir, int newsync = -9999);
585  bool AudioSyncHandleAction(PlayerContext *ctx, const QStringList &actions);
586  static void PauseAudioUntilBuffered(PlayerContext *ctx);
587 
588  // Chapters, titles and angles
589  static int GetNumChapters(const PlayerContext *ctx);
590  static void GetChapterTimes(const PlayerContext *ctx, QList<long long> &times);
591  static int GetCurrentChapter(const PlayerContext *ctx);
592  static int GetNumTitles(const PlayerContext *ctx);
593  static int GetCurrentTitle(const PlayerContext *ctx);
594  static int GetTitleDuration(const PlayerContext *ctx, int title);
595  static QString GetTitleName(const PlayerContext *ctx, int title);
596  void DoSwitchTitle(PlayerContext *ctx, int title);
597  static int GetNumAngles(const PlayerContext *ctx);
598  static int GetCurrentAngle(const PlayerContext *ctx);
599  static QString GetAngleName(const PlayerContext *ctx, int angle);
600  void DoSwitchAngle(PlayerContext *ctx, int angle);
601  void DoJumpChapter(PlayerContext *ctx, int chapter);
602 
603  // Commercial skipping
604  void DoSkipCommercials(PlayerContext *ctx, int direction);
605  void SetAutoCommercialSkip(const PlayerContext *ctx,
606  CommSkipMode skipMode = kCommSkipOff);
607 
608  // Transcode
609  void DoQueueTranscode(PlayerContext *ctx, const QString& profile);
610 
611  // Bookmarks
612  static bool IsBookmarkAllowed(const PlayerContext *ctx);
613  void SetBookmark(PlayerContext* ctx, bool clear = false);
614 
615  // OSD
616  bool ClearOSD(const PlayerContext *ctx);
617  void ToggleOSD(PlayerContext *ctx, bool includeStatusOSD);
618  void ToggleOSDDebug(PlayerContext *ctx);
619  void UpdateOSDDebug(const PlayerContext *ctx);
620  void UpdateOSDProgInfo(const PlayerContext *ctx, const char *whichInfo);
621  void UpdateOSDStatus(const PlayerContext *ctx, const QString& title, const QString& desc,
622  const QString& value, int type, const QString& units,
623  int position = 0,
625  void UpdateOSDStatus(const PlayerContext *ctx, osdInfo &info,
626  int type, enum OSDTimeout timeout);
627 
628  void UpdateOSDSeekMessage(const PlayerContext *ctx,
629  const QString &mesg, enum OSDTimeout timeout);
630  void UpdateOSDInput(const PlayerContext *ctx);
631  void UpdateOSDSignal(PlayerContext *ctx, const QStringList &strlist);
632  void UpdateOSDTimeoutMessage(PlayerContext *ctx);
634  void SetUpdateOSDPosition(bool set_it);
635 
636  // Captions/subtitles
637  bool SubtitleZoomHandleAction(PlayerContext *ctx,
638  const QStringList &actions);
639  void ChangeSubtitleZoom(PlayerContext *ctx, int dir);
640  bool SubtitleDelayHandleAction(PlayerContext *ctx,
641  const QStringList &actions);
642  void ChangeSubtitleDelay(PlayerContext *ctx, int dir);
643 
644  // PxP handling
645  bool CreatePBP(PlayerContext *lctx, const ProgramInfo *info);
646  bool CreatePIP(PlayerContext *lctx, const ProgramInfo *info);
647  bool ResizePIPWindow(PlayerContext *ctx);
648  bool IsPBPSupported(const PlayerContext *ctx = nullptr) const;
649  bool IsPIPSupported(const PlayerContext *ctx = nullptr) const;
650  void PxPToggleView( PlayerContext *actx, bool wantPBP);
651  void PxPCreateView( PlayerContext *actx, bool wantPBP);
652  void PxPTeardownView(PlayerContext *actx);
653  void PxPToggleType( PlayerContext *mctx, bool wantPBP);
654  void PxPSwap( PlayerContext *mctx, PlayerContext *pipctx);
655  bool PIPAddPlayer( PlayerContext *mctx, PlayerContext *ctx);
656  static bool PIPRemovePlayer(PlayerContext *mctx, PlayerContext *ctx);
657  void PBPRestartMainPlayer(PlayerContext *mctx);
658  void SetActive(PlayerContext *lctx, int index, bool osd_msg);
659 
660  // Video controls
661  void ToggleMoveBottomLine(PlayerContext *ctx);
662  void SaveBottomLine(PlayerContext *ctx);
663  void ToggleAspectOverride(PlayerContext *ctx,
664  AspectOverrideMode aspectMode = kAspect_Toggle);
665  void ToggleAdjustFill(PlayerContext *ctx,
666  AdjustFillMode adjustfillMode = kAdjustFill_Toggle);
667  static void DoToggleNightMode(const PlayerContext *ctx);
668  void DoTogglePictureAttribute(const PlayerContext *ctx,
670  void DoChangePictureAttribute(
671  PlayerContext *ctx,
673  bool up, int newvalue = -1);
674  bool PictureAttributeHandleAction(PlayerContext *ctx,
675  const QStringList &actions);
676  static PictureAttribute NextPictureAdjustType(
678  static void HandleDeinterlacer(PlayerContext* ctx, const QString &action);
679  void OverrideScan(PlayerContext *Context, FrameScanType Scan);
680 
681  // Sundry on screen
682  static void ITVRestart(PlayerContext *ctx, bool isLive);
683  void EnableVisualisation(const PlayerContext *ctx, bool enable, bool toggle = false,
684  const QString &action = QString(""));
685 
686  // Manual zoom mode
687  void SetManualZoom(const PlayerContext *ctx, bool zoomON, const QString& desc);
688  bool ManualZoomHandleAction(PlayerContext *actx,
689  const QStringList &actions);
690 
691  // Channel editing support
692  void StartChannelEditMode(PlayerContext *ctx);
693  bool HandleOSDChannelEdit(PlayerContext *ctx, const QString& action);
694  static void ChannelEditAutoFill(const PlayerContext *ctx, InfoMap &infoMap);
695  static void ChannelEditXDSFill(const PlayerContext *ctx, InfoMap &infoMap);
696 
697  // General dialog handling
698  bool DialogIsVisible(PlayerContext *ctx, const QString &dialog);
699  void HandleOSDInfo(PlayerContext *ctx, const QString& action);
700  void ShowNoRecorderDialog(const PlayerContext *ctx,
701  NoRecorderMsg msgType = kNoRecorders);
702 
703  // AskAllow dialog handling
704  void ShowOSDAskAllow(PlayerContext *ctx);
705  void HandleOSDAskAllow(PlayerContext *ctx, const QString& action);
706  void AskAllowRecording(PlayerContext *ctx, const QStringList &msg,
707  int timeuntil, bool hasrec, bool haslater);
708 
709  // Program editing support
710  void ShowOSDCutpoint(PlayerContext *ctx, const QString &type);
711  bool HandleOSDCutpoint(PlayerContext *ctx, const QString& action);
712  void StartProgramEditMode(PlayerContext *ctx);
713 
714  // Already editing dialog
715  void ShowOSDAlreadyEditing(PlayerContext *ctx);
716  void HandleOSDAlreadyEditing(PlayerContext *ctx, const QString& action,
717  bool was_paused);
718 
719  // Sleep dialog handling
720  void ShowOSDSleep(void);
721  void HandleOSDSleep(PlayerContext *ctx, const QString& action);
722  void SleepDialogTimeout(void);
723 
724  // Idle dialog handling
725  void ShowOSDIdle(void);
726  void HandleOSDIdle(PlayerContext *ctx, const QString& action);
727  void IdleDialogTimeout(void);
728 
729  // Exit/delete dialog handling
730  void ShowOSDStopWatchingRecording(PlayerContext *ctx);
731  void ShowOSDPromptDeleteRecording(PlayerContext *ctx, const QString& title,
732  bool force = false);
733  bool HandleOSDVideoExit(PlayerContext *ctx, const QString& action);
734 
735  // Navigation Dialog
736  void StartOsdNavigation(PlayerContext *ctx);
737  void UpdateNavDialog(PlayerContext *ctx);
738 
739  // Menu dialog
740  void ShowOSDMenu(bool isCompact = false);
741 
742  void FillOSDMenuJumpRec (PlayerContext* ctx, const QString &category = "",
743  int level = 0, const QString &selected = "");
744 
745  void PlaybackMenuShow(const MenuBase &menu,
746  const QDomNode &node, const QDomNode &selected);
748  const QDomNode &node, const QDomNode &selected);
749  bool MenuItemDisplay(const MenuItemContext &c) override; // MenuItemDisplayer
750  bool MenuItemDisplayPlayback(const MenuItemContext &c);
751  bool MenuItemDisplayCutlist(const MenuItemContext &c);
752  void PlaybackMenuInit(const MenuBase &menu);
753  void PlaybackMenuDeinit(const MenuBase &menu);
754  static void MenuStrings(void);
755  void MenuLazyInit(void *field);
756 
757  // LCD
758  void UpdateLCD(void);
759  void ShowLCDChannelInfo(const PlayerContext *ctx);
760  void ShowLCDDVDInfo(const PlayerContext *ctx);
761 
762  // Other stuff
763  int GetLastRecorderNum(int player_idx) const;
764  static QStringList GetValidRecorderList(uint chanid);
765  static QStringList GetValidRecorderList(const QString &channum);
766  static QStringList GetValidRecorderList(uint, const QString&);
767 
768  static TVState RemoveRecording(TVState state);
769  void RestoreScreenSaver(const PlayerContext *ctx);
770 
771  // for temp debugging only..
772  int find_player_index(const PlayerContext *ctx) const;
773  static QString GetLiveTVIndex(const PlayerContext *ctx);
774 
775  private:
776  // Configuration variables from database
777  QString m_baseFilters;
778  QString m_dbChannelFormat {"<num> <sign>"};
779  uint m_dbIdleTimeout {0};
780  int m_dbPlaybackExitPrompt {0};
781  uint m_dbAutoexpireDefault {0};
782  bool m_dbAutoSetWatched {false};
783  bool m_dbEndOfRecExitPrompt {false};
784  bool m_dbJumpPreferOsd {true};
785  bool m_dbUseGuiSizeForTv {false};
786  bool m_dbUseVideoModes {false};
787  bool m_dbClearSavedPosition {false};
788  bool m_dbRunJobsOnRemote {false};
789  bool m_dbContinueEmbedded {false};
790  bool m_dbRunFrontendInWindow {false};
791  bool m_dbBrowseAlways {false};
792  bool m_dbBrowseAllTuners {false};
793  bool m_dbUseChannelGroups {false};
794  bool m_dbRememberLastChannelGroup {false};
796 
797  bool m_tryUnflaggedSkip {false};
798 
799  bool m_smartForward {false};
800  float m_ffRewRepos {1.0F};
801  bool m_ffRewReverse {false};
802  vector<int> m_ffRewSpeeds;
803 
804  uint m_vbimode {VBIMode::None};
805 
806  QElapsedTimer m_ctorTime;
807  uint m_switchToInputId {0};
808 
810  bool m_initFromDBDone {false};
811  QWaitCondition m_initFromDBWait;
812 
815  mutable bool m_wantsToQuit {true};
816  bool m_stretchAdjustment {false};
817  bool m_audiosyncAdjustment {false};
818  bool m_subtitleZoomAdjustment {false};
819  bool m_subtitleDelayAdjustment {false};
820  bool m_editMode {false};
821  bool m_zoomMode {false};
822  bool m_sigMonMode {false};
823  bool m_endOfRecording {false};
824  bool m_requestDelete {false};
825  bool m_allowRerecord {false};
826  bool m_doSmartForward {false};
827  bool m_queuedTranscode {false};
831  PictureAttribute m_adjustingPictureAttribute {kPictureAttribute_None};
832 
833  // Ask Allow state
834  QMap<QString,AskProgramInfo> m_askAllowPrograms;
835  QMutex m_askAllowLock {QMutex::Recursive};
836 
839  QMap<QString,ProgramList> m_progLists;
840 
841  mutable QMutex m_chanEditMapLock {QMutex::Recursive};
843 
846  vector<SleepTimerInfo> m_sleepTimes;
847  uint m_sleepIndex {0};
848  uint m_sleepTimerTimeout {0};
849  int m_sleepTimerId {0};
850  int m_sleepDialogTimerId {0};
851  int m_idleTimerId {0};
853  int m_idleDialogTimerId {0};
854 
857 
858  // CC/Teletex input state variables
860  bool m_ccInputMode {false};
861 
862  // Arbitrary Seek input state variables
864  bool m_asInputMode {false};
865 
866  // Channel changing state variables
868  QString m_queuedInput;
870  mutable QString m_queuedChanNum;
872  uint m_queuedChanID {0};
874  uint m_initialChanID {0};
875 
881  static const int kScreenPressRegionCount = 12;
882  QList<QKeyEvent> m_screenPressKeyMapPlayback;
883  QList<QKeyEvent> m_screenPressKeyMapLiveTV;
884 
885  // Channel changing timeout notification variables
886  QElapsedTimer m_lockTimer;
887  bool m_lockTimerOn {false};
889 
890  // Channel browsing state variables
891  TVBrowseHelper *m_browseHelper {nullptr};
892 
893  // Program Info for currently playing video
894  // (or next video if InChangeState() is true)
895  mutable QMutex m_lastProgramLock;
896  ProgramInfo *m_lastProgram {nullptr};
897  bool m_inPlaylist {false};
898  bool m_underNetworkControl {false};
899 
900  // Program Jumping
901  PIPState m_jumpToProgramPIPState {kPIPOff};
902  bool m_jumpToProgram {false};
903 
904  // Video Players
905  vector<PlayerContext*> m_player;
907  int m_playerActive {-1};
909  mutable QReadWriteLock m_playerLock;
910 
911  bool m_noHardwareDecoders {false};
912 
913  // Remote Encoders
915  RemoteEncoder *m_switchToRec {nullptr};
916 
917  // OSD info
918  QMap<OSD*,const PlayerContext*> m_osdLctx;
919 
920  // LCD Info
921  QString m_lcdTitle;
922  QString m_lcdSubtitle;
923  QString m_lcdCallsign;
924 
925  // Window info (GUI is optional, transcoding, preview img, etc)
926  TvPlayWindow *m_myWindow {nullptr};
927  QRect m_playerBounds;
932  bool m_weDisabledGUI {false};
933 
934  // embedded and suspended status
935  bool m_isEmbedded {false};
936  bool m_ignoreKeyPresses {false};
937  vector<bool> m_savedPause;
938 
939  // Channel group stuff
943  mutable QMutex m_channelGroupLock;
944  volatile int m_channelGroupId {-1};
946 
947  // Network Control stuff
949 
950  // Timers
951  using TimerContextMap = QMap<int,PlayerContext*>;
952  using TimerContextConstMap = QMap<int,const PlayerContext*>;
953  mutable QMutex m_timerIdLock;
954  volatile int m_lcdTimerId {0};
955  volatile int m_lcdVolumeTimerId {0};
956  volatile int m_networkControlTimerId {0};
957  volatile int m_jumpMenuTimerId {0};
958  volatile int m_pipChangeTimerId {0};
959  volatile int m_switchToInputTimerId {0};
960  volatile int m_ccInputTimerId {0};
961  volatile int m_asInputTimerId {0};
962  volatile int m_queueInputTimerId {0};
963  volatile int m_browseTimerId {0};
964  volatile int m_updateOSDPosTimerId {0};
965  volatile int m_updateOSDDebugTimerId {0};
966  volatile int m_endOfPlaybackTimerId {0};
967  volatile int m_embedCheckTimerId {0};
968  volatile int m_endOfRecPromptTimerId {0};
969  volatile int m_videoExitDialogTimerId {0};
970  volatile int m_pseudoChangeChanTimerId {0};
971  volatile int m_speedChangeTimerId {0};
972  volatile int m_errorRecoveryTimerId {0};
973  mutable volatile int m_exitPlayerTimerId {0};
974  volatile int m_saveLastPlayPosTimerId {0};
977 
978  // Playback menu state caching
979  PlayerContext *m_tvmCtx {nullptr};
980  OSD *m_tvmOsd {nullptr};
981 
982  // Various tracks
983  // XXX This ignores kTrackTypeTextSubtitle which is greater than
984  // kTrackTypeCount, and it unnecessarily includes
985  // kTrackTypeUnknown.
986  QStringList m_tvmTracks[kTrackTypeCount];
987  int m_tvmCurtrack[kTrackTypeCount] {};
988 
989  // Audio
990  bool m_tvmAvsync {true};
991  bool m_tvmVisual {false};
992  QString m_tvmActive;
993  bool m_tvmUpmixing {false};
994  bool m_tvmCanUpmix {false};
995  QStringList m_tvmVisualisers;
996 
997  // Video
998  AspectOverrideMode m_tvmAspectOverride {kAspect_Off};
999  AdjustFillMode m_tvmAdjustFill {kAdjustFill_Off};
1000  bool m_tvmFillAutoDetect {false};
1002  bool m_tvmStereoAllowed {false};
1004  QStringList m_tvmDeinterlacers {};
1005  QString m_tvmCurrentDeinterlacer {};
1006  bool m_tvmDoubleRate {false};
1007 
1008  // Playback
1009  int m_tvmSpeedX100 {100};
1010  TVState m_tvmState {kState_None};
1011  bool m_tvmIsRecording {false};
1012  bool m_tvmIsRecorded {false};
1013  bool m_tvmIsVideo {false};
1014  CommSkipMode m_tvmCurSkip {kCommSkipOff};
1015  bool m_tvmIsPaused {false};
1016  bool m_tvmAllowPIP {false};
1017  bool m_tvmAllowPBP {false};
1018  bool m_tvmHasPIP {false};
1019  bool m_tvmHasPBP {false};
1020  int m_tvmFreeRecorderCount {-1};
1021  bool m_tvmIsDvd {false};
1022  bool m_tvmIsBd {false};
1023  bool m_tvmJump {false};
1024  bool m_tvmIsLiveTv {false};
1025  bool m_tvmPreviousChan {false};
1026 
1027  // Navigate
1028  int m_tvmNumChapters {0};
1029  int m_tvmCurrentChapter {0};
1030  QList<long long> m_tvmChapterTimes;
1031  int m_tvmNumAngles {0};
1032  int m_tvmCurrentAngle {0};
1033  int m_tvmNumTitles {0};
1034  int m_tvmCurrentTitle {0};
1035  // Subtitles
1036  uint m_tvmSubsCapMode {0};
1037  bool m_tvmSubsHaveText {false};
1038  bool m_tvmSubsForcedOn {true};
1039  bool m_tvmSubsEnabled {false};
1040  bool m_tvmSubsHaveSubs {false};
1041 
1042  bool m_tvmIsOn {false};
1043  bool m_tvmTranscoding {false};
1044 
1046  // End of playback menu state caching
1047 
1052 
1053  public:
1054  // Constants
1055  static const int kInitFFRWSpeed;
1056  static const uint kInputKeysMax;
1057  static const uint kNextSource;
1058  static const uint kPreviousSource;
1059  static const uint kMaxPIPCount;
1060  static const uint kMaxPBPCount;
1061 
1063  static const uint kInputModeTimeout;
1065  static const uint kLCDTimeout;
1067  static const uint kBrowseTimeout;
1069  static const uint kKeyRepeatTimeout;
1071  static const uint kPrevChanTimeout;
1078 
1086 };
1087 
1088 #endif
force
bool force
Definition: mythtv/programs/mythcommflag/main.cpp:75
TV::kPrevChanTimeout
static const uint kPrevChanTimeout
How long to wait before applying all previous channel keypresses in msec.
Definition: tv_play.h:1071
kAspect_Toggle
@ kAspect_Toggle
Definition: videoouttypes.h:46
kPictureAttribute_None
@ kPictureAttribute_None
Definition: videoouttypes.h:89
MenuItemContext::m_menu
const MenuBase & m_menu
Definition: tv_play.h:201
CommSkipMode
CommSkipMode
Definition: tv.h:131
kViewSchedule
@ kViewSchedule
Definition: tv_play.h:93
kAdjustFill_Toggle
@ kAdjustFill_Toggle
Definition: videoouttypes.h:57
e
QDomElement e
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:1417
MenuBase::GetName
QString GetName(void) const
Definition: tv_play.h:237
bool
bool
Definition: pxsup2dast.c:30
TV::m_lastProgramLock
QMutex m_lastProgramLock
Definition: tv_play.h:895
tv.h
hardwareprofile.smolt.timeout
float timeout
Definition: smolt.py:103
root
QDomElement root
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:653
osdInfo
Definition: playercontext.h:34
TV::m_changePxP
MythDeque< QString > m_changePxP
Definition: tv_play.h:837
TV::UpdateOSDAskAllowDialog
void UpdateOSDAskAllowDialog(PlayerContext *)
TV::m_playerLock
QReadWriteLock m_playerLock
lock on player and playerActive changes
Definition: tv_play.h:909
slots
std::array< unsigned int, 4 > slots
Definition: element.cpp:38
kMenuShowActive
@ kMenuShowActive
Definition: tv_play.h:137
ChannelChangeDirection
ChannelChangeDirection
ChannelChangeDirection is an enumeration of possible channel changing directions.
Definition: tv.h:29
MenuItemDisplayer::MenuItemDisplay
virtual bool MenuItemDisplay(const MenuItemContext &c)=0
TV::setInPlayList
void setInPlayList(bool setting)
Definition: tv_play.h:465
TV::m_initFromDBLock
QMutex m_initFromDBLock
Definition: tv_play.h:809
kScheduleProgramFinder
@ kScheduleProgramFinder
Definition: tv_play.h:91
kTrackTypeCount
@ kTrackTypeCount
Definition: decoderbase.h:39
MythTimer
A QElapsedTimer based timer to replace use of QTime as a timer.
Definition: mythtimer.h:14
PictureAdjustType
PictureAdjustType
Definition: tv.h:121
TV::m_keyRepeatTimer
MythTimer m_keyRepeatTimer
Queue of unprocessed key presses.
Definition: tv_play.h:856
ReloadKeys
static void ReloadKeys(void)
Definition: mythtv/programs/mythfrontend/main.cpp:1645
title
QString title
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:633
TV::kBookmarkAlways
@ kBookmarkAlways
Definition: tv_play.h:470
TV::kVideoExitDialogTimeout
static const uint kVideoExitDialogTimeout
How long to display idle timer dialog in msec.
Definition: tv_play.h:1077
MenuBase::MenuBase
MenuBase()=default
kStartTVNoFlags
@ kStartTVNoFlags
Definition: tv_play.h:108
TV::SleepTimerInfo::dispString
QString dispString
Definition: tv_play.h:325
kMenuCurrentDefault
@ kMenuCurrentDefault
Definition: tv_play.h:143
TV::ArbSeekWhence
ArbSeekWhence
Definition: tv_play.h:560
kAdjustFill_Off
@ kAdjustFill_Off
Definition: videoouttypes.h:58
TV::kMaxPIPCount
static const uint kMaxPIPCount
Definition: tv_play.h:1059
kMenuCurrentAlways
@ kMenuCurrentAlways
Definition: tv_play.h:145
TV::kBrowseTimeout
static const uint kBrowseTimeout
Timeout for browse mode exit in msec.
Definition: tv_play.h:1067
TV::GetValidRecorderList
static QStringList GetValidRecorderList(const QString &channum)
TV::kSleepTimerDialogTimeout
static const uint kSleepTimerDialogTimeout
How long to display sleep timer dialog in msec.
Definition: tv_play.h:1073
FrameScanType
FrameScanType
Definition: videoouttypes.h:79
EMBEDRETURNVOID
void(*)(void *, bool) EMBEDRETURNVOID
Definition: tv_play.h:55
TV::kEmbedCheckFrequency
static const uint kEmbedCheckFrequency
Definition: tv_play.h:1080
MenuShowContext
MenuShowContext
Definition: tv_play.h:136
osd.h
Context
QHash< QString, Action * > Context
Definition: action.h:77
kAspect_Off
@ kAspect_Off
Definition: videoouttypes.h:47
MenuBase::GetTranslationContext
const char * GetTranslationContext(void) const
Definition: tv_play.h:238
category
QString category
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:1419
MythMediaBuffer
Definition: mythmediabuffer.h:50
ChannelGroupList
vector< ChannelGroupItem > ChannelGroupList
Definition: channelgroup.h:32
TV::RunProgramGuidePtr
static EMBEDRETURNVOIDEPG RunProgramGuidePtr
function pointer for RunProgramGuide in guidegrid.cpp
Definition: tv_play.h:344
TV::HasQueuedInput
bool HasQueuedInput(void) const
Definition: tv_play.h:525
kPIPOff
@ kPIPOff
Definition: videoouttypes.h:10
TV::RunScheduleEditorPtr
static EMBEDRETURNVOIDSCHEDIT RunScheduleEditorPtr
function pointer for RunScheduleEditor in scheduleeditor.cpp
Definition: tv_play.h:346
VBIMode::None
@ None
Definition: tv.h:11
TV::m_timerIdLock
QMutex m_timerIdLock
Definition: tv_play.h:953
MenuBase
Definition: tv_play.h:219
kStartTVIgnoreBookmark
@ kStartTVIgnoreBookmark
Definition: tv_play.h:111
TV::m_playbackCompactMenu
MenuBase m_playbackCompactMenu
Definition: tv_play.h:1049
MythPlayer
Definition: mythplayer.h:154
build_compdb.file
file
Definition: build_compdb.py:55
TV::m_queuedInput
QString m_queuedInput
Input key presses queued up so far...
Definition: tv_play.h:868
MenuItemDisplayer
Definition: tv_play.h:213
TV::m_tvmChapterTimes
QList< long long > m_tvmChapterTimes
Definition: tv_play.h:1030
TV::m_ffRewSpeeds
vector< int > m_ffRewSpeeds
Definition: tv_play.h:802
kStartTVInPlayList
@ kStartTVInPlayList
Definition: tv_play.h:109
menu
static MythThemedMenu * menu
Definition: mythtv/programs/mythtv-setup/main.cpp:55
mythdeque.h
TV::m_progLists
QMap< QString, ProgramList > m_progLists
Definition: tv_play.h:839
TV::SleepTimerInfo::SleepTimerInfo
SleepTimerInfo(QString str, unsigned long secs)
Definition: tv_play.h:323
TV::kInputModeTimeout
static const uint kInputModeTimeout
Definition: tv_play.h:1063
MythDate::current
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:10
TV::kBookmarkNever
@ kBookmarkNever
Definition: tv_play.h:471
kStartTVAllowLastPlayPos
@ kStartTVAllowLastPlayPos
Definition: tv_play.h:113
TV::kErrorRecoveryCheckFrequency
static const uint kErrorRecoveryCheckFrequency
Definition: tv_play.h:1082
ProgFinder
Definition: progfind.h:24
kPictureAttributeSupported_None
@ kPictureAttributeSupported_None
Definition: videoouttypes.h:102
RemoteEncoder
Definition: remoteencoder.h:26
kMenuCategoryMenu
@ kMenuCategoryMenu
Definition: tv_play.h:134
TV::m_ctorTime
QElapsedTimer m_ctorTime
Definition: tv_play.h:806
kMenuCategoryItem
@ kMenuCategoryItem
Definition: tv_play.h:132
NoRecorderMsg
NoRecorderMsg
Type of message displayed in ShowNoRecorderDialog()
Definition: tv_play.h:101
MuteState
MuteState
Definition: volumebase.h:6
InfoMap
QHash< QString, QString > InfoMap
Definition: mythtypes.h:15
TV::m_lockTimer
QElapsedTimer m_lockTimer
Definition: tv_play.h:886
TV::CurrentTVInstance
static TV * CurrentTVInstance(void)
Definition: tv_play.h:294
MenuItemContext::MenuItemContext
MenuItemContext(const MenuBase &menu, const QDomNode &node, MenuShowContext showContext, MenuCurrentContext current, QString action, bool doDisplay)
Definition: tv_play.h:186
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
MenuItemContext::m_showContext
MenuShowContext m_showContext
Definition: tv_play.h:205
TV::kKeyRepeatTimeout
static const uint kKeyRepeatTimeout
Seek key repeat timeout in msec.
Definition: tv_play.h:1069
TV::ARBSEEK_FORWARD
@ ARBSEEK_FORWARD
Definition: tv_play.h:563
EMBEDRETURNVOIDFINDER
void(*)(TV *, bool, bool) EMBEDRETURNVOIDFINDER
Definition: tv_play.h:57
kMenuCurrentActive
@ kMenuCurrentActive
Definition: tv_play.h:144
TV::m_dbChannelGroups
ChannelGroupList m_dbChannelGroups
Definition: tv_play.h:795
TV::getJumpToProgram
bool getJumpToProgram(void) const
This is set if the user asked MythTV to jump to the previous recording in the playlist.
Definition: tv_play.h:506
TV::m_channelGroupChannelList
ChannelInfoList m_channelGroupChannelList
Definition: tv_play.h:945
TV::m_stateChangeTimerId
TimerContextMap m_stateChangeTimerId
Definition: tv_play.h:975
AskProgramInfo::AskProgramInfo
AskProgramInfo(QDateTime e, bool r, bool l, ProgramInfo *i)
Definition: tv_play.h:120
TV::BookmarkAction
BookmarkAction
Definition: tv_play.h:469
DetectLetterbox
Definition: DetectLetterbox.h:5
OSDTimeout
OSDTimeout
Definition: osd.h:58
kScheduleProgramGuide
@ kScheduleProgramGuide
Definition: tv_play.h:90
MenuItemContext::MenuItemContext
MenuItemContext(const MenuBase &menu, const QDomNode &node, MenuShowContext showContext, MenuCurrentContext current, QString action, QString actionText, bool doDisplay)
Definition: tv_play.h:169
hardwareprofile.scan.profile
profile
Definition: scan.py:99
TV::m_chanEditMap
InfoMap m_chanEditMap
Channel Editing initial map.
Definition: tv_play.h:842
TV::kSpeedChangeCheckFrequency
static const uint kSpeedChangeCheckFrequency
Definition: tv_play.h:1081
TV::kPreviousSource
static const uint kPreviousSource
Definition: tv_play.h:1058
TV::lastProgramStringList
static QStringList lastProgramStringList
stores last program info.
Definition: tv_play.h:341
videoouttypes.h
TV::DeleteRecorder
void DeleteRecorder()
EMBEDRETURNVOIDSCHEDIT
void(*)(const ProgramInfo *, void *) EMBEDRETURNVOIDSCHEDIT
Definition: tv_play.h:58
hardwareprofile.config.p
p
Definition: config.py:33
AspectOverrideMode
AspectOverrideMode
Definition: videoouttypes.h:45
kPlaybackBox
@ kPlaybackBox
Definition: tv_play.h:94
TV::setUnderNetworkControl
void setUnderNetworkControl(bool setting)
Definition: tv_play.h:466
TV::SleepTimerInfo
Helper class for Sleep Timer code.
Definition: tv_play.h:321
AskProgramInfo::m_expiry
QDateTime m_expiry
Definition: tv_play.h:123
TV::RunPlaybackBoxPtr
static EMBEDRETURNVOID RunPlaybackBoxPtr
function pointer for RunPlaybackBox in playbackbox.cpp
Definition: tv_play.h:342
kScheduledRecording
@ kScheduledRecording
Definition: tv_play.h:92
MenuItemContext
Definition: tv_play.h:151
TV::GetQueuedChanID
uint GetQueuedChanID(void) const
Definition: tv_play.h:534
TV::kIdleTimerDialogTimeout
static const uint kIdleTimerDialogTimeout
How long to display idle timer dialog in seconds.
Definition: tv_play.h:1075
kNoRecorders
@ kNoRecorders
No free recorders.
Definition: tv_play.h:102
GuideGrid
Definition: guidegrid.h:105
TV::GetValidRecorderList
static QStringList GetValidRecorderList(uint, const QString &)
TV::m_queuedChanNum
QString m_queuedChanNum
Input key presses queued up so far to form a valid ChanNum.
Definition: tv_play.h:870
clear
static void clear(SettingsMap &cache, SettingsMap &overrides, const QString &myKey)
Definition: mythdb.cpp:845
filename
QString filename
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:634
TV::m_savedGuiBounds
QRect m_savedGuiBounds
Definition: tv_play.h:930
TV::SleepTimerInfo::seconds
unsigned long seconds
Definition: tv_play.h:326
TV::kInputKeysMax
static const uint kInputKeysMax
When to start discarding early keys.
Definition: tv_play.h:1056
kStartTVIgnoreProgStart
@ kStartTVIgnoreProgStart
Definition: tv_play.h:112
MenuItemContext::m_actionText
const QString m_actionText
Definition: tv_play.h:208
GetState
#define GetState(a, b)
Definition: audiooutputopensles.cpp:50
MenuItemContext::m_action
const QString m_action
Definition: tv_play.h:207
TV::kSaveLastPlayPosTimeout
static const uint kSaveLastPlayPosTimeout
Definition: tv_play.h:1085
TV::TimerContextConstMap
QMap< int, const PlayerContext * > TimerContextConstMap
Definition: tv_play.h:952
ChannelInfoList
vector< ChannelInfo > ChannelInfoList
Definition: channelinfo.h:133
scheduleEditTypes
scheduleEditTypes
Definition: tv_play.h:89
uint
unsigned int uint
Definition: compat.h:140
EMBEDRETURNVOIDEPG
void(*)(uint, const QString &, const QDateTime, TV *, bool, bool, int) EMBEDRETURNVOIDEPG
Definition: tv_play.h:56
TVBrowseHelper
Definition: tvbrowsehelper.h:68
kStereoscopicModeAuto
@ kStereoscopicModeAuto
Definition: videoouttypes.h:120
MenuItemContext::MenuItemContext
MenuItemContext(const MenuBase &menu, const QDomNode &node, QString menuName, MenuCurrentContext current, bool doDisplay)
Definition: tv_play.h:154
TV::m_tvmActive
QString m_tvmActive
Definition: tv_play.h:992
TV::m_osdLctx
QMap< OSD *, const PlayerContext * > m_osdLctx
Definition: tv_play.h:918
PictureAttribute
PictureAttribute
Definition: videoouttypes.h:88
volumebase.h
StereoscopicMode
StereoscopicMode
Definition: videoouttypes.h:119
InitKeys
static void InitKeys(void)
Definition: mythtv/programs/mythfrontend/main.cpp:1593
TV::IsSwitchingCards
bool IsSwitchingCards(void) const
Returns true if we are currently in the process of switching recorders.
Definition: tv_play.h:498
TV::gTVLock
static QMutex * gTVLock
Definition: tv_play.h:356
TV::CutlistMenuShow
void CutlistMenuShow(const MenuBase &menu, const QDomNode &node, const QDomNode &selected)
MTV_PUBLIC
#define MTV_PUBLIC
Definition: mythtvexp.h:15
channelinfo.h
TV::m_cutlistCompactMenu
MenuBase m_cutlistCompactMenu
Definition: tv_play.h:1051
TV::kEndOfPlaybackCheckFrequency
static const uint kEndOfPlaybackCheckFrequency
Definition: tv_play.h:1079
MenuItemContext::m_currentContext
MenuCurrentContext m_currentContext
Definition: tv_play.h:206
PlaybackBox
Definition: playbackbox.h:60
TV::kNextSource
static const uint kNextSource
Definition: tv_play.h:1057
ProgramInfo
Holds information on recordings and videos.
Definition: programinfo.h:68
channelgroup.h
TV::m_savedPause
vector< bool > m_savedPause
saved pause state before embedding
Definition: tv_play.h:937
AskProgramInfo::AskProgramInfo
AskProgramInfo()=default
TV::m_lastLockSeenTime
QDateTime m_lastLockSeenTime
Definition: tv_play.h:888
mythmiscutil.h
TV::m_progListsLock
QMutex m_progListsLock
Definition: tv_play.h:838
MenuBase::m_keyBindingContext
QString m_keyBindingContext
Definition: tv_play.h:259
TVState
TVState
TVState is an enumeration of the states used by TV and TVRec.
Definition: tv.h:51
MenuBase::m_menuName
QString m_menuName
Definition: tv_play.h:258
kMenuShowAlways
@ kMenuShowAlways
Definition: tv_play.h:139
TV::kMaxPBPCount
static const uint kMaxPBPCount
Timeout for entry modes in msec.
Definition: tv_play.h:1060
TV::gTV
static TV * gTV
Definition: tv_play.h:357
dir
QDir dir
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:1171
TV::GetValidRecorderList
static QStringList GetValidRecorderList(uint chanid)
TV::getAllowRerecord
bool getAllowRerecord(void) const
Returns true if the user told Mythtv to allow re-recording of the show.
Definition: tv_play.h:500
TV::HasQueuedChannel
bool HasQueuedChannel(void) const
Definition: tv_play.h:527
AdjustFillMode
AdjustFillMode
Definition: videoouttypes.h:56
TV::m_tvmJumprecBackHack
QVariant m_tvmJumprecBackHack
Definition: tv_play.h:1045
MythDeque< QString >
TV::PlaybackExiting
void PlaybackExiting(TV *Player)
MenuCategory
MenuCategory
Definition: tv_play.h:131
TV::m_lcdCallsign
QString m_lcdCallsign
Definition: tv_play.h:923
TV::RunViewScheduledPtr
static EMBEDRETURNVOID RunViewScheduledPtr
function pointer for RunViewScheduled in viewscheduled.cpp
Definition: tv_play.h:343
ViewScheduled
Screen for viewing and managing upcoming and conflicted recordings.
Definition: viewscheduled.h:28
PIPState
PIPState
Definition: videoouttypes.h:9
decoderbase.h
TV::m_baseFilters
QString m_baseFilters
Definition: tv_play.h:777
TV::m_lcdTitle
QString m_lcdTitle
Definition: tv_play.h:921
MenuItemContext::m_node
const QDomNode & m_node
Definition: tv_play.h:202
TV::kEndOfPlaybackFirstCheckTimer
static const uint kEndOfPlaybackFirstCheckTimer
Definition: tv_play.h:1084
TV::m_channelGroupLock
QMutex m_channelGroupLock
Lock necessary when modifying channel group variables.
Definition: tv_play.h:943
PlayerContext
Definition: playercontext.h:49
TV::kInitFFRWSpeed
static const int kInitFFRWSpeed
1x, default to normal speed
Definition: tv_play.h:1055
inputinfo.h
build_compdb.action
action
Definition: build_compdb.py:9
kMenuCategoryItemlist
@ kMenuCategoryItemlist
Definition: tv_play.h:133
kMenuShowInactive
@ kMenuShowInactive
Definition: tv_play.h:138
mythtimer.h
TV::kEndOfRecPromptCheckFrequency
static const uint kEndOfRecPromptCheckFrequency
Definition: tv_play.h:1083
TV::m_screenPressKeyMapLiveTV
QList< QKeyEvent > m_screenPressKeyMapLiveTV
Definition: tv_play.h:883
TV::m_screenPressKeyMapPlayback
QList< QKeyEvent > m_screenPressKeyMapPlayback
Definition: tv_play.h:882
kStartTVByNetworkCommand
@ kStartTVByNetworkCommand
Definition: tv_play.h:110
TV::m_cutlistMenu
MenuBase m_cutlistMenu
Definition: tv_play.h:1050
MythGestureEvent
A custom event that represents a mouse gesture.
Definition: mythgesture.h:40
kCommSkipOff
@ kCommSkipOff
Definition: tv.h:132
Player
Definition: zmliveplayer.h:36
MenuCurrentContext
MenuCurrentContext
Definition: tv_play.h:142
TV::kLCDTimeout
static const uint kLCDTimeout
Timeout for updating LCD info in msec.
Definition: tv_play.h:1065
TvPlayWindow
Simple screen shown while the video player is starting up.
Definition: tv_play_win.h:13
TV::m_sleepTimes
vector< SleepTimerInfo > m_sleepTimes
Vector or sleep timer sleep times in seconds, with the appropriate UI message.
Definition: tv_play.h:846
TV::m_tvmVisualisers
QStringList m_tvmVisualisers
Definition: tv_play.h:995
TV::m_player
vector< PlayerContext * > m_player
Definition: tv_play.h:905
kAdjustingPicture_None
@ kAdjustingPicture_None
Definition: tv.h:122
MenuItemContext::m_menuName
const QString m_menuName
Definition: tv_play.h:204
TV::m_playbackMenu
MenuBase m_playbackMenu
Definition: tv_play.h:1048
TV::m_networkControlCommands
MythDeque< QString > m_networkControlCommands
Definition: tv_play.h:948
TV::m_lcdSubtitle
QString m_lcdSubtitle
Definition: tv_play.h:922
TV::TimerContextMap
QMap< int, PlayerContext * > TimerContextMap
Definition: tv_play.h:951
MenuBase::GetKeyBindingContext
const QString & GetKeyBindingContext(void) const
Definition: tv_play.h:241
kOSDTimeout_Med
@ kOSDTimeout_Med
Definition: osd.h:62
ScheduleEditor
Construct a recording schedule.
Definition: scheduleeditor.h:150
build_compdb.options
options
Definition: build_compdb.py:11
MenuItemContext::m_doDisplay
bool m_doDisplay
Definition: tv_play.h:209
OSD
Definition: osd.h:132
MenuBase::IsLoaded
bool IsLoaded(void) const
Definition: tv_play.h:231
TV::m_signalMonitorTimerId
TimerContextMap m_signalMonitorTimerId
Definition: tv_play.h:976
TV::RunProgramFinderPtr
static EMBEDRETURNVOIDFINDER RunProgramFinderPtr
function pointer for RunProgramFinder in progfind.cpp
Definition: tv_play.h:345
kNoCurrRec
@ kNoCurrRec
No current recordings.
Definition: tv_play.h:103
TV::ARBSEEK_REWIND
@ ARBSEEK_REWIND
Definition: tv_play.h:562
TV::getEndOfRecording
bool getEndOfRecording(void) const
This is set to true if the player reaches the end of the recording without the user explicitly exitin...
Definition: tv_play.h:503
MenuItemContext::m_category
MenuCategory m_category
Definition: tv_play.h:203
TV::m_initFromDBWait
QWaitCondition m_initFromDBWait
Definition: tv_play.h:811
TV::m_askAllowPrograms
QMap< QString, AskProgramInfo > m_askAllowPrograms
Definition: tv_play.h:834
TV
Control TV playback.
Definition: tv_play.h:281
AskProgramInfo
Definition: tv_play.h:117
kNoTuners
@ kNoTuners
No capture cards configured.
Definition: tv_play.h:104