MythTV  master
mythplayerui.h
Go to the documentation of this file.
1 #ifndef MYTHPLAYERUI_H
2 #define MYTHPLAYERUI_H
3 
4 // MythTV
6 #include "mythvideoscantracker.h"
7 #include "jitterometer.h"
8 #include "mythplayer.h"
9 
11 {
12  Q_OBJECT
13 
14  public slots:
15  void OSDDebugVisibilityChanged(bool Visible);
16 
17  protected slots:
18  void InitialiseState() override;
19  void ChangeOSDDebug();
20  void UpdateOSDDebug();
21  virtual void SetBookmark(bool Clear = false);
22 
23  public:
24  MythPlayerUI(MythMainWindow* MainWindow, TV* Tv, PlayerContext* Context, PlayerFlags Flags);
25 
26  bool StartPlaying();
27  virtual void InitialSeek();
28  virtual void EventLoop();
29  void ReinitVideo(bool ForceUpdate) override;
30  virtual void VideoStart();
31  virtual void EventStart();
32  virtual bool VideoLoop();
33  virtual void PreProcessNormalFrame();
34  void ChangeSpeed() override;
35  void SetVideoParams(int Width, int Height, double FrameRate, float Aspect,
36  bool ForceUpdate, int ReferenceFrames,
38  const QString& CodecName = QString()) override;
39  bool DoFastForwardSecs(float Seconds, double Inaccuracy, bool UseCutlist);
40  bool DoRewindSecs(float Seconds, double Inaccuracy, bool UseCutlist);
41  void GetPlaybackData(InfoMap& Map);
42  void GetCodecDescription(InfoMap& Map);
43  bool CanSupportDoubleRate();
44  void SetWatched(bool ForceWatched = false);
45 
46  // N.B. Editor - keep ringfenced and move into subclass
47  void EnableEdit();
48  void DisableEdit(int HowToSave);
49  bool HandleProgramEditorActions(QStringList& Actions);
50  uint64_t GetNearestMark(uint64_t Frame, bool Right);
51  bool IsTemporaryMark(uint64_t Frame);
52  bool HasTemporaryMark();
53  bool IsCutListSaved();
54  bool DeleteMapHasUndo();
55  bool DeleteMapHasRedo();
56  QString DeleteMapGetUndoMessage();
57  QString DeleteMapGetRedoMessage();
58  void HandleArbSeek(bool Direction);
59  // End editor stuff
60 
61  protected:
62  void InitFrameInterval() override;
63  virtual void DisplayPauseFrame();
64  virtual void DisplayNormalFrame(bool CheckPrebuffer = true);
65 
66  void FileChanged();
67  void RefreshPauseFrame();
68  void RenderVideoFrame(MythVideoFrame* Frame, FrameScanType Scan, bool Prepare, int64_t Wait);
69  void DoDisplayVideoFrame(MythVideoFrame* Frame, int64_t Due);
70  void EnableFrameRateMonitor(bool Enable = false);
71  void EnableBitrateMonitor(bool Enable = false);
72 
73  Jitterometer m_outputJmeter { "Player" };
74 
75  // N.B. Editor - keep ringfenced and move into subclass
76  QElapsedTimer m_editUpdateTimer;
77  float m_speedBeforeEdit { 1.0 };
78  bool m_pausedBeforeEdit { false };
79 
80  private:
81  Q_DISABLE_COPY(MythPlayerUI)
82 
83  void SwitchToProgram();
84  void JumpToProgram();
85  void JumpToStream(const QString &stream);
86 
87  bool m_osdDebug { false };
89 };
90 
91 #endif
MythPlayerVisualiserUI
Definition: mythplayervisualiserui.h:8
MythPlayer::ChangeSpeed
virtual void ChangeSpeed(void)
Definition: mythplayer.cpp:1342
Frame
Definition: zmdefines.h:93
FrameScanType
FrameScanType
Definition: videoouttypes.h:94
mythplayer.h
PlayerFlags
PlayerFlags
Definition: mythplayer.h:62
MythPlayerUI::m_osdDebugTimer
QTimer m_osdDebugTimer
Definition: mythplayerui.h:88
Visible
Definition: channelsettings.cpp:391
InfoMap
QHash< QString, QString > InfoMap
Definition: mythtypes.h:15
MythPlayerUI
Definition: mythplayerui.h:10
mythvideoscantracker.h
FrameRate
Definition: recorderbase.h:36
jitterometer.h
Jitterometer
Definition: jitterometer.h:43
MythPlayer::ReinitVideo
virtual void ReinitVideo(bool ForceUpdate)
Definition: mythplayer.cpp:300
MythPlayerUI::m_editUpdateTimer
QElapsedTimer m_editUpdateTimer
Definition: mythplayerui.h:76
MythPlayer::SetVideoParams
virtual void SetVideoParams(int w, int h, double fps, float aspect, bool ForceUpdate, int ReferenceFrames, FrameScanType=kScan_Ignore, const QString &codecName=QString())
Definition: mythplayer.cpp:327
MTV_PUBLIC
#define MTV_PUBLIC
Definition: mythtvexp.h:15
MythPlayer::InitFrameInterval
virtual void InitFrameInterval()
Definition: mythplayer.cpp:688
mythplayervisualiserui.h
MythPlayerVisualiserUI::InitialiseState
void InitialiseState() override
Set initial state and update player.
Definition: mythplayervisualiserui.cpp:31
Clear
#define Clear(a)
Definition: audiooutputopensles.cpp:47
PlayerContext
Definition: playercontext.h:48
MythVideoScanTracker
Definition: mythvideoscantracker.h:12
MythVideoFrame
Definition: mythframe.h:85
MythMainWindow
Definition: mythmainwindow.h:34
kScan_Ignore
@ kScan_Ignore
Definition: videoouttypes.h:96
TV
Control TV playback.
Definition: tv_play.h:152