MythTV  master
mythdvdplayer.h
Go to the documentation of this file.
1 #ifndef MYTHDVDPLAYER_H
2 #define MYTHDVDPLAYER_H
3 
4 #include <cstdint>
5 
6 #include "mythplayer.h"
7 
8 class MythDVDPlayer : public MythPlayer
9 {
11 
12  public:
14  : MythPlayer(flags) {}
15 
16  // Decoder stuff..
17  void ReleaseNextVideoFrame(VideoFrame *buffer, int64_t timecode,
18  bool wrap = true) override; // MythPlayer
19  bool HasReachedEof(void) const override; // MythPlayer
20 
21  // Add data
22  bool PrepareAudioSample(int64_t &timecode) override; // MythPlayer
23 
24  // Gets
25  uint64_t GetBookmark(void) override; // MythPlayer
26  int64_t GetSecondsPlayed(bool honorCutList,
27  int divisor = 1000) const override; // MythPlayer
28  int64_t GetTotalSeconds(bool honorCutList,
29  int divisor = 1000) const override; // MythPlayer
30 
31  // DVD public stuff
32  bool GoToMenu(QString str) override; // MythPlayer
33  void GoToDVDProgram(bool direction) override; // MythPlayer
34  bool IsInStillFrame() const override; // MythPlayer
35 
36  // DVD ringbuffer methods
37  void ResetStillFrameTimer(void);
38  void SetStillFrameTimeout(int length);
39  void StillFrameCheck(void);
40 
41  // Angle public stuff
42  int GetNumAngles(void) const override; // MythPlayer
43  int GetCurrentAngle(void) const override; // MythPlayer
44  QString GetAngleName(int angle) const override; // MythPlayer
45  bool SwitchAngle(int angle) override; // MythPlayer
46 
47  // Chapter public stuff
48  int GetNumChapters(void) override; // MythPlayer
49  int GetCurrentChapter(void) override; // MythPlayer
50  void GetChapterTimes(QList<long long> &times) override; // MythPlayer
51 
52  protected:
53  // Non-public sets
54  void SetBookmark(bool clear = false) override; // MythPlayer
55 
56  // Start/Reset/Stop playing
57  void ResetPlaying(bool resetframes = true) override; // MythPlayer
58 
59  // Private decoder stuff
60  bool PrebufferEnoughFrames(int min_buffers = 0) override; // MythPlayer
61  void DecoderPauseCheck(void) override; // MythPlayer
62  bool DecoderGetFrameFFREW(void) override; // MythPlayer
63  bool DecoderGetFrameREW(void) override; // MythPlayer
64 
65  // These actually execute commands requested by public members
66  void ChangeSpeed(void) override; // MythPlayer
67 
68  // Playback
69  void AVSync(VideoFrame *frame, bool limit_delay = false) override; // MythPlayer
70  void DisplayPauseFrame(void) override; // MythPlayer
71  void PreProcessNormalFrame(void) override; // MythPlayer
72  void VideoStart(void) override; // MythPlayer
73  bool VideoLoop(void) override; // MythPlayer
74  void EventStart(void) override; // MythPlayer
75  virtual void EventEnd(void);
76  void InitialSeek(void) override; // MythPlayer
77 
78  // Non-const gets
79  void SeekForScreenGrab(uint64_t &number, uint64_t frameNum,
80  bool absolute) override; // MythPlayer
81 
82  // Private initialization stuff
83  void AutoDeint(VideoFrame* frame, bool allow_lock = true) override; // MythPlayer
84 
85  // Complicated gets
86  long long CalcMaxFFTime(long long ff, bool setjump = true) const override; // MythPlayer
87 
88  // Seek stuff
89  bool FastForward(float seconds) override; // MythPlayer
90  bool Rewind(float seconds) override; // MythPlayer
91  bool JumpToFrame(uint64_t frame) override; // MythPlayer
92 
93  // Private Closed caption and teletext stuff
94  void DisableCaptions(uint mode, bool osd_msg=true) override; // MythPlayer
95  void EnableCaptions(uint mode, bool osd_msg=true) override; // MythPlayer
96 
97  // Audio/Subtitle/EIA-608/EIA-708 stream selection
98  int SetTrack(uint type, int trackNo) override; // MythPlayer
99 
100  // Private decoder stuff
101  void CreateDecoder(char *testbuf, int testreadsize) override; // MythPlayer
102 
103  // Private chapter stuff
104  bool DoJumpChapter(int chapter) override; // MythPlayer
105 
106  private:
107  void DoChangeDVDTrack(void);
108  void DisplayDVDButton(void);
109 
110  void DisplayLastFrame(void);
111 
114 
115  // additional bookmark seeking information
116  int m_initial_title {-1};
120 
121  // still frame timing
125 };
126 
127 #endif // MYTHDVDPLAYER_H
int GetCurrentAngle(void) const override
A QElapsedTimer based timer to replace use of QTime as a timer.
Definition: mythtimer.h:13
bool VideoLoop(void) override
int GetNumAngles(void) const override
PlayerFlags
Definition: mythplayer.h:88
void SeekForScreenGrab(uint64_t &number, uint64_t frameNum, bool absolute) override
QMutex m_stillFrameTimerLock
void AVSync(VideoFrame *frame, bool limit_delay=false) override
bool DoJumpChapter(int chapter) override
void ChangeSpeed(void) override
unsigned int uint
Definition: compat.h:140
void DisplayLastFrame(void)
QString GetAngleName(int angle) const override
long long CalcMaxFFTime(long long ff, bool setjump=true) const override
CalcMaxFFTime(ffframes): forward ffframes forward.
bool DecoderGetFrameFFREW(void) override
bool DecoderGetFrameREW(void) override
void GetChapterTimes(QList< long long > &times) override
bool Rewind(float seconds) override
bool JumpToFrame(uint64_t frame) override
int64_t GetTotalSeconds(bool honorCutList, int divisor=1000) const override
void DecoderPauseCheck(void) override
int m_initial_audio_track
void InitialSeek(void) override
bool HasReachedEof(void) const override
bool IsInStillFrame() const override
void AutoDeint(VideoFrame *frame, bool allow_lock=true) override
QString m_initial_dvdstate
static void clear(SettingsMap &cache, SettingsMap &overrides, const QString &myKey)
Definition: mythdb.cpp:830
bool GoToMenu(QString str) override
MythDVDPlayer(PlayerFlags flags=kNoFlags)
Definition: mythdvdplayer.h:13
void DisableCaptions(uint mode, bool osd_msg=true) override
bool m_dvd_stillframe_showing
int GetCurrentChapter(void) override
void VideoStart(void) override
MythTimer m_stillFrameTimer
void ResetPlaying(bool resetframes=true) override
uint64_t GetBookmark(void) override
void EnableCaptions(uint mode, bool osd_msg=true) override
void ResetStillFrameTimer(void)
void ReleaseNextVideoFrame(VideoFrame *buffer, int64_t timecode, bool wrap=true) override
void StillFrameCheck(void)
bool FastForward(float seconds) override
int m_initial_subtitle_track
void DoChangeDVDTrack(void)
int SetTrack(uint type, int trackNo) override
int GetNumChapters(void) override
void GoToDVDProgram(bool direction) override
void PreProcessNormalFrame(void) override
bool SwitchAngle(int angle) override
virtual void EventEnd(void)
int64_t GetSecondsPlayed(bool honorCutList, int divisor=1000) const override
bool PrepareAudioSample(int64_t &timecode) override
void DisplayDVDButton(void)
void EventStart(void) override
void DisplayPauseFrame(void) override
void CreateDecoder(char *testbuf, int testreadsize) override
Q_DECLARE_TR_FUNCTIONS(MythDVDPlayer)
bool PrebufferEnoughFrames(int min_buffers=0) override
void SetStillFrameTimeout(int length)
void SetBookmark(bool clear=false) override