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:
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 void DoFFRewSkip(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 GoToMenu(const QString& Menu);
62 void GoToDVDProgram(bool Direction);
63 void SetBookmark(bool Clear = false) override;
64 void DisableCaptions(uint Mode, bool OSDMsg = true) override;
65 void EnableCaptions(uint Mode, bool OSDMsg = true) override;
66 void SetTrack(uint Type, uint TrackNo) override;
68
69 private:
70 void DisplayDVDButton(void);
71
72 int m_buttonVersion { 0 };
73 bool m_dvdStillFrameShowing { false };
74
75 // additional bookmark seeking information
76 int m_initialTitle { -1 };
80
81 // still frame timing
83 std::chrono::seconds m_stillFrameLength { 0s };
84 QRecursiveMutex m_stillFrameTimerLock;
85};
86
87#endif // MYTHDVDPLAYER_H
#define Clear(a)
bool Rewind(float Seconds) override
bool SwitchAngle(int Angle) override
void DisableDVDSubtitles()
bool IsInStillFrame() const override
int GetCurrentAngle(void) const override
bool DoJumpChapter(int Chapter) override
void DisableCaptions(uint Mode, bool OSDMsg=true) override
void VideoStart(void) override
virtual void EventEnd(void)
uint64_t GetBookmark(void) override
int m_initialAudioTrack
Definition: mythdvdplayer.h:77
bool JumpToFrame(uint64_t Frame) override
bool FastForward(float Seconds) override
bool HasReachedEof(void) const override
MythTimer m_stillFrameTimer
Definition: mythdvdplayer.h:82
std::chrono::milliseconds GetTotalMilliseconds(bool HonorCutList) const override
bool PrebufferEnoughFrames(int MinBuffers=0) override
void DisplayPauseFrame(void) override
bool VideoLoop(void) override
void ChangeSpeed(void) override
void InitialSeek(void) override
int GetCurrentChapter(void) override
void GoToDVDProgram(bool Direction)
QRecursiveMutex m_stillFrameTimerLock
Definition: mythdvdplayer.h:84
void StillFrameCheck(void)
void EventStart(void) override
QString GetAngleName(int Angle) const override
bool m_dvdStillFrameShowing
Definition: mythdvdplayer.h:73
int GetNumChapters(void) override
bool PrepareAudioSample(std::chrono::milliseconds &Timecode) override
void SetStillFrameTimeout(std::chrono::seconds Length)
void GoToMenu(const QString &Menu)
void SetBookmark(bool Clear=false) override
void DisplayDVDButton(void)
std::chrono::seconds m_stillFrameLength
Definition: mythdvdplayer.h:83
void CreateDecoder(TestBufferVec &Testbuf) override
void DoFFRewSkip(void) override
MythDVDPlayer(MythMainWindow *MainWindow, TV *Tv, PlayerContext *Context, PlayerFlags Flags=kNoFlags)
void AutoDeint(MythVideoFrame *Frame, MythVideoOutput *VideoOutput, std::chrono::microseconds FrameInterval, bool AllowLock=true) override
Check whether deinterlacing should be enabled.
void ReleaseNextVideoFrame(MythVideoFrame *Buffer, std::chrono::milliseconds Timecode, bool Wrap=true) override
void ResetPlaying(bool ResetFrames=true) override
int m_initialSubtitleTrack
Definition: mythdvdplayer.h:78
void GetChapterTimes(QList< std::chrono::seconds > &Times) override
void DecoderPauseCheck(void) override
void DoDisableDVDSubtitles()
long long CalcMaxFFTime(long long FastFwd, bool Setjump=true) const override
CalcMaxFFTime(ffframes): forward ffframes forward.
void SetTrack(uint Type, uint TrackNo) override
std::chrono::milliseconds GetMillisecondsPlayed(bool HonorCutList) override
void PreProcessNormalFrame(void) override
QString m_initialDvdState
Definition: mythdvdplayer.h:79
void EnableCaptions(uint Mode, bool OSDMsg=true) override
int GetNumAngles(void) const override
A QElapsedTimer based timer to replace use of QTime as a timer.
Definition: mythtimer.h:14
Control TV playback.
Definition: tv_play.h:156
This class serves as the base class for all video output methods.
std::vector< char > TestBufferVec
Definition: decoderbase.h:23
unsigned int uint
Definition: freesurround.h:24
PlayerFlags
Definition: mythplayer.h:65
@ kNoFlags
Definition: mythplayer.h:66
Mode
Definition: synaesthesia.h:23