MythTV  master
mythdvdplayer.h
Go to the documentation of this file.
1 #ifndef MYTHDVDPLAYER_H
2 #define MYTHDVDPLAYER_H
3 
4 // MythTV
5 #include "mythplayerui.h"
6 
7 // Std
8 #include <cstdint>
9 
11 {
12  Q_OBJECT
13 
14  signals:
15  void DisableDVDSubtitles();
16 
17  public:
18  MythDVDPlayer(MythMainWindow* MainWindow, TV* Tv, PlayerContext* Context,PlayerFlags Flags = kNoFlags);
19 
20  void ReleaseNextVideoFrame(MythVideoFrame *Buffer, std::chrono::milliseconds Timecode, bool Wrap = true) override;
21  bool HasReachedEof(void) const override;
22  bool PrepareAudioSample(std::chrono::milliseconds &Timecode) override;
23  uint64_t GetBookmark(void) override;
24  std::chrono::milliseconds GetMillisecondsPlayed(bool HonorCutList) override;
25  std::chrono::milliseconds GetTotalMilliseconds(bool HonorCutList) const 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<std::chrono::seconds> &Times) override;
34 
35  void SetStillFrameTimeout(std::chrono::seconds Length);
36  void StillFrameCheck(void);
37 
38  protected:
39  void ResetPlaying(bool ResetFrames = true) override;
40  bool PrebufferEnoughFrames(int MinBuffers = 0) override;
41  void DecoderPauseCheck(void) override;
42  bool DecoderGetFrameFFREW(void) override;
43  bool DecoderGetFrameREW(void) override;
44  void ChangeSpeed(void) override;
45  void DisplayPauseFrame(void) override;
46  void PreProcessNormalFrame(void) override;
47  void VideoStart(void) override;
48  bool VideoLoop(void) override;
49  void EventStart(void) override;
50  virtual void EventEnd(void);
51  void InitialSeek(void) override;
53  std::chrono::microseconds FrameInterval, bool AllowLock = true) override;
54  long long CalcMaxFFTime(long long FastFwd, bool Setjump = true) const override;
55  bool FastForward(float Seconds) override;
56  bool Rewind(float Seconds) override;
57  bool JumpToFrame(uint64_t Frame) override;
58  void CreateDecoder(TestBufferVec & Testbuf) override;
59  bool DoJumpChapter(int Chapter) override;
60 
61  protected slots:
62  void GoToMenu(const QString& Menu);
63  void GoToDVDProgram(bool Direction);
64  void SetBookmark(bool Clear = false) override;
65  void DisableCaptions(uint Mode, bool OSDMsg = true) override;
66  void EnableCaptions(uint Mode, bool OSDMsg = true) override;
67  void SetTrack(uint Type, uint TrackNo) override;
68  void DoDisableDVDSubtitles();
69 
70  private:
71  void DisplayDVDButton(void);
72 
73  int m_buttonVersion { 0 };
74  bool m_dvdStillFrameShowing { false };
75 
76  // additional bookmark seeking information
77  int m_initialTitle { -1 };
78  int m_initialAudioTrack { -1 };
80  QString m_initialDvdState { };
81 
82  // still frame timing
84  std::chrono::seconds m_stillFrameLength { 0s };
85 #if QT_VERSION < QT_VERSION_CHECK(5,14,0)
86  QMutex m_stillFrameTimerLock { QMutex::Recursive };
87 #else
88  QRecursiveMutex m_stillFrameTimerLock;
89 #endif
90 };
91 
92 #endif // MYTHDVDPLAYER_H
MythDVDPlayer::EnableCaptions
void EnableCaptions(uint Mode, bool OSDMsg=true) override
Definition: mythdvdplayer.cpp:66
MythDVDPlayer::DisableCaptions
void DisableCaptions(uint Mode, bool OSDMsg=true) override
Definition: mythdvdplayer.cpp:59
MythDVDPlayer::VideoStart
void VideoStart(void) override
Definition: mythdvdplayer.cpp:123
MythVideoOutput
Definition: mythvideoout.h:35
VideoOutput
This class serves as the base class for all video output methods.
mythplayerui.h
MythTimer
A QElapsedTimer based timer to replace use of QTime as a timer.
Definition: mythtimer.h:13
MythDVDPlayer::JumpToFrame
bool JumpToFrame(uint64_t Frame) override
Definition: mythdvdplayer.cpp:252
MythDVDPlayer::CreateDecoder
void CreateDecoder(TestBufferVec &Testbuf) override
Definition: mythdvdplayer.cpp:724
MythDVDPlayer::HasReachedEof
bool HasReachedEof(void) const override
Definition: mythdvdplayer.cpp:45
Frame
Definition: zmdefines.h:93
MythDVDPlayer::m_initialDvdState
QString m_initialDvdState
Definition: mythdvdplayer.h:80
MythDVDPlayer::AutoDeint
void AutoDeint(MythVideoFrame *Frame, MythVideoOutput *VideoOutput, std::chrono::microseconds FrameInterval, bool AllowLock=true) override
Check whether deinterlacing should be enabled.
Definition: mythdvdplayer.cpp:18
MythDVDPlayer::GetMillisecondsPlayed
std::chrono::milliseconds GetMillisecondsPlayed(bool HonorCutList) override
Definition: mythdvdplayer.cpp:464
PlayerFlags
PlayerFlags
Definition: mythplayer.h:65
MythDVDPlayer::DecoderGetFrameFFREW
bool DecoderGetFrameFFREW(void) override
Definition: mythdvdplayer.cpp:99
MythDVDPlayer::IsInStillFrame
bool IsInStillFrame() const override
Definition: mythdvdplayer.cpp:652
MythDVDPlayer::PrepareAudioSample
bool PrepareAudioSample(std::chrono::milliseconds &Timecode) override
Definition: mythdvdplayer.cpp:322
MythDVDPlayer::SwitchAngle
bool SwitchAngle(int Angle) override
Definition: mythdvdplayer.cpp:681
MythDVDPlayer::InitialSeek
void InitialSeek(void) override
Definition: mythdvdplayer.cpp:284
MythDVDPlayer::m_stillFrameTimerLock
QRecursiveMutex m_stillFrameTimerLock
Definition: mythdvdplayer.h:88
MythPlayerUI
Definition: mythplayerui.h:10
MythDVDPlayer::GetChapterTimes
void GetChapterTimes(QList< std::chrono::seconds > &Times) override
Definition: mythdvdplayer.cpp:520
MythDVDPlayer::PreProcessNormalFrame
void PreProcessNormalFrame(void) override
Definition: mythdvdplayer.cpp:118
MythDVDPlayer::m_dvdStillFrameShowing
bool m_dvdStillFrameShowing
Definition: mythdvdplayer.h:74
MythDVDPlayer::StillFrameCheck
void StillFrameCheck(void)
Definition: mythdvdplayer.cpp:704
MythDVDPlayer
Definition: mythdvdplayer.h:10
MythDVDPlayer::DisableDVDSubtitles
void DisableDVDSubtitles()
MythDVDPlayer::GetTotalMilliseconds
std::chrono::milliseconds GetTotalMilliseconds(bool HonorCutList) const override
Definition: mythdvdplayer.cpp:481
MythDVDPlayer::GetCurrentAngle
int GetCurrentAngle(void) const override
Definition: mythdvdplayer.cpp:664
TestBufferVec
std::vector< char > TestBufferVec
Definition: decoderbase.h:23
MythDVDPlayer::CalcMaxFFTime
long long CalcMaxFFTime(long long FastFwd, bool Setjump=true) const override
CalcMaxFFTime(ffframes): forward ffframes forward.
Definition: mythdvdplayer.cpp:456
MythDVDPlayer::ReleaseNextVideoFrame
void ReleaseNextVideoFrame(MythVideoFrame *Buffer, std::chrono::milliseconds Timecode, bool Wrap=true) override
Definition: mythdvdplayer.cpp:38
uint
unsigned int uint
Definition: compat.h:140
MythDVDPlayer::Rewind
bool Rewind(float Seconds) override
Definition: mythdvdplayer.cpp:245
MythDVDPlayer::EventEnd
virtual void EventEnd(void)
Definition: mythdvdplayer.cpp:316
MythDVDPlayer::GetCurrentChapter
int GetCurrentChapter(void) override
Definition: mythdvdplayer.cpp:513
MythDVDPlayer::ResetPlaying
void ResetPlaying(bool ResetFrames=true) override
Definition: mythdvdplayer.cpp:311
kNoFlags
@ kNoFlags
Definition: mythplayer.h:67
MythDVDPlayer::DisplayPauseFrame
void DisplayPauseFrame(void) override
Definition: mythdvdplayer.cpp:80
Buffer
Definition: MythExternControl.h:36
MythDVDPlayer::GetNumChapters
int GetNumChapters(void) override
Definition: mythdvdplayer.cpp:506
MythDVDPlayer::GoToDVDProgram
void GoToDVDProgram(bool Direction)
Definition: mythdvdplayer.cpp:641
Clear
#define Clear(a)
Definition: audiooutputopensles.cpp:47
MythDVDPlayer::MythDVDPlayer
MythDVDPlayer(MythMainWindow *MainWindow, TV *Tv, PlayerContext *Context, PlayerFlags Flags=kNoFlags)
Definition: mythdvdplayer.cpp:10
MythDVDPlayer::GetBookmark
uint64_t GetBookmark(void) override
Definition: mythdvdplayer.cpp:379
MythDVDPlayer::DecoderPauseCheck
void DecoderPauseCheck(void) override
Definition: mythdvdplayer.cpp:88
MythDVDPlayer::m_stillFrameTimer
MythTimer m_stillFrameTimer
Definition: mythdvdplayer.h:83
MythDVDPlayer::PrebufferEnoughFrames
bool PrebufferEnoughFrames(int MinBuffers=0) override
Definition: mythdvdplayer.cpp:94
PlayerContext
Definition: playercontext.h:52
MythDVDPlayer::m_initialSubtitleTrack
int m_initialSubtitleTrack
Definition: mythdvdplayer.h:79
MythDVDPlayer::SetTrack
void SetTrack(uint Type, uint TrackNo) override
Definition: mythdvdplayer.cpp:495
MythDVDPlayer::GoToMenu
void GoToMenu(const QString &Menu)
Definition: mythdvdplayer.cpp:624
MythDVDPlayer::m_stillFrameLength
std::chrono::seconds m_stillFrameLength
Definition: mythdvdplayer.h:84
MythVideoFrame
Definition: mythframe.h:88
MythDVDPlayer::DoDisableDVDSubtitles
void DoDisableDVDSubtitles()
Definition: mythdvdplayer.cpp:53
MythDVDPlayer::DecoderGetFrameREW
bool DecoderGetFrameREW(void) override
Definition: mythdvdplayer.cpp:111
MythDVDPlayer::SetStillFrameTimeout
void SetStillFrameTimeout(std::chrono::seconds Length)
Definition: mythdvdplayer.cpp:693
MythDVDPlayer::SetBookmark
void SetBookmark(bool Clear=false) override
Definition: mythdvdplayer.cpp:331
MythDVDPlayer::DoJumpChapter
bool DoJumpChapter(int Chapter) override
Definition: mythdvdplayer.cpp:527
MythDVDPlayer::ChangeSpeed
void ChangeSpeed(void) override
Definition: mythdvdplayer.cpp:427
MythDVDPlayer::VideoLoop
bool VideoLoop(void) override
Definition: mythdvdplayer.cpp:131
MythDVDPlayer::EventStart
void EventStart(void) override
Definition: mythdvdplayer.cpp:262
MythDVDPlayer::m_initialTitle
int m_initialTitle
Definition: mythdvdplayer.h:77
MythMainWindow
Definition: mythmainwindow.h:35
MythDVDPlayer::FastForward
bool FastForward(float Seconds) override
Definition: mythdvdplayer.cpp:238
MythDVDPlayer::m_initialAudioTrack
int m_initialAudioTrack
Definition: mythdvdplayer.h:78
MythDVDPlayer::GetAngleName
QString GetAngleName(int Angle) const override
Definition: mythdvdplayer.cpp:671
MythDVDPlayer::DisplayDVDButton
void DisplayDVDButton(void)
Definition: mythdvdplayer.cpp:565
MythDVDPlayer::GetNumAngles
int GetNumAngles(void) const override
Definition: mythdvdplayer.cpp:657
MythDVDPlayer::m_buttonVersion
int m_buttonVersion
Definition: mythdvdplayer.h:73
TV
Control TV playback.
Definition: tv_play.h:154