14#define LOC QString("BDPlayer: ")
43 pts = duration_cast<mpeg::chrono::pts>(frame->m_timecode);
77 SetErrored(
"RingBuffer is not a Blu-Ray disc.");
98 LOG(VB_PLAYBACK, LOG_INFO,
LOC +
"Clearing Mythtv BD wait state");
125 LOG(VB_PLAYBACK, LOG_WARNING,
LOC +
"Warning: In BD Still but no video frames in queue");
126 std::this_thread::sleep_for(10ms);
131 LOG(VB_PLAYBACK, LOG_INFO,
LOC +
"Entering still frame.");
139 LOG(VB_PLAYBACK, LOG_INFO,
LOC +
"Exiting still frame.");
149 if (
Frame == ~0x0ULL)
190 auto chapter =
static_cast<uint32_t
>(Chapter - 1);
197 for (
uint i = 0; i < total; i++)
248 QString name = QString(
"%1 (%2)").arg(Title+1).arg(timestr);
257 return tr(
"Angle %1").arg(Angle);
298 if ((total < 1) || (next >= total))
311 if (!total || prev < 0)
344 if ((total < 1) || total == 1)
359 LOG(VB_GENERAL, LOG_ERR,
LOC +
"BD has no name and serial number. Cannot set bookmark.");
366 LOG(VB_GENERAL, LOG_ERR,
LOC +
"Unable to retrieve BD state. Cannot set bookmark.");
370 LOG(VB_GENERAL, LOG_INFO,
LOC + QString(
"BDState:%1").arg(bdstate));
381 LOG(VB_PLAYBACK, LOG_INFO,
LOC +
"Set bookmark");
386 LOG(VB_PLAYBACK, LOG_INFO,
LOC +
"Clear bookmark");
415 if (!bdbookmark.empty())
419 LOG(VB_PLAYBACK, LOG_INFO,
LOC +
"Get Bookmark: bookmark found");
bool GetNameAndSerialNum(QString &Name, QString &SerialNum) override
bool RestoreBDStateSnapshot(const QString &State)
Restore a BD snapshot.
void SkipBDWaitingForPlayer(void)
bool IsOpen(void) const override
int GetCurrentTitle(void)
MythBDOverlay * GetOverlay(void)
uint32_t GetNumTitles(void) const
uint32_t GetCurrentChapter(void)
uint64_t GetCurrentAngle(void) const
std::chrono::seconds GetTitleDuration(int Title)
bool SwitchAngle(uint Angle)
uint64_t GetNumAngles(void) const
bool GetBDStateSnapshot(QString &State)
Get a snapshot of the current BD state.
bool SwitchTitle(uint32_t Index)
bool IsHDMVNavigation(void) const
uint32_t GetNumChapters(void)
bool BDWaitingForPlayer(void) const
bool GoToMenu(const QString &Menu, mpeg::chrono::pts Pts)
jump to a Blu-ray root or popup menu
uint64_t GetChapterStartFrame(uint32_t Chapter)
std::chrono::seconds GetChapterStartTime(uint32_t Chapter)
bool IsInStillFrame(void) const override
int GetCurrentTitle(void) const override
void DisplayPauseFrame(void) override
void CreateDecoder(TestBufferVec &TestBuffer) override
int GetNumTitles(void) const override
void GetChapterTimes(QList< std::chrono::seconds > &ChapterTimes) override
void SetBookmark(bool Clear) override
bool HasReachedEof(void) const override
bool NextTitle(void) override
bool JumpToFrame(uint64_t Frame) override
bool PrevTitle(void) override
uint64_t GetBookmark(void) override
void GoToMenu(const QString &Menu)
QString GetTitleName(int Title) const override
bool SwitchTitle(int Title) override
int64_t GetChapter(int Chapter) override
void EventStart(void) override
QString GetAngleName(int Angle) const override
std::chrono::seconds GetTitleDuration(int Title) const override
int GetNumChapters(void) override
bool VideoLoop(void) override
bool NextAngle(void) override
void PreProcessNormalFrame(void) override
void VideoStart(void) override
int GetCurrentChapter(void) override
bool PrevAngle(void) override
MythBDPlayer(MythMainWindow *MainWindow, TV *Tv, PlayerContext *Context, PlayerFlags Flags=kNoFlags)
int GetNumAngles(void) const override
int GetCurrentAngle(void) const override
bool SwitchAngle(int Angle) override
void DisplayBDOverlay(MythBDOverlay *Overlay)
bool IsDatabaseIgnored(void) const
/brief Returns true if database is being ignored.
std::chrono::milliseconds & DisplayTimecode()
MythCaptionsOverlay m_captionsOverlay
virtual void VideoStart()
virtual void DisplayPauseFrame()
virtual void EventStart()
virtual bool DisplayNormalFrame(bool CheckPrebuffer=true)
std::chrono::microseconds m_frameInterval
always adjusted for play_speed
void SetDecoder(DecoderBase *dec)
Sets the stream decoder, deleting any existing recorder.
virtual bool JumpToFrame(uint64_t frame)
virtual int OpenFile(int Retries=4)
bool m_forcePositionMapSync
void SetErrored(const QString &reason)
PlayerFlags m_playerFlags
bool IsErrored(void) const
MythPlayerAVSync m_avSync
bool Play(float speed=1.0, bool normal=true, bool unpauseaudio=true)
PlayerContext * m_playerCtx
MythVideoOutput * m_videoOutput
EofState GetEof(void) const
virtual void UpdatePauseFrame(std::chrono::milliseconds &, FrameScanType=kScan_Progressive)
virtual int ValidVideoFrames() const
Returns number of frames that are fully decoded.
virtual MythVideoFrame * GetLastShownFrame()
Returns frame from the head of the ready to be displayed queue, if StartDisplayingFrame has been call...
void SetScanType(FrameScanType Scan, MythVideoOutput *VideoOutput, std::chrono::microseconds FrameInterval)
void LockPlayingInfo(const char *file, int line) const
MythMediaBuffer * m_buffer
void UnlockPlayingInfo(const char *file, int line) const
ProgramInfo * m_playingInfo
Currently playing info.
void SetTitle(const QString &t, const QString &st=nullptr)
QStringList QueryBDBookmark(const QString &serialid) const
Queries "bdbookmark" table for bookmarking BD serial number.
QString GetTitle(void) const
static void SaveBDBookmark(const QStringList &fields)
void GoToMenu(const QString &Menu)
std::vector< char > TestBufferVec
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
QString formatTime(std::chrono::milliseconds msecs, QString fmt)
Format a milliseconds time value.
std::chrono::duration< CHRONO_TYPE, std::ratio< 1, 90000 > > pts