1 #ifndef BD_RING_BUFFER_H_
2 #define BD_RING_BUFFER_H_
8 #include <QCoreApplication>
31 bool IsOpen (
void)
const override;
34 bool OpenFile (
const QString &Filename,
35 std::chrono::milliseconds Retry = kDefaultOpenTimeout)
override;
37 void ProgressUpdate (
void);
38 bool BDWaitingForPlayer (
void)
const;
39 void SkipBDWaitingForPlayer(
void);
41 bool GetBDStateSnapshot (QString&
State);
42 bool RestoreBDStateSnapshot(
const QString &
State);
43 void ClearOverlays (
void);
45 void SubmitOverlay (
const bd_overlay_s* Overlay);
46 void SubmitARGBOverlay (
const bd_argb_overlay_s* Overlay);
47 uint32_t GetNumTitles (
void)
const;
48 int GetCurrentTitle (
void);
49 uint64_t GetCurrentAngle (
void)
const;
50 std::chrono::seconds GetTitleDuration (
int Title);
51 uint64_t GetTitleSize (
void)
const;
52 std::chrono::seconds GetTotalTimeOfTitle(
void)
const;
53 std::chrono::seconds GetCurrentTime (
void)
const;
54 uint64_t GetTotalReadPosition(
void);
55 uint32_t GetNumChapters (
void);
56 uint32_t GetCurrentChapter (
void);
57 uint64_t GetNumAngles (
void)
const;
58 std::chrono::milliseconds GetChapterStartTimeMs(uint32_t Chapter);
59 std::chrono::seconds GetChapterStartTime (uint32_t Chapter);
60 uint64_t GetChapterStartFrame (uint32_t Chapter);
61 bool IsHDMVNavigation (
void)
const;
62 bool TitleChanged (
void);
63 bool IsValidStream (
uint StreamId);
64 void UnblockReading (
void);
65 bool IsReadingBlocked (
void);
66 int64_t AdjustTimestamp (int64_t Timestamp)
const;
67 void GetDescForPos (QString &Desc);
68 double GetFrameRate (
void);
73 bool SwitchTitle (uint32_t Index);
74 bool SwitchPlaylist (uint32_t Index);
75 bool SwitchAngle (
uint Angle);
79 long long SeekInternal (
long long Position,
int Whence)
override;
83 void WaitForPlayer (
void);
84 bool UpdateTitleInfo (
void);
85 BLURAY_TITLE_INFO* GetTitleInfo (uint32_t Index);
86 BLURAY_TITLE_INFO* GetPlaylistInfo(uint32_t Index);
89 bool HandleBDEvents (
void);
90 void HandleBDEvent (BD_EVENT &
Event);
92 static const BLURAY_STREAM_INFO* FindStream(
uint StreamID,
93 BLURAY_STREAM_INFO* Streams,
96 BLURAY *m_bdnav {
nullptr };
97 bool m_isHDMVNavigation {
false };
98 bool m_tryHDMVNavigation {
false };
99 bool m_topMenuSupported {
false };
100 bool m_firstPlaySupported {
false };
101 uint32_t m_numTitles { 0 };
102 uint32_t m_mainTitle { 0 };
104 BLURAY_TITLE_INFO *m_currentTitleInfo {
nullptr };
105 uint64_t m_titlesize { 0 };
106 uint64_t m_currentTitleAngleCount { 0 };
108 int m_imgHandle { -1 };
109 int m_currentTitle { -1 };
110 int m_currentPlaylist { 0 };
111 int m_currentPlayitem { 0 };
112 int m_currentChapter { 0 };
113 int m_currentAudioStream { 0 };
114 int m_currentIGStream { 0 };
115 int m_currentPGTextSTStream { 0 };
116 int m_currentSecondaryAudioStream { 0 };
117 int m_currentSecondaryVideoStream { 0 };
118 bool m_pgTextSTEnabled {
false };
119 bool m_secondaryAudioEnabled {
false };
120 bool m_secondaryVideoEnabled {
false };
121 bool m_secondaryVideoIsFullscreen {
false };
122 bool m_titleChanged {
false };
123 bool m_playerWait {
false };
124 bool m_ignorePlayerWait {
true };
128 std::chrono::seconds m_stillTime { 0 };
129 int m_stillMode { BLURAY_STILL_NONE};
130 BD_EVENT m_lastEvent { BD_EVENT_NONE, 0};
132 int64_t m_timeDiff { 0 };
136 QThread *m_mainThread {
nullptr };