MythTV master
mythdvdplayer.cpp
Go to the documentation of this file.
1#include <algorithm>
2
3// MythTV
7
8#include "DVD/mythdvdbuffer.h"
10#include "DVD/mythdvdplayer.h"
11#include "tv_play.h"
12
13#define LOC QString("DVDPlayer: ")
14
16 : MythPlayerUI(MainWindow, Tv, Context, Flags)
17{
18 connect(Tv, &TV::GoToMenu, this, &MythDVDPlayer::GoToMenu);
21}
22
24 std::chrono::microseconds FrameInterval, bool AllowLock)
25{
26 bool dummy = false;
28 {
29 MythPlayerUI::AutoDeint(Frame, VideoOutput, FrameInterval, AllowLock);
30 return;
31 }
32
34}
35
44 std::chrono::milliseconds Timecode, bool /*wrap*/)
45{
48}
49
51{
52 EofState eof = GetEof();
53 // DeleteMap and EditMode from the parent MythPlayer should not be
54 // relevant here.
55 return eof != kEofStateNone && !m_allPaused;
56}
57
59{
61 SetCaptionsEnabled(false, false);
62}
63
65{
69}
70
72{
74 {
75 int track = GetTrack(kTrackTypeSubtitle);
76 if (track >= 0 && track < static_cast<int>(m_decoder->GetTrackCount(kTrackTypeSubtitle)))
77 {
78 StreamInfo stream = m_decoder->GetTrackInfo(kTrackTypeSubtitle, static_cast<uint>(track));
80 }
81 }
83}
84
86{
91}
92
94{
97}
98
100{
102}
103
105{
107 if (m_decoderChangeLock.tryLock(1))
108 {
109 if (m_decoder)
111 m_decoderChangeLock.unlock();
112 }
113}
114
116{
118}
119
121{
122 if (!m_initialDvdState.isEmpty())
124
126}
127
129{
130 if (!m_playerCtx->m_buffer->IsDVD())
131 {
132 SetErrored("RingBuffer is not a DVD.");
133 return !IsErrored();
134 }
135
136 int nbframes = 0;
137 if (m_videoOutput)
138 nbframes = m_videoOutput->ValidVideoFrames();
139
140#if 0
141 LOG(VB_PLAYBACK, LOG_DEBUG,
142 LOC + QString("Validframes %1, FreeFrames %2, VideoPaused %3")
143 .arg(nbframes).arg(videoOutput->FreeVideoFrames()).arg(videoPaused));
144#endif
145
146 // completely drain the video buffers for certain situations
147 bool release_all = m_playerCtx->m_buffer->DVD()->DVDWaitingForPlayer() &&
148 (nbframes > 0);
149 bool release_one = (nbframes > 1) && m_videoPaused && !m_allPaused &&
153 if (release_all || release_one)
154 {
155 if (nbframes < 5 && m_videoOutput)
157
158 // if we go below the pre-buffering limit, the player will pause
159 // so do this 'manually'
160 DisplayNormalFrame(false);
161 // unpause the still frame if more frames become available
162 if (m_dvdStillFrameShowing && nbframes > 1)
163 {
165 UnpauseVideo();
166 }
167 return !IsErrored();
168 }
169
170 // clear the mythtv imposed wait state
172 {
173 LOG(VB_PLAYBACK, LOG_INFO, LOC + "Clearing MythTV DVD wait state");
175 ClearAfterSeek(true);
177 UnpauseVideo();
178 return !IsErrored();
179 }
180
181 // wait for the video buffers to drain
182 if (nbframes < 2)
183 {
184 // clear the DVD wait state
186 {
187 LOG(VB_PLAYBACK, LOG_INFO, LOC + "Clearing DVD wait state");
190 UnpauseVideo();
191 return !IsErrored();
192 }
193
194 // the still frame is treated as a pause frame
196 {
197 // ensure we refresh the pause frame
199 m_needNewPauseFrame = true;
200
201 // we are in a still frame so pause video output
202 if (!m_videoPaused)
203 {
204 PauseVideo();
206 return !IsErrored();
207 }
208
209 // see if the pause frame has timed out
211
212 // flag if we have no frame
213 if (nbframes == 0)
214 {
215 LOG(VB_PLAYBACK, LOG_WARNING, LOC + "In DVD Menu: No video frames in queue");
216 std::this_thread::sleep_for(10ms);
217 return !IsErrored();
218 }
219
221 }
222 }
223
224 // unpause the still frame if more frames become available
225 if (m_dvdStillFrameShowing && nbframes > 1)
226 {
227 UnpauseVideo();
229 return !IsErrored();
230 }
231
233}
234
235bool MythDVDPlayer::FastForward(float Seconds)
236{
237 if (m_decoder)
239 return MythPlayerUI::FastForward(Seconds);
240}
241
242bool MythDVDPlayer::Rewind(float Seconds)
243{
244 if (m_decoder)
246 return MythPlayerUI::Rewind(Seconds);
247}
248
250{
251 if (Frame == ~0x0ULL)
252 return false;
253
254 if (m_decoder)
257}
258
260{
261 if (m_playerCtx->m_buffer->DVD())
263
264 m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
266 {
267 QString name;
268 QString serialid;
269 if (m_playerCtx->m_playingInfo->GetTitle().isEmpty() &&
271 m_playerCtx->m_buffer->DVD()->GetNameAndSerialNum(name, serialid))
272 {
274 }
275 }
276 m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
277
279}
280
282{
284
285 if (m_initialTitle > -1)
287
288 if (m_initialAudioTrack > -1)
291 if (m_initialSubtitleTrack > -1)
294
295 if (m_bookmarkSeek > 30)
296 {
297 // we need to trigger a dvd cell change to ensure the new title length
298 // is set and the position map updated accordingly
299 m_decodeOneFrame = true;
300 int count = 0;
301 while (count++ < 100 && m_decodeOneFrame)
302 std::this_thread::sleep_for(50ms);
303 }
306}
307
308void MythDVDPlayer::ResetPlaying(bool /*ResetFrames*/)
309{
311}
312
314{
315 if (m_playerCtx->m_buffer->DVD())
316 m_playerCtx->m_buffer->DVD()->SetParent(nullptr);
317}
318
319bool MythDVDPlayer::PrepareAudioSample(std::chrono::milliseconds &Timecode)
320{
322 WrapTimecode(Timecode, TC_AUDIO);
323
324 return m_playerCtx->m_buffer->IsDVD() &&
326}
327
329{
330 if (!m_playerCtx->m_buffer->IsDVD())
331 return;
332
333 QStringList fields;
334 QString name;
335 QString serialid;
336 QString dvdstate;
337
338 if (!m_playerCtx->m_buffer->IsInMenu() &&
340 {
341 if (!m_playerCtx->m_buffer->DVD()->GetNameAndSerialNum(name, serialid))
342 {
343 LOG(VB_GENERAL, LOG_ERR, LOC +
344 "DVD has no name and serial number. Cannot set bookmark.");
345 return;
346 }
347
348 if (!Clear && !m_playerCtx->m_buffer->DVD()->GetDVDStateSnapshot(dvdstate))
349 {
350 LOG(VB_GENERAL, LOG_ERR, LOC +
351 "Unable to retrieve DVD state. Cannot set bookmark.");
352 return;
353 }
354
355 m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
357 {
358 fields += serialid;
359 fields += name;
360
361 if (!Clear)
362 {
363 LOG(VB_PLAYBACK, LOG_INFO, LOC + "Set bookmark");
364 fields += dvdstate;
365 }
366 else
367 {
368 LOG(VB_PLAYBACK, LOG_INFO, LOC + "Clear bookmark");
369 }
370
372
373 }
374 m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
375 }
376}
377
379{
381 return 0;
382
383 QString name;
384 QString serialid;
385 uint64_t frames = 0;
386 m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
388 {
389 if (!m_playerCtx->m_buffer->DVD()->GetNameAndSerialNum(name, serialid))
390 {
391 m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
392 return 0;
393 }
394
395 QStringList dvdbookmark = m_playerCtx->m_playingInfo->QueryDVDBookmark(serialid);
396
397 if (!dvdbookmark.empty())
398 {
399 QStringList::Iterator it = dvdbookmark.begin();
400
401 if (dvdbookmark.count() == 1)
402 {
403 m_initialDvdState = *it;
404 frames = ~0x0ULL;
405 LOG(VB_PLAYBACK, LOG_INFO, LOC + "Get Bookmark: bookmark found");
406 }
407 else
408 {
409 // Legacy bookmarks
410 m_initialTitle = (*it).toInt();
411 frames = ((*++it).toLongLong() & 0xffffffffLL);
412 m_initialAudioTrack = (*++it).toInt();
413 m_initialSubtitleTrack = (*++it).toInt();
414 LOG(VB_PLAYBACK, LOG_INFO, LOC +
415 QString("Get Bookmark: title %1 audiotrack %2 subtrack %3 "
416 "frame %4")
418 .arg(m_initialSubtitleTrack).arg(frames));
419 }
420 }
421 }
422 m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
423 return frames;
424}
425
427{
428 if (m_stillFrameLength > 0s)
429 {
431 // Get the timestretched elapsed time and transform
432 // it to what the unstretched value would have been
433 // had we been playing with the new timestretch value
434 // all along
435 auto elapsed = millisecondsFromFloat(m_stillFrameTimer.elapsed().count() *
439 m_stillFrameTimerLock.unlock();
440 }
441
443
444 if (m_decoder)
446 if (m_playerCtx->m_buffer->IsDVD())
447 {
448 if (m_playSpeed > 1.0F)
450 else
452 }
453}
454
455long long MythDVDPlayer::CalcMaxFFTime(long long FastFwd, bool Setjump) const
456{
457 if ((m_totalFrames > 0) && m_playerCtx->m_buffer->IsDVD() &&
459 return 0;
460 return MythPlayerUI::CalcMaxFFTime(FastFwd, Setjump);
461}
462
463std::chrono::milliseconds MythDVDPlayer::GetMillisecondsPlayed(bool /*HonorCutList*/)
464{
465 if (!m_playerCtx->m_buffer->IsDVD())
466 return 0ms;
467
468 std::chrono::milliseconds played = m_playerCtx->m_buffer->DVD()->GetCurrentTime();
469
470 if (m_stillFrameLength > 0s)
471 {
472 if (m_stillFrameLength == 255s)
473 return -1ms;
475 }
476
477 return played;
478}
479
480std::chrono::milliseconds MythDVDPlayer::GetTotalMilliseconds(bool /*HonorCutList*/) const
481{
482 std::chrono::milliseconds total = m_totalLength;
483
484 if (m_stillFrameLength > 0s)
485 {
486 if (m_stillFrameLength == 255s)
487 return -1ms;
488 total = duration_cast<std::chrono::milliseconds>(m_stillFrameLength);
489 }
490
491 return total;
492}
493
495{
496 if (kTrackTypeAudio == Type)
497 {
498 StreamInfo stream = m_decoder->GetTrackInfo(Type, TrackNo);
499 m_playerCtx->m_buffer->DVD()->SetTrack(Type, stream.m_stream_id);
500 }
501
502 MythPlayerUI::SetTrack(Type, TrackNo);
503}
504
506{
507 if (!m_playerCtx->m_buffer->IsDVD())
508 return 0;
510}
511
513{
514 if (!m_playerCtx->m_buffer->IsDVD())
515 return 0;
516 return m_playerCtx->m_buffer->DVD()->GetPart();
517}
518
519void MythDVDPlayer::GetChapterTimes(QList<std::chrono::seconds> &Times)
520{
521 if (!m_playerCtx->m_buffer->IsDVD())
522 return;
524}
525
527{
528 if (!m_playerCtx->m_buffer->IsDVD())
529 return false;
530
531 int total = GetNumChapters();
533
534 if (Chapter < 0 || Chapter > total)
535 {
536 if (Chapter < 0)
537 {
538 Chapter = current -1;
539 Chapter = std::max(Chapter, 0);
540 }
541 else if (Chapter > total)
542 {
543 Chapter = current + 1;
544 Chapter = std::min(Chapter, total);
545 }
546 }
547
548 bool success = m_playerCtx->m_buffer->DVD()->PlayTrack(Chapter);
549 if (success)
550 {
551 if (m_decoder)
552 {
554 if (m_playerCtx->m_buffer->DVD()->GetCellStart() == 0s)
555 m_decoder->SeekReset(static_cast<long long>(m_framesPlayed), 0, true, true);
556 }
558 }
559
560 m_jumpChapter = 0;
561 return success;
562}
563
565{
566 if (!m_playerCtx->m_buffer->IsDVD())
567 return;
568
569 uint buttonversion = 0;
570 AVSubtitle *dvdSubtitle = m_playerCtx->m_buffer->DVD()->GetMenuSubtitle(buttonversion);
571 bool numbuttons = m_playerCtx->m_buffer->DVD()->NumMenuButtons() != 0;
572
573 bool expired = false;
574
575 MythVideoFrame *currentFrame = m_videoOutput ? m_videoOutput->GetLastShownFrame() : nullptr;
576
577 if (!currentFrame)
578 {
580 return;
581 }
582
583 if (dvdSubtitle &&
584 (dvdSubtitle->end_display_time > dvdSubtitle->start_display_time) &&
585 (dvdSubtitle->end_display_time < currentFrame->m_timecode.count()))
586 {
587 expired = true;
588 }
589
590 // nothing to do
591 if (!expired && (buttonversion == (static_cast<uint>(m_buttonVersion))))
592 {
594 return;
595 }
596
597 // clear any buttons
598 if (!numbuttons || !dvdSubtitle || (buttonversion == 0) || expired)
599 {
601 m_buttonVersion = 0;
603 return;
604 }
605
606 if ((currentFrame->m_timecode > 0ms) &&
607 (dvdSubtitle->start_display_time > currentFrame->m_timecode.count()))
608 {
610 return;
611 }
612
613 m_buttonVersion = static_cast<int>(buttonversion);
614 QRect buttonPos = m_playerCtx->m_buffer->DVD()->GetButtonCoords();
615 m_captionsOverlay.DisplayDVDButton(dvdSubtitle, buttonPos);
618 if (oldcaptions != m_captionsState.m_textDisplayMode)
621}
622
623void MythDVDPlayer::GoToMenu(const QString& Menu)
624{
625 if (!m_playerCtx->m_buffer->IsDVD())
626 return;
627
630 if (oldcaptions != m_captionsState.m_textDisplayMode)
632
633 if (!m_playerCtx->m_buffer->DVD()->GoToMenu(Menu))
634 {
635 UpdateOSDMessage(tr("DVD Menu Not Available"), kOSDTimeout_Med);
636 LOG(VB_GENERAL, LOG_ERR, "No DVD Menu available.");
637 }
638}
639
641{
642 if (auto * dvd = m_playerCtx->m_buffer->DVD(); dvd)
643 {
644 if (Direction)
645 dvd->GoToPreviousProgram();
646 else
647 dvd->GoToNextProgram();
648 }
649}
650
652{
653 return (m_stillFrameLength > 0s);
654}
655
657{
659 return m_playerCtx->m_buffer->DVD()->GetNumAngles();
660 return 0;
661}
662
664{
667 return -1;
668}
669
670QString MythDVDPlayer::GetAngleName(int Angle) const
671{
672 if (Angle >= 1 && Angle <= GetNumAngles())
673 {
674 QString name = tr("Angle %1").arg(Angle);
675 return name;
676 }
677 return {};
678}
679
681{
682 int total = GetNumAngles();
683 if (!total || Angle == GetCurrentAngle())
684 return false;
685
686 if (Angle < 1 || Angle > total)
687 Angle = 1;
688
689 return m_playerCtx->m_buffer->DVD()->SwitchAngle(Angle);
690}
691
692void MythDVDPlayer::SetStillFrameTimeout(std::chrono::seconds Length)
693{
694 if (Length != m_stillFrameLength)
695 {
697 m_stillFrameLength = Length;
699 m_stillFrameTimerLock.unlock();
700 }
701}
702
704{
705 if (m_playerCtx->m_buffer->IsDVD() &&
707 (m_stillFrameLength > 0s) && (m_stillFrameLength < 255s))
708 {
710 auto elapsedTime = secondsFromFloat(m_stillFrameTimer.elapsed().count() * m_playSpeed / 1000.0F);
711 m_stillFrameTimerLock.unlock();
712 if (elapsedTime >= m_stillFrameLength)
713 {
714 LOG(VB_PLAYBACK, LOG_INFO, LOC +
715 QString("Stillframe timeout after %1 seconds (timestretch %2)")
716 .arg(m_stillFrameLength.count()).arg(static_cast<double>(m_playSpeed)));
719 }
720 }
721}
722
724{
727}
#define Clear(a)
static bool CanHandle(TestBufferVec &testbuf, const QString &filename)
Perform an av_probe_input_format on the passed data to see if we can decode it with this class.
virtual uint GetTrackCount(uint Type)
virtual void UpdateFramesPlayed(void)
virtual void SeekReset(long long newkey, uint skipFrames, bool doFlush, bool discardFrames)
Definition: decoderbase.cpp:74
StreamInfo GetTrackInfo(uint Type, uint TrackNo)
MythCodecContext * GetMythCodecContext(void)
Definition: decoderbase.h:253
void DisplayDVDButton(AVSubtitle *DVDButton, QRect &Pos)
virtual bool IsDeinterlacing(bool &, bool=false)
bool IsDatabaseIgnored(void) const
/brief Returns true if database is being ignored.
void WaitSkip(void)
int NumMenuButtons(void) const
bool PlayTrack(int Track)
void SkipDVDWaitingForPlayer(void)
int NumPartsInTitle(void) const
void SetDVDSpeed(void)
set dvd speed. uses the constant DVD_DRIVE_SPEED table
bool GetDVDStateSnapshot(QString &State)
Get a snapshot of the current DVD VM state.
void PlayTitleAndPart(int Title, int Part)
bool SwitchAngle(int Angle)
bool RestoreDVDStateSnapshot(const QString &State)
Restore a DVD VM from a snapshot.
bool DVDWaitingForPlayer(void) const
void GetChapterTimes(QList< std::chrono::seconds > &Times)
int GetNumAngles(void) const
bool IsStillFramePending(void) const
QRect GetButtonCoords(void)
get coordinates of highlighted button
std::chrono::seconds TitleTimeLeft(void) const
returns seconds left in the title
std::chrono::seconds GetCellStart(void) const
get the start of the cell in seconds
std::chrono::seconds GetCurrentTime(void) const
void SkipStillFrame(void)
bool GoToMenu(const QString &str)
jump to a dvd root or chapter menu
int GetCurrentAngle(void) const
void ReleaseMenuButton(void)
int GetPart(void) const
void SetTrack(uint Type, int TrackNo)
set the dvd subtitle/audio track used
AVSubtitle * GetMenuSubtitle(uint &Version)
returns dvd menu button information if available.
bool IsOpen(void) const override
void SetParent(MythDVDPlayer *Parent)
bool IsInStillFrame(void) const override
bool GetNameAndSerialNum(QString &Name, QString &SerialNumber) override
Get the dvd title and serial num.
bool IsWaiting(void) const
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
virtual void IgnoreWaitStates(bool)
virtual bool IsInMenu(void) const
virtual bool IsBookmarkAllowed(void)
bool IsDVD(void) const
const MythDVDBuffer * DVD(void) const
virtual bool IsInDiscMenuOrStillFrame(void) const
QString GetFilename(void) const
std::chrono::milliseconds & DisplayTimecode()
virtual void SetTrack(uint Type, uint TrackNo)
void CaptionsStateChanged(MythCaptionsState &CaptionsState)
void SetCaptionsEnabled(bool Enable, bool UpdateOSD=true)
MythCaptionsOverlay m_captionsOverlay
MythCaptionsState m_captionsState
virtual void DisableCaptions(uint Mode, bool UpdateOSD=true)
virtual void EnableCaptions(uint Mode, bool UpdateOSD=true)
void UpdateOSDMessage(const QString &Message)
virtual void VideoStart()
virtual void InitialSeek()
virtual bool VideoLoop()
virtual void DisplayPauseFrame()
virtual void EventStart()
void ChangeSpeed() override
virtual bool DisplayNormalFrame(bool CheckPrebuffer=true)
virtual bool Rewind(float seconds)
Definition: mythplayer.cpp:869
bool m_needNewPauseFrame
Definition: mythplayer.h:391
virtual void ReleaseNextVideoFrame(MythVideoFrame *buffer, std::chrono::milliseconds timecode, bool wrap=true)
Places frame on the queue of frames ready for display.
Definition: mythplayer.cpp:595
std::chrono::microseconds m_frameInterval
always adjusted for play_speed
Definition: mythplayer.h:486
void UnpauseVideo(void)
Definition: mythplayer.cpp:224
bool m_decodeOneFrame
Definition: mythplayer.h:389
bool m_allPaused
Definition: mythplayer.h:394
void SetDecoder(DecoderBase *dec)
Sets the stream decoder, deleting any existing recorder.
DecoderBase * m_decoder
Definition: mythplayer.h:362
virtual bool JumpToFrame(uint64_t frame)
Definition: mythplayer.cpp:892
virtual bool FastForward(float seconds)
Definition: mythplayer.cpp:839
QRecursiveMutex m_decoderChangeLock
Definition: mythplayer.h:363
uint64_t m_framesPlayed
Definition: mythplayer.h:424
virtual void ResetPlaying(bool resetframes=true)
Definition: mythplayer.cpp:919
uint64_t m_bookmarkSeek
Definition: mythplayer.h:413
int m_jumpChapter
Definition: mythplayer.h:410
virtual long long CalcMaxFFTime(long long ff, bool setjump=true) const
CalcMaxFFTime(ffframes): forward ffframes forward.
float m_nextPlaySpeed
Definition: mythplayer.h:483
void SetErrored(const QString &reason)
uint64_t m_totalFrames
Definition: mythplayer.h:425
bool m_videoPaused
Definition: mythplayer.h:393
PlayerFlags m_playerFlags
Definition: mythplayer.h:372
float m_playSpeed
Definition: mythplayer.h:484
bool IsErrored(void) const
virtual bool PrebufferEnoughFrames(int min_buffers=0)
Definition: mythplayer.cpp:720
void WrapTimecode(std::chrono::milliseconds &timecode, TCTypes tc_type)
MythPlayerAVSync m_avSync
Definition: mythplayer.h:430
void PauseVideo(void)
Definition: mythplayer.cpp:216
void ClearAfterSeek(bool clearvideobuffers=true)
This is to support seeking...
virtual void DecoderPauseCheck(void)
PlayerContext * m_playerCtx
Definition: mythplayer.h:366
std::chrono::seconds m_totalLength
Definition: mythplayer.h:426
MythVideoOutput * m_videoOutput
Definition: mythplayer.h:364
virtual void DoFFRewSkip(void)
EofState GetEof(void) const
void addMSecs(std::chrono::milliseconds ms)
Adds an offset to the last call to start() or restart().
Definition: mythtimer.cpp:146
std::chrono::milliseconds restart(void)
Returns milliseconds elapsed since last start() or restart() and resets the count.
Definition: mythtimer.cpp:62
std::chrono::milliseconds elapsed(void)
Returns milliseconds elapsed since last start() or restart()
Definition: mythtimer.cpp:91
std::chrono::milliseconds m_timecode
Definition: mythframe.h:130
virtual void UpdatePauseFrame(std::chrono::milliseconds &, FrameScanType=kScan_Progressive)
Definition: mythvideoout.h:87
bool EnoughFreeFrames()
Returns true iff enough frames are available to decode onto.
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)
virtual void AutoDeint(MythVideoFrame *Frame, MythVideoOutput *VideoOutput, std::chrono::microseconds FrameInterval, bool AllowLock=true)
Check whether deinterlacing should be enabled.
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)
QString GetTitle(void) const
Definition: programinfo.h:362
QStringList QueryDVDBookmark(const QString &serialid) const
Queries "dvdbookmark" table for bookmarking DVD serial number.
static void SaveDVDBookmark(const QStringList &fields)
int m_stream_id
Definition: decoderbase.h:104
void GoToDVDProgram(bool Direction)
void GoToMenu(const QString &Menu)
Control TV playback.
Definition: tv_play.h:156
This class serves as the base class for all video output methods.
EofState
Definition: decoderbase.h:68
@ kEofStateNone
Definition: decoderbase.h:69
std::vector< char > TestBufferVec
Definition: decoderbase.h:23
@ kTrackTypeSubtitle
Definition: decoderbase.h:31
@ kTrackTypeAudio
Definition: decoderbase.h:29
unsigned int uint
Definition: freesurround.h:24
std::enable_if_t< std::is_floating_point_v< T >, std::chrono::milliseconds > millisecondsFromFloat(T value)
Helper function for convert a floating point number to a duration.
Definition: mythchrono.h:91
std::enable_if_t< std::is_floating_point_v< T >, std::chrono::seconds > secondsFromFloat(T value)
Helper function for convert a floating point number to a duration.
Definition: mythchrono.h:80
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
#define LOC
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
PlayerFlags
Definition: mythplayer.h:65
@ TC_AUDIO
Definition: mythplayer.h:57
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:15
@ kOSDTimeout_Med
Definition: osd.h:60
Mode
Definition: synaesthesia.h:23
@ kDisplayNone
Definition: videoouttypes.h:12
@ kDisplayAVSubtitle
Definition: videoouttypes.h:15
@ kDisplayDVDButton
Definition: videoouttypes.h:19
@ kScan_Interlaced
Definition: videoouttypes.h:98
@ kScan_Progressive