MythTV  master
mythdvdplayer.h
Go to the documentation of this file.
1 #ifndef MYTHDVDPLAYER_H
2 #define MYTHDVDPLAYER_H
3 
4 // MythTV
5 #include "mythplayer.h"
6 
7 // Std
8 #include <cstdint>
9 
10 class MythDVDPlayer : public MythPlayer
11 {
12  Q_DECLARE_TR_FUNCTIONS(MythDVDPlayer)
13 
14  public:
16  : MythPlayer(flags) {}
17 
18  void ReleaseNextVideoFrame(VideoFrame *Buffer, int64_t Timecode, bool Wrap = true) override;
19  bool HasReachedEof(void) const override;
20  bool PrepareAudioSample(int64_t &Timecode) override;
21  uint64_t GetBookmark(void) override;
22  int64_t GetSecondsPlayed(bool HonorCutList, int Divisor = 1000) override;
23  int64_t GetTotalSeconds(bool HonorCutList, int Divisor = 1000) const override;
24  bool GoToMenu(const QString& Menu) override;
25  void GoToDVDProgram(bool Direction) override;
26  bool IsInStillFrame() const override;
27  int GetNumAngles(void) const override;
28  int GetCurrentAngle(void) const override;
29  QString GetAngleName(int Angle) const override;
30  bool SwitchAngle(int Angle) override;
31  int GetNumChapters(void) override;
32  int GetCurrentChapter(void) override;
33  void GetChapterTimes(QList<long long> &Times) override;
34 
35  void ResetStillFrameTimer(void);
36  void SetStillFrameTimeout(int Length);
37  void StillFrameCheck(void);
38 
39  protected:
40  void SetBookmark(bool Clear = false) override;
41  void ResetPlaying(bool ResetFrames = true) override;
42  bool PrebufferEnoughFrames(int MinBuffers = 0) override;
43  void DecoderPauseCheck(void) override;
44  bool DecoderGetFrameFFREW(void) override;
45  bool DecoderGetFrameREW(void) override;
46  void ChangeSpeed(void) override;
47  void DisplayPauseFrame(void) override;
48  void PreProcessNormalFrame(void) override;
49  void VideoStart(void) override;
50  bool VideoLoop(void) override;
51  void EventStart(void) override;
52  virtual void EventEnd(void);
53  void InitialSeek(void) override;
54  void SeekForScreenGrab(uint64_t &Number, uint64_t FrameNum,
55  bool Absolute) override;
56  void AutoDeint(VideoFrame* Frame, bool AllowLock = true) override;
57  long long CalcMaxFFTime(long long FastFwd, bool Setjump = true) const override;
58  bool FastForward(float Seconds) override;
59  bool Rewind(float Seconds) override;
60  bool JumpToFrame(uint64_t Frame) override;
61  void DisableCaptions(uint Mode, bool OSDMsg = true) override;
62  void EnableCaptions(uint Mode, bool OSDMsg = true) override;
63  int SetTrack(uint Type, int TrackNo) override;
64  void CreateDecoder(TestBufferVec & Testbuf) override;
65  bool DoJumpChapter(int Chapter) override;
66 
67  private:
68  void DoChangeDVDTrack(void);
69  void DisplayDVDButton(void);
70  void DisplayLastFrame(void);
71 
72  int m_buttonVersion { 0 };
73  bool m_dvdStillFrameShowing { false };
74 
75  // additional bookmark seeking information
76  int m_initialTitle { -1 };
77  int m_initialAudioTrack { -1 };
79  QString m_initialDvdState { };
80 
81  // still frame timing
83  int m_stillFrameLength { 0 };
84  QMutex m_stillFrameTimerLock { QMutex::Recursive };
85 };
86 
87 #endif // MYTHDVDPLAYER_H
MythDVDPlayer::EnableCaptions
void EnableCaptions(uint Mode, bool OSDMsg=true) override
Definition: mythdvdplayer.cpp:54
MythDVDPlayer::DisableCaptions
void DisableCaptions(uint Mode, bool OSDMsg=true) override
Definition: mythdvdplayer.cpp:47
MythDVDPlayer::VideoStart
void VideoStart(void) override
Definition: mythdvdplayer.cpp:116
MythDVDPlayer::SetTrack
int SetTrack(uint Type, int TrackNo) override
Definition: mythdvdplayer.cpp:522
MythDVDPlayer::SetStillFrameTimeout
void SetStillFrameTimeout(int Length)
Definition: mythdvdplayer.cpp:728
MythDVDPlayer::GoToMenu
bool GoToMenu(const QString &Menu) override
Definition: mythdvdplayer.cpp:653
MythTimer
A QElapsedTimer based timer to replace use of QTime as a timer.
Definition: mythtimer.h:14
MythDVDPlayer::JumpToFrame
bool JumpToFrame(uint64_t Frame) override
Definition: mythdvdplayer.cpp:257
MythDVDPlayer::CreateDecoder
void CreateDecoder(TestBufferVec &Testbuf) override
Definition: mythdvdplayer.cpp:759
MythDVDPlayer::HasReachedEof
bool HasReachedEof(void) const override
Definition: mythdvdplayer.cpp:39
MythDVDPlayer::ResetStillFrameTimer
void ResetStillFrameTimer(void)
Definition: mythdvdplayer.cpp:721
Frame
Definition: zmdefines.h:94
MythDVDPlayer::m_initialDvdState
QString m_initialDvdState
Definition: mythdvdplayer.h:79
MythDVDPlayer::DisplayLastFrame
void DisplayLastFrame(void)
Definition: mythdvdplayer.cpp:232
mythplayer.h
PlayerFlags
PlayerFlags
Definition: mythplayer.h:83
MythPlayer
Definition: mythplayer.h:128
VideoFrame
Definition: mythframe.h:135
MythDVDPlayer::DecoderGetFrameFFREW
bool DecoderGetFrameFFREW(void) override
Definition: mythdvdplayer.cpp:92
MythDVDPlayer::IsInStillFrame
bool IsInStillFrame() const override
Definition: mythdvdplayer.cpp:680
MythDVDPlayer::SwitchAngle
bool SwitchAngle(int Angle) override
Definition: mythdvdplayer.cpp:709
MythDVDPlayer::InitialSeek
void InitialSeek(void) override
Definition: mythdvdplayer.cpp:289
MythDVDPlayer::ReleaseNextVideoFrame
void ReleaseNextVideoFrame(VideoFrame *Buffer, int64_t Timecode, bool Wrap=true) override
Definition: mythdvdplayer.cpp:32
MythDVDPlayer::DoChangeDVDTrack
void DoChangeDVDTrack(void)
MythDVDPlayer::SeekForScreenGrab
void SeekForScreenGrab(uint64_t &Number, uint64_t FrameNum, bool Absolute) override
Definition: mythdvdplayer.cpp:500
MythDVDPlayer::PreProcessNormalFrame
void PreProcessNormalFrame(void) override
Definition: mythdvdplayer.cpp:111
MythDVDPlayer::GoToDVDProgram
void GoToDVDProgram(bool Direction) override
Definition: mythdvdplayer.cpp:670
MythDVDPlayer::m_dvdStillFrameShowing
bool m_dvdStillFrameShowing
Definition: mythdvdplayer.h:73
MythDVDPlayer::StillFrameCheck
void StillFrameCheck(void)
Definition: mythdvdplayer.cpp:739
MythDVDPlayer
Definition: mythdvdplayer.h:11
MythDVDPlayer::AutoDeint
void AutoDeint(VideoFrame *Frame, bool AllowLock=true) override
Check whether deinterlacing should be enabled.
Definition: mythdvdplayer.cpp:13
MythDVDPlayer::PrepareAudioSample
bool PrepareAudioSample(int64_t &Timecode) override
Definition: mythdvdplayer.cpp:327
MythDVDPlayer::GetChapterTimes
void GetChapterTimes(QList< long long > &Times) override
Definition: mythdvdplayer.cpp:547
MythDVDPlayer::GetCurrentAngle
int GetCurrentAngle(void) const override
Definition: mythdvdplayer.cpp:692
TestBufferVec
std::vector< char > TestBufferVec
Definition: decoderbase.h:24
MythDVDPlayer::MythDVDPlayer
MythDVDPlayer(PlayerFlags flags=kNoFlags)
Definition: mythdvdplayer.h:15
MythDVDPlayer::CalcMaxFFTime
long long CalcMaxFFTime(long long FastFwd, bool Setjump=true) const override
CalcMaxFFTime(ffframes): forward ffframes forward.
Definition: mythdvdplayer.cpp:460
uint
unsigned int uint
Definition: compat.h:140
MythDVDPlayer::Rewind
bool Rewind(float Seconds) override
Definition: mythdvdplayer.cpp:250
MythDVDPlayer::EventEnd
virtual void EventEnd(void)
Definition: mythdvdplayer.cpp:321
MythDVDPlayer::GetCurrentChapter
int GetCurrentChapter(void) override
Definition: mythdvdplayer.cpp:540
MythDVDPlayer::m_stillFrameTimerLock
QMutex m_stillFrameTimerLock
Definition: mythdvdplayer.h:84
MythDVDPlayer::ResetPlaying
void ResetPlaying(bool ResetFrames=true) override
Definition: mythdvdplayer.cpp:316
kNoFlags
@ kNoFlags
Definition: mythplayer.h:84
MythDVDPlayer::DisplayPauseFrame
void DisplayPauseFrame(void) override
Definition: mythdvdplayer.cpp:70
Buffer
Definition: MythExternControl.h:37
MythDVDPlayer::GetNumChapters
int GetNumChapters(void) override
Definition: mythdvdplayer.cpp:533
Clear
#define Clear(a)
Definition: audiooutputopensles.cpp:49
MythDVDPlayer::GetBookmark
uint64_t GetBookmark(void) override
Definition: mythdvdplayer.cpp:384
MythDVDPlayer::DecoderPauseCheck
void DecoderPauseCheck(void) override
Definition: mythdvdplayer.cpp:81
MythDVDPlayer::m_stillFrameLength
int m_stillFrameLength
Definition: mythdvdplayer.h:83
MythDVDPlayer::m_stillFrameTimer
MythTimer m_stillFrameTimer
Definition: mythdvdplayer.h:82
MythDVDPlayer::PrebufferEnoughFrames
bool PrebufferEnoughFrames(int MinBuffers=0) override
Definition: mythdvdplayer.cpp:87
MythDVDPlayer::m_initialSubtitleTrack
int m_initialSubtitleTrack
Definition: mythdvdplayer.h:78
MythDVDPlayer::DecoderGetFrameREW
bool DecoderGetFrameREW(void) override
Definition: mythdvdplayer.cpp:104
MythDVDPlayer::SetBookmark
void SetBookmark(bool Clear=false) override
Definition: mythdvdplayer.cpp:336
MythDVDPlayer::DoJumpChapter
bool DoJumpChapter(int Chapter) override
Definition: mythdvdplayer.cpp:554
MythDVDPlayer::ChangeSpeed
void ChangeSpeed(void) override
Definition: mythdvdplayer.cpp:432
MythDVDPlayer::VideoLoop
bool VideoLoop(void) override
Definition: mythdvdplayer.cpp:124
MythDVDPlayer::EventStart
void EventStart(void) override
Definition: mythdvdplayer.cpp:267
MythDVDPlayer::m_initialTitle
int m_initialTitle
Definition: mythdvdplayer.h:76
MythDVDPlayer::FastForward
bool FastForward(float Seconds) override
Definition: mythdvdplayer.cpp:243
MythDVDPlayer::m_initialAudioTrack
int m_initialAudioTrack
Definition: mythdvdplayer.h:77
MythDVDPlayer::GetTotalSeconds
int64_t GetTotalSeconds(bool HonorCutList, int Divisor=1000) const override
Definition: mythdvdplayer.cpp:486
MythDVDPlayer::GetSecondsPlayed
int64_t GetSecondsPlayed(bool HonorCutList, int Divisor=1000) override
Definition: mythdvdplayer.cpp:468
MythDVDPlayer::GetAngleName
QString GetAngleName(int Angle) const override
Definition: mythdvdplayer.cpp:699
MythDVDPlayer::DisplayDVDButton
void DisplayDVDButton(void)
Definition: mythdvdplayer.cpp:592
MythDVDPlayer::GetNumAngles
int GetNumAngles(void) const override
Definition: mythdvdplayer.cpp:685
MythDVDPlayer::m_buttonVersion
int m_buttonVersion
Definition: mythdvdplayer.h:72