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  public:
15  MythDVDPlayer(MythMainWindow* MainWindow, TV* Tv, PlayerContext* Context,PlayerFlags Flags = kNoFlags);
16 
17  void ReleaseNextVideoFrame(MythVideoFrame *Buffer, std::chrono::milliseconds Timecode, bool Wrap = true) override;
18  bool HasReachedEof(void) const override;
19  bool PrepareAudioSample(std::chrono::milliseconds &Timecode) override;
20  uint64_t GetBookmark(void) override;
21  std::chrono::milliseconds GetMillisecondsPlayed(bool HonorCutList) override;
22  std::chrono::milliseconds GetTotalMilliseconds(bool HonorCutList) const override;
23  bool GoToMenu(const QString& Menu) override;
24  void GoToDVDProgram(bool Direction) override;
25  bool IsInStillFrame() const override;
26  int GetNumAngles(void) const override;
27  int GetCurrentAngle(void) const override;
28  QString GetAngleName(int Angle) const override;
29  bool SwitchAngle(int Angle) override;
30  int GetNumChapters(void) override;
31  int GetCurrentChapter(void) override;
32  void GetChapterTimes(QList<std::chrono::seconds> &Times) override;
33 
34  void SetStillFrameTimeout(std::chrono::seconds Length);
35  void StillFrameCheck(void);
36 
37  protected:
38  void ResetPlaying(bool ResetFrames = true) override;
39  bool PrebufferEnoughFrames(int MinBuffers = 0) override;
40  void DecoderPauseCheck(void) override;
41  bool DecoderGetFrameFFREW(void) override;
42  bool DecoderGetFrameREW(void) override;
43  void ChangeSpeed(void) override;
44  void DisplayPauseFrame(void) override;
45  void PreProcessNormalFrame(void) override;
46  void VideoStart(void) override;
47  bool VideoLoop(void) override;
48  void EventStart(void) override;
49  virtual void EventEnd(void);
50  void InitialSeek(void) override;
52  std::chrono::microseconds FrameInterval, bool AllowLock = true) override;
53  long long CalcMaxFFTime(long long FastFwd, bool Setjump = true) const override;
54  bool FastForward(float Seconds) override;
55  bool Rewind(float Seconds) override;
56  bool JumpToFrame(uint64_t Frame) override;
57  void CreateDecoder(TestBufferVec & Testbuf) override;
58  bool DoJumpChapter(int Chapter) override;
59 
60  protected slots:
61  void SetBookmark(bool Clear = false) override;
62  void DisableCaptions(uint Mode, bool OSDMsg = true) override;
63  void EnableCaptions(uint Mode, bool OSDMsg = true) override;
64  void SetTrack(uint Type, uint TrackNo) override;
65 
66  private:
67  void DisplayDVDButton(void);
68 
69  int m_buttonVersion { 0 };
70  bool m_dvdStillFrameShowing { false };
71 
72  // additional bookmark seeking information
73  int m_initialTitle { -1 };
74  int m_initialAudioTrack { -1 };
76  QString m_initialDvdState { };
77 
78  // still frame timing
80  std::chrono::seconds m_stillFrameLength { 0s };
81  QMutex m_stillFrameTimerLock { QMutex::Recursive };
82 };
83 
84 #endif // MYTHDVDPLAYER_H
MythDVDPlayer::EnableCaptions
void EnableCaptions(uint Mode, bool OSDMsg=true) override
Definition: mythdvdplayer.cpp:56
MythDVDPlayer::DisableCaptions
void DisableCaptions(uint Mode, bool OSDMsg=true) override
Definition: mythdvdplayer.cpp:49
MythDVDPlayer::VideoStart
void VideoStart(void) override
Definition: mythdvdplayer.cpp:113
MythVideoOutput
Definition: mythvideoout.h:35
VideoOutput
This class serves as the base class for all video output methods.
mythplayerui.h
MythDVDPlayer::GoToMenu
bool GoToMenu(const QString &Menu) override
Definition: mythdvdplayer.cpp:614
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:242
MythDVDPlayer::CreateDecoder
void CreateDecoder(TestBufferVec &Testbuf) override
Definition: mythdvdplayer.cpp:717
MythDVDPlayer::HasReachedEof
bool HasReachedEof(void) const override
Definition: mythdvdplayer.cpp:41
Frame
Definition: zmdefines.h:93
MythDVDPlayer::m_initialDvdState
QString m_initialDvdState
Definition: mythdvdplayer.h:76
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:14
MythDVDPlayer::GetMillisecondsPlayed
std::chrono::milliseconds GetMillisecondsPlayed(bool HonorCutList) override
Definition: mythdvdplayer.cpp:454
PlayerFlags
PlayerFlags
Definition: mythplayer.h:62
MythDVDPlayer::DecoderGetFrameFFREW
bool DecoderGetFrameFFREW(void) override
Definition: mythdvdplayer.cpp:89
MythDVDPlayer::IsInStillFrame
bool IsInStillFrame() const override
Definition: mythdvdplayer.cpp:645
MythDVDPlayer::PrepareAudioSample
bool PrepareAudioSample(std::chrono::milliseconds &Timecode) override
Definition: mythdvdplayer.cpp:312
MythDVDPlayer::SwitchAngle
bool SwitchAngle(int Angle) override
Definition: mythdvdplayer.cpp:674
MythDVDPlayer::InitialSeek
void InitialSeek(void) override
Definition: mythdvdplayer.cpp:274
MythPlayerUI
Definition: mythplayerui.h:10
MythDVDPlayer::GetChapterTimes
void GetChapterTimes(QList< std::chrono::seconds > &Times) override
Definition: mythdvdplayer.cpp:510
MythDVDPlayer::PreProcessNormalFrame
void PreProcessNormalFrame(void) override
Definition: mythdvdplayer.cpp:108
MythDVDPlayer::GoToDVDProgram
void GoToDVDProgram(bool Direction) override
Definition: mythdvdplayer.cpp:635
MythDVDPlayer::m_dvdStillFrameShowing
bool m_dvdStillFrameShowing
Definition: mythdvdplayer.h:70
MythDVDPlayer::StillFrameCheck
void StillFrameCheck(void)
Definition: mythdvdplayer.cpp:697
MythDVDPlayer
Definition: mythdvdplayer.h:10
MythDVDPlayer::GetTotalMilliseconds
std::chrono::milliseconds GetTotalMilliseconds(bool HonorCutList) const override
Definition: mythdvdplayer.cpp:471
MythDVDPlayer::GetCurrentAngle
int GetCurrentAngle(void) const override
Definition: mythdvdplayer.cpp:657
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:446
MythDVDPlayer::ReleaseNextVideoFrame
void ReleaseNextVideoFrame(MythVideoFrame *Buffer, std::chrono::milliseconds Timecode, bool Wrap=true) override
Definition: mythdvdplayer.cpp:34
uint
unsigned int uint
Definition: compat.h:140
MythDVDPlayer::Rewind
bool Rewind(float Seconds) override
Definition: mythdvdplayer.cpp:235
MythDVDPlayer::EventEnd
virtual void EventEnd(void)
Definition: mythdvdplayer.cpp:306
MythDVDPlayer::GetCurrentChapter
int GetCurrentChapter(void) override
Definition: mythdvdplayer.cpp:503
MythDVDPlayer::m_stillFrameTimerLock
QMutex m_stillFrameTimerLock
Definition: mythdvdplayer.h:81
MythDVDPlayer::ResetPlaying
void ResetPlaying(bool ResetFrames=true) override
Definition: mythdvdplayer.cpp:301
kNoFlags
@ kNoFlags
Definition: mythplayer.h:64
MythDVDPlayer::DisplayPauseFrame
void DisplayPauseFrame(void) override
Definition: mythdvdplayer.cpp:70
Buffer
Definition: MythExternControl.h:36
MythDVDPlayer::GetNumChapters
int GetNumChapters(void) override
Definition: mythdvdplayer.cpp:496
Clear
#define Clear(a)
Definition: audiooutputopensles.cpp:47
MythDVDPlayer::MythDVDPlayer
MythDVDPlayer(MythMainWindow *MainWindow, TV *Tv, PlayerContext *Context, PlayerFlags Flags=kNoFlags)
Definition: mythdvdplayer.cpp:9
MythDVDPlayer::GetBookmark
uint64_t GetBookmark(void) override
Definition: mythdvdplayer.cpp:369
MythDVDPlayer::DecoderPauseCheck
void DecoderPauseCheck(void) override
Definition: mythdvdplayer.cpp:78
MythDVDPlayer::m_stillFrameTimer
MythTimer m_stillFrameTimer
Definition: mythdvdplayer.h:79
MythDVDPlayer::PrebufferEnoughFrames
bool PrebufferEnoughFrames(int MinBuffers=0) override
Definition: mythdvdplayer.cpp:84
PlayerContext
Definition: playercontext.h:48
MythDVDPlayer::m_initialSubtitleTrack
int m_initialSubtitleTrack
Definition: mythdvdplayer.h:75
MythDVDPlayer::SetTrack
void SetTrack(uint Type, uint TrackNo) override
Definition: mythdvdplayer.cpp:485
MythDVDPlayer::m_stillFrameLength
std::chrono::seconds m_stillFrameLength
Definition: mythdvdplayer.h:80
MythVideoFrame
Definition: mythframe.h:88
MythDVDPlayer::DecoderGetFrameREW
bool DecoderGetFrameREW(void) override
Definition: mythdvdplayer.cpp:101
MythDVDPlayer::SetStillFrameTimeout
void SetStillFrameTimeout(std::chrono::seconds Length)
Definition: mythdvdplayer.cpp:686
MythDVDPlayer::SetBookmark
void SetBookmark(bool Clear=false) override
Definition: mythdvdplayer.cpp:321
MythDVDPlayer::DoJumpChapter
bool DoJumpChapter(int Chapter) override
Definition: mythdvdplayer.cpp:517
MythDVDPlayer::ChangeSpeed
void ChangeSpeed(void) override
Definition: mythdvdplayer.cpp:417
MythDVDPlayer::VideoLoop
bool VideoLoop(void) override
Definition: mythdvdplayer.cpp:121
MythDVDPlayer::EventStart
void EventStart(void) override
Definition: mythdvdplayer.cpp:252
MythDVDPlayer::m_initialTitle
int m_initialTitle
Definition: mythdvdplayer.h:73
MythMainWindow
Definition: mythmainwindow.h:35
MythDVDPlayer::FastForward
bool FastForward(float Seconds) override
Definition: mythdvdplayer.cpp:228
MythDVDPlayer::m_initialAudioTrack
int m_initialAudioTrack
Definition: mythdvdplayer.h:74
MythDVDPlayer::GetAngleName
QString GetAngleName(int Angle) const override
Definition: mythdvdplayer.cpp:664
MythDVDPlayer::DisplayDVDButton
void DisplayDVDButton(void)
Definition: mythdvdplayer.cpp:555
MythDVDPlayer::GetNumAngles
int GetNumAngles(void) const override
Definition: mythdvdplayer.cpp:650
MythDVDPlayer::m_buttonVersion
int m_buttonVersion
Definition: mythdvdplayer.h:69
TV
Control TV playback.
Definition: tv_play.h:152