MythTV  master
mythdvdplayer.cpp
Go to the documentation of this file.
1 // MythTV
2 #include "mythdvdbuffer.h"
3 #include "DetectLetterbox.h"
4 #include "audiooutput.h"
5 #include "mythdvddecoder.h"
6 #include "mythdvdplayer.h"
7 
8 // Std
9 #include <unistd.h> // for usleep()
10 
11 #define LOC QString("DVDPlayer: ")
12 
14  : MythPlayerUI(MainWindow, Tv, Context, Flags)
15 {
16 }
17 
18 void MythDVDPlayer::AutoDeint(MythVideoFrame *Frame, MythVideoOutput *VideoOutput, int FrameInterval, bool AllowLock)
19 {
20  bool dummy = false;
22  {
23  MythPlayerUI::AutoDeint(Frame, VideoOutput, FrameInterval, AllowLock);
24  return;
25  }
26 
28 }
29 
38  int64_t Timecode, bool /*wrap*/)
39 {
42 }
43 
45 {
46  EofState eof = GetEof();
47  // DeleteMap and EditMode from the parent MythPlayer should not be
48  // relevant here.
49  return eof != kEofStateNone && !m_allPaused;
50 }
51 
52 void MythDVDPlayer::DisableCaptions(uint Mode, bool OSDMsg)
53 {
54  if ((kDisplayAVSubtitle & Mode) && m_playerCtx->m_buffer->IsDVD())
56  MythPlayerUI::DisableCaptions(Mode, OSDMsg);
57 }
58 
59 void MythDVDPlayer::EnableCaptions(uint Mode, bool OSDMsg)
60 {
61  if ((kDisplayAVSubtitle & Mode) && m_playerCtx->m_buffer->IsDVD())
62  {
63  int track = GetTrack(kTrackTypeSubtitle);
64  if (track >= 0 && track < static_cast<int>(m_decoder->GetTrackCount(kTrackTypeSubtitle)))
65  {
66  StreamInfo stream = m_decoder->GetTrackInfo(kTrackTypeSubtitle, static_cast<uint>(track));
68  }
69  }
70  MythPlayerUI::EnableCaptions(Mode, OSDMsg);
71 }
72 
74 {
79 }
80 
82 {
85 }
86 
87 bool MythDVDPlayer::PrebufferEnoughFrames(int /*MinBuffers*/)
88 {
90 }
91 
93 {
95  if (m_decoderChangeLock.tryLock(1))
96  {
97  if (m_decoder)
99  m_decoderChangeLock.unlock();
100  }
101  return res;
102 }
103 
105 {
107  return (m_playerCtx->m_buffer->IsDVD() &&
108  (m_playerCtx->m_buffer->DVD()->GetCurrentTime() < 2));
109 }
110 
112 {
114 }
115 
117 {
118  if (!m_initialDvdState.isEmpty())
120 
122 }
123 
125 {
126  if (!m_playerCtx->m_buffer->IsDVD())
127  {
128  SetErrored("RingBuffer is not a DVD.");
129  return !IsErrored();
130  }
131 
132  int nbframes = 0;
133  if (m_videoOutput)
134  nbframes = m_videoOutput->ValidVideoFrames();
135 
136 #if 0
137  LOG(VB_PLAYBACK, LOG_DEBUG,
138  LOC + QString("Validframes %1, FreeFrames %2, VideoPaused %3")
139  .arg(nbframes).arg(videoOutput->FreeVideoFrames()).arg(videoPaused));
140 #endif
141 
142  // completely drain the video buffers for certain situations
143  bool release_all = m_playerCtx->m_buffer->DVD()->DVDWaitingForPlayer() &&
144  (nbframes > 0);
145  bool release_one = (nbframes > 1) && m_videoPaused && !m_allPaused &&
149  if (release_all || release_one)
150  {
151  if (nbframes < 5 && m_videoOutput)
153 
154  // if we go below the pre-buffering limit, the player will pause
155  // so do this 'manually'
156  DisplayNormalFrame(false);
157  // unpause the still frame if more frames become available
158  if (m_dvdStillFrameShowing && nbframes > 1)
159  {
160  m_dvdStillFrameShowing = false;
161  UnpauseVideo();
162  }
163  return !IsErrored();
164  }
165 
166  // clear the mythtv imposed wait state
168  {
169  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Clearing MythTV DVD wait state");
171  ClearAfterSeek(true);
172  if (m_videoPaused && !m_allPaused)
173  UnpauseVideo();
174  return !IsErrored();
175  }
176 
177  // wait for the video buffers to drain
178  if (nbframes < 2)
179  {
180  // clear the DVD wait state
181  if (m_playerCtx->m_buffer->DVD()->IsWaiting())
182  {
183  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Clearing DVD wait state");
185  if (m_videoPaused && !m_allPaused)
186  UnpauseVideo();
187  return !IsErrored();
188  }
189 
190  // the still frame is treated as a pause frame
192  {
193  // ensure we refresh the pause frame
195  m_needNewPauseFrame = true;
196 
197  // we are in a still frame so pause video output
198  if (!m_videoPaused)
199  {
200  PauseVideo();
201  m_dvdStillFrameShowing = true;
202  return !IsErrored();
203  }
204 
205  // see if the pause frame has timed out
206  StillFrameCheck();
207 
208  // flag if we have no frame
209  if (nbframes == 0)
210  {
211  LOG(VB_PLAYBACK, LOG_WARNING, LOC +
212  "In DVD Menu: No video frames in queue");
213  usleep(10000);
214  return !IsErrored();
215  }
216 
217  m_dvdStillFrameShowing = true;
218  }
219  }
220 
221  // unpause the still frame if more frames become available
222  if (m_dvdStillFrameShowing && nbframes > 1)
223  {
224  UnpauseVideo();
225  m_dvdStillFrameShowing = false;
226  return !IsErrored();
227  }
228 
229  return MythPlayerUI::VideoLoop();
230 }
231 
232 bool MythDVDPlayer::FastForward(float Seconds)
233 {
234  if (m_decoder)
236  return MythPlayerUI::FastForward(Seconds);
237 }
238 
239 bool MythDVDPlayer::Rewind(float Seconds)
240 {
241  if (m_decoder)
243  return MythPlayerUI::Rewind(Seconds);
244 }
245 
247 {
248  if (Frame == ~0x0ULL)
249  return false;
250 
251  if (m_decoder)
254 }
255 
257 {
258  if (m_playerCtx->m_buffer->DVD())
259  m_playerCtx->m_buffer->DVD()->SetParent(this);
260 
261  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
263  {
264  QString name;
265  QString serialid;
266  if (m_playerCtx->m_playingInfo->GetTitle().isEmpty() &&
267  m_playerCtx->m_buffer->DVD() &&
268  m_playerCtx->m_buffer->DVD()->GetNameAndSerialNum(name, serialid))
269  {
271  }
272  }
273  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
274 
276 }
277 
279 {
281 
282  if (m_initialTitle > -1)
284 
285  if (m_initialAudioTrack > -1)
288  if (m_initialSubtitleTrack > -1)
291 
292  if (m_bookmarkSeek > 30)
293  {
294  // we need to trigger a dvd cell change to ensure the new title length
295  // is set and the position map updated accordingly
296  m_decodeOneFrame = true;
297  int count = 0;
298  while (count++ < 100 && m_decodeOneFrame)
299  usleep(50000);
300  }
303 }
304 
305 void MythDVDPlayer::ResetPlaying(bool /*ResetFrames*/)
306 {
308 }
309 
311 {
312  if (m_playerCtx->m_buffer->DVD())
313  m_playerCtx->m_buffer->DVD()->SetParent(nullptr);
314 }
315 
316 bool MythDVDPlayer::PrepareAudioSample(int64_t &Timecode)
317 {
319  WrapTimecode(Timecode, TC_AUDIO);
320 
321  return m_playerCtx->m_buffer->IsDVD() &&
323 }
324 
326 {
327  if (!m_playerCtx->m_buffer->IsDVD())
328  return;
329 
330  QStringList fields;
331  QString name;
332  QString serialid;
333  QString dvdstate;
334 
335  if (!m_playerCtx->m_buffer->IsInMenu() &&
337  {
338  if (!m_playerCtx->m_buffer->DVD()->GetNameAndSerialNum(name, serialid))
339  {
340  LOG(VB_GENERAL, LOG_ERR, LOC +
341  "DVD has no name and serial number. Cannot set bookmark.");
342  return;
343  }
344 
345  if (!Clear && !m_playerCtx->m_buffer->DVD()->GetDVDStateSnapshot(dvdstate))
346  {
347  LOG(VB_GENERAL, LOG_ERR, LOC +
348  "Unable to retrieve DVD state. Cannot set bookmark.");
349  return;
350  }
351 
352  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
354  {
355  fields += serialid;
356  fields += name;
357 
358  if (!Clear)
359  {
360  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Set bookmark");
361  fields += dvdstate;
362  }
363  else
364  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Clear bookmark");
365 
367 
368  }
369  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
370  }
371 }
372 
374 {
376  return 0;
377 
378  QString name;
379  QString serialid;
380  uint64_t frames = 0;
381  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
383  {
384  if (!m_playerCtx->m_buffer->DVD()->GetNameAndSerialNum(name, serialid))
385  {
386  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
387  return 0;
388  }
389 
390  QStringList dvdbookmark = m_playerCtx->m_playingInfo->QueryDVDBookmark(serialid);
391 
392  if (!dvdbookmark.empty())
393  {
394  QStringList::Iterator it = dvdbookmark.begin();
395 
396  if (dvdbookmark.count() == 1)
397  {
398  m_initialDvdState = *it;
399  frames = ~0x0ULL;
400  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Get Bookmark: bookmark found");
401  }
402  else
403  {
404  // Legacy bookmarks
405  m_initialTitle = (*it).toInt();
406  frames = ((*++it).toLongLong() & 0xffffffffLL);
407  m_initialAudioTrack = (*++it).toInt();
408  m_initialSubtitleTrack = (*++it).toInt();
409  LOG(VB_PLAYBACK, LOG_INFO, LOC +
410  QString("Get Bookmark: title %1 audiotrack %2 subtrack %3 "
411  "frame %4")
413  .arg(m_initialSubtitleTrack).arg(frames));
414  }
415  }
416  }
417  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
418  return frames;;
419 }
420 
422 {
423  if (m_stillFrameLength > 0)
424  {
425  m_stillFrameTimerLock.lock();
426  // Get the timestretched elapsed time and transform
427  // it to what the unstretched value would have been
428  // had we been playing with the new timestretch value
429  // all along
430  int elapsed = static_cast<int>((m_stillFrameTimer.elapsed() * m_playSpeed / m_nextPlaySpeed));
432  m_stillFrameTimer.addMSecs(elapsed);
433  m_stillFrameTimerLock.unlock();
434  }
435 
437 
438  if (m_decoder)
440  if (m_playerCtx->m_buffer->IsDVD())
441  {
442  if (m_playSpeed > 1.0F)
444  else
446  }
447 }
448 
449 long long MythDVDPlayer::CalcMaxFFTime(long long FastFwd, bool Setjump) const
450 {
451  if ((m_totalFrames > 0) && m_playerCtx->m_buffer->IsDVD() &&
453  return 0;
454  return MythPlayerUI::CalcMaxFFTime(FastFwd, Setjump);
455 }
456 
457 int64_t MythDVDPlayer::GetSecondsPlayed(bool /*HonorCutList*/, int Divisor)
458 {
459  if (!m_playerCtx->m_buffer->IsDVD())
460  return 0;
461 
462  int64_t played = m_playerCtx->m_buffer->DVD()->GetCurrentTime();
463 
464  if (m_stillFrameLength > 0)
465  {
466  if (m_stillFrameLength == 255)
467  played = -1;
468  else
469  played = static_cast<int64_t>(m_stillFrameTimer.elapsed() * m_playSpeed / Divisor);
470  }
471 
472  return played;
473 }
474 
475 int64_t MythDVDPlayer::GetTotalSeconds(bool /*HonorCutList*/, int Divisor) const
476 {
477  int64_t total = m_totalLength;
478 
479  if (m_stillFrameLength > 0)
480  {
481  if (m_stillFrameLength == 255)
482  return -1;
483  total = m_stillFrameLength;
484  }
485 
486  return total * 1000 / Divisor;
487 }
488 
489 void MythDVDPlayer::SetTrack(uint Type, uint TrackNo)
490 {
491  if (kTrackTypeAudio == Type)
492  {
493  StreamInfo stream = m_decoder->GetTrackInfo(Type, static_cast<uint>(TrackNo));
494  m_playerCtx->m_buffer->DVD()->SetTrack(Type, stream.m_stream_id);
495  }
496 
497  MythPlayerUI::SetTrack(Type, TrackNo);
498 }
499 
501 {
502  if (!m_playerCtx->m_buffer->IsDVD())
503  return 0;
504  return m_playerCtx->m_buffer->DVD()->NumPartsInTitle();
505 }
506 
508 {
509  if (!m_playerCtx->m_buffer->IsDVD())
510  return 0;
511  return m_playerCtx->m_buffer->DVD()->GetPart();
512 }
513 
514 void MythDVDPlayer::GetChapterTimes(QList<long long> &Times)
515 {
516  if (!m_playerCtx->m_buffer->IsDVD())
517  return;
519 }
520 
522 {
523  if (!m_playerCtx->m_buffer->IsDVD())
524  return false;
525 
526  int total = GetNumChapters();
527  int current = GetCurrentChapter();
528 
529  if (Chapter < 0 || Chapter > total)
530  {
531  if (Chapter < 0)
532  {
533  Chapter = current -1;
534  if (Chapter < 0) Chapter = 0;
535  }
536  else if (Chapter > total)
537  {
538  Chapter = current + 1;
539  if (Chapter > total) Chapter = total;
540  }
541  }
542 
543  bool success = m_playerCtx->m_buffer->DVD()->PlayTrack(Chapter);
544  if (success)
545  {
546  if (m_decoder)
547  {
549  if (m_playerCtx->m_buffer->DVD()->GetCellStart() == 0)
550  m_decoder->SeekReset(static_cast<long long>(m_framesPlayed), 0, true, true);
551  }
553  }
554 
555  m_jumpChapter = 0;
556  return success;
557 }
558 
560 {
561  if (!m_playerCtx->m_buffer->IsDVD())
562  return;
563 
564  uint buttonversion = 0;
565  AVSubtitle *dvdSubtitle = m_playerCtx->m_buffer->DVD()->GetMenuSubtitle(buttonversion);
566  bool numbuttons = m_playerCtx->m_buffer->DVD()->NumMenuButtons() != 0;
567 
568  bool expired = false;
569 
570  MythVideoFrame *currentFrame = m_videoOutput ? m_videoOutput->GetLastShownFrame() : nullptr;
571 
572  if (!currentFrame)
573  {
575  return;
576  }
577 
578  if (dvdSubtitle &&
579  (dvdSubtitle->end_display_time > dvdSubtitle->start_display_time) &&
580  (dvdSubtitle->end_display_time < currentFrame->m_timecode))
581  {
582  expired = true;
583  }
584 
585  // nothing to do
586  if (!expired && (buttonversion == (static_cast<uint>(m_buttonVersion))))
587  {
589  return;
590  }
591 
592  // clear any buttons
593  if (!numbuttons || !dvdSubtitle || (buttonversion == 0) || expired)
594  {
596  m_buttonVersion = 0;
598  return;
599  }
600 
601  if (currentFrame->m_timecode && (dvdSubtitle->start_display_time > currentFrame->m_timecode))
602  {
604  return;
605  }
606 
607  m_buttonVersion = static_cast<int>(buttonversion);
608  QRect buttonPos = m_playerCtx->m_buffer->DVD()->GetButtonCoords();
609  m_captionsOverlay.DisplayDVDButton(dvdSubtitle, buttonPos);
610  uint oldcaptions = m_captionsState.m_textDisplayMode;
612  if (oldcaptions != m_captionsState.m_textDisplayMode)
615 }
616 
617 bool MythDVDPlayer::GoToMenu(const QString& Menu)
618 {
619  if (!m_playerCtx->m_buffer->IsDVD())
620  return false;
621  uint oldcaptions = m_captionsState.m_textDisplayMode;
623  if (oldcaptions != m_captionsState.m_textDisplayMode)
625 
626  bool ret = m_playerCtx->m_buffer->DVD()->GoToMenu(Menu);
627 
628  if (!ret)
629  {
630  UpdateOSDMessage(tr("DVD Menu Not Available"), kOSDTimeout_Med);
631  LOG(VB_GENERAL, LOG_ERR, "No DVD Menu available.");
632  return false;
633  }
634 
635  return true;
636 }
637 
638 void MythDVDPlayer::GoToDVDProgram(bool Direction)
639 {
640  if (!m_playerCtx->m_buffer->IsDVD())
641  return;
642  if (Direction)
644  else
646 }
647 
649 {
650  return (m_stillFrameLength > 0);
651 }
652 
654 {
656  return m_playerCtx->m_buffer->DVD()->GetNumAngles();
657  return 0;
658 }
659 
661 {
663  return m_playerCtx->m_buffer->DVD()->GetCurrentAngle();
664  return -1;
665 }
666 
667 QString MythDVDPlayer::GetAngleName(int Angle) const
668 {
669  if (Angle >= 1 && Angle <= GetNumAngles())
670  {
671  QString name = tr("Angle %1").arg(Angle);
672  return name;
673  }
674  return QString();
675 }
676 
678 {
679  int total = GetNumAngles();
680  if (!total || Angle == GetCurrentAngle())
681  return false;
682 
683  if (Angle < 1 || Angle > total)
684  Angle = 1;
685 
686  return m_playerCtx->m_buffer->DVD()->SwitchAngle(Angle);
687 }
688 
690 {
691  if (Length != m_stillFrameLength)
692  {
693  m_stillFrameTimerLock.lock();
694  m_stillFrameLength = Length;
696  m_stillFrameTimerLock.unlock();
697  }
698 }
699 
701 {
702  if (m_playerCtx->m_buffer->IsDVD() &&
704  (m_stillFrameLength > 0) && (m_stillFrameLength < 0xff))
705  {
706  m_stillFrameTimerLock.lock();
707  int elapsedTime = static_cast<int>(m_stillFrameTimer.elapsed() * m_playSpeed / 1000.0F);
708  m_stillFrameTimerLock.unlock();
709  if (elapsedTime >= m_stillFrameLength)
710  {
711  LOG(VB_PLAYBACK, LOG_INFO, LOC +
712  QString("Stillframe timeout after %1 seconds (timestretch %2)")
713  .arg(m_stillFrameLength).arg(static_cast<double>(m_playSpeed)));
715  m_stillFrameLength = 0;
716  }
717  }
718 }
719 
721 {
724 }
ProgramInfo::SaveDVDBookmark
static void SaveDVDBookmark(const QStringList &fields)
Definition: programinfo.cpp:2747
MythDVDBuffer::PlayTrack
bool PlayTrack(int Track)
Definition: mythdvdbuffer.cpp:1100
MythPlayerUI::VideoStart
virtual void VideoStart()
Definition: mythplayerui.cpp:411
MythDVDPlayer::EnableCaptions
void EnableCaptions(uint Mode, bool OSDMsg=true) override
Definition: mythdvdplayer.cpp:59
MythDVDBuffer::IsOpen
bool IsOpen(void) const override
Definition: mythdvdbuffer.cpp:211
MythDVDPlayer::DisableCaptions
void DisableCaptions(uint Mode, bool OSDMsg=true) override
Definition: mythdvdplayer.cpp:52
MythPlayerCaptionsUI::SetTrack
virtual void SetTrack(uint Type, uint TrackNo)
Definition: mythplayercaptionsui.cpp:359
MythPlayer::m_frameInterval
int m_frameInterval
always adjusted for play_speed
Definition: mythplayer.h:490
MythDVDPlayer::VideoStart
void VideoStart(void) override
Definition: mythdvdplayer.cpp:116
MythVideoScanTracker::AutoDeint
virtual void AutoDeint(MythVideoFrame *Frame, MythVideoOutput *VideoOutput, int FrameInterval, bool AllowLock=true)
Check whether deinterlacing should be enabled.
Definition: mythvideoscantracker.cpp:176
MythPlayer::m_videoPaused
bool m_videoPaused
Definition: mythplayer.h:395
PlayerContext::UnlockPlayingInfo
void UnlockPlayingInfo(const char *file, int line) const
Definition: playercontext.cpp:248
MythVideoOutput
Definition: mythvideoout.h:31
mythdvddecoder.h
VideoOutput
This class serves as the base class for all video output methods.
MythDVDPlayer::SetStillFrameTimeout
void SetStillFrameTimeout(int Length)
Definition: mythdvdplayer.cpp:689
MythDVDBuffer::RestoreDVDStateSnapshot
bool RestoreDVDStateSnapshot(QString &State)
Restore a DVD VM from a snapshot.
Definition: mythdvdbuffer.cpp:1926
MythDVDBuffer::SkipStillFrame
void SkipStillFrame(void)
Definition: mythdvdbuffer.cpp:1197
kDisplayNone
@ kDisplayNone
Definition: videoouttypes.h:12
kEofStateNone
@ kEofStateNone
Definition: decoderbase.h:69
MythDVDPlayer::GoToMenu
bool GoToMenu(const QString &Menu) override
Definition: mythdvdplayer.cpp:617
MythDVDPlayer::JumpToFrame
bool JumpToFrame(uint64_t Frame) override
Definition: mythdvdplayer.cpp:246
MythPlayer::m_avSync
MythPlayerAVSync m_avSync
Definition: mythplayer.h:433
MythPlayer::DecoderPauseCheck
virtual void DecoderPauseCheck(void)
Definition: mythplayer.cpp:1049
MythPlayer::m_playSpeed
float m_playSpeed
Definition: mythplayer.h:489
MythDVDPlayer::CreateDecoder
void CreateDecoder(TestBufferVec &Testbuf) override
Definition: mythdvdplayer.cpp:720
MythDVDBuffer::IsInStillFrame
bool IsInStillFrame(void) const override
Definition: mythdvdbuffer.cpp:221
MythDVDPlayer::HasReachedEof
bool HasReachedEof(void) const override
Definition: mythdvdplayer.cpp:44
MythPlayerCaptionsUI::GetTrack
int GetTrack(uint Type)
Definition: mythplayercaptionsui.cpp:411
MythPlayerUI::EventStart
virtual void EventStart()
Definition: mythplayerui.cpp:470
MythDVDBuffer::SetTrack
void SetTrack(uint Type, int TrackNo)
set the dvd subtitle/audio track used
Definition: mythdvdbuffer.cpp:1854
MythTimer::addMSecs
void addMSecs(int ms)
Adds an offset to the last call to start() or restart().
Definition: mythtimer.cpp:145
MythPlayerUI::DisplayNormalFrame
virtual void DisplayNormalFrame(bool CheckPrebuffer=true)
Definition: mythplayerui.cpp:652
MythPlayer::PrebufferEnoughFrames
virtual bool PrebufferEnoughFrames(int min_buffers=0)
Definition: mythplayer.cpp:722
StreamInfo::m_stream_id
int m_stream_id
Definition: decoderbase.h:99
DetectLetterbox.h
Frame
Definition: zmdefines.h:94
MythDVDPlayer::m_initialDvdState
QString m_initialDvdState
Definition: mythdvdplayer.h:76
mythdvdbuffer.h
MythCaptionsOverlay::ClearSubtitles
void ClearSubtitles()
Definition: mythcaptionsoverlay.cpp:203
MythPlayerAVSync::DisplayTimecode
int64_t & DisplayTimecode()
Definition: mythplayeravsync.cpp:35
MythCoreContext::IsDatabaseIgnored
bool IsDatabaseIgnored(void) const
/brief Returns true if database is being ignored.
Definition: mythcorecontext.cpp:897
MythVideoOutput::UpdatePauseFrame
virtual void UpdatePauseFrame(int64_t &, FrameScanType=kScan_Progressive)
Definition: mythvideoout.h:87
arg
arg(title).arg(filename).arg(doDelete))
Context
QHash< QString, Action * > Context
Definition: action.h:77
MythMediaBuffer::IgnoreWaitStates
virtual void IgnoreWaitStates(bool)
Definition: mythmediabuffer.h:129
MythPlayer::IsErrored
bool IsErrored(void) const
Definition: mythplayer.cpp:1955
MythMediaBuffer::IsDVD
bool IsDVD(void) const
Definition: mythmediabuffer.cpp:1823
DecoderBase::GetMythCodecContext
MythCodecContext * GetMythCodecContext(void)
Definition: decoderbase.h:262
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:23
MythDVDBuffer::GoToMenu
bool GoToMenu(const QString &str)
jump to a dvd root or chapter menu
Definition: mythdvdbuffer.cpp:1235
MythDVDBuffer::TitleTimeLeft
uint TitleTimeLeft(void) const
returns seconds left in the title
Definition: mythdvdbuffer.cpp:1975
PlayerFlags
PlayerFlags
Definition: mythplayer.h:62
MythPlayer::GetEof
EofState GetEof(void) const
Definition: mythplayer.cpp:1061
MythMediaBuffer::IsInMenu
virtual bool IsInMenu(void) const
Definition: mythmediabuffer.h:130
MythPlayer::m_nextPlaySpeed
float m_nextPlaySpeed
Definition: mythplayer.h:488
MythDVDPlayer::DecoderGetFrameFFREW
bool DecoderGetFrameFFREW(void) override
Definition: mythdvdplayer.cpp:92
MythPlayerUI::VideoLoop
virtual bool VideoLoop()
Definition: mythplayerui.cpp:488
MythDVDBuffer::SkipDVDWaitingForPlayer
void SkipDVDWaitingForPlayer(void)
Definition: mythdvdbuffer.cpp:1218
MythDVDPlayer::IsInStillFrame
bool IsInStillFrame() const override
Definition: mythdvdplayer.cpp:648
MythCaptionsState::m_textDisplayMode
uint m_textDisplayMode
Definition: mythplayerstate.h:69
MythDVDPlayer::SwitchAngle
bool SwitchAngle(int Angle) override
Definition: mythdvdplayer.cpp:677
MythDate::current
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:10
MythDVDDecoder
Definition: mythdvddecoder.h:15
MythPlayer::SetErrored
void SetErrored(const QString &reason)
Definition: mythplayer.cpp:1931
MythPlayer::m_needNewPauseFrame
bool m_needNewPauseFrame
Definition: mythplayer.h:393
MythDVDPlayer::InitialSeek
void InitialSeek(void) override
Definition: mythdvdplayer.cpp:278
MythPlayer::SetDecoder
void SetDecoder(DecoderBase *dec)
Sets the stream decoder, deleting any existing recorder.
Definition: mythplayer.cpp:1891
MythDVDBuffer::SetParent
void SetParent(MythDVDPlayer *Parent)
Definition: mythdvdbuffer.cpp:2166
MythVideoFrame::m_timecode
long long m_timecode
Definition: mythframe.h:122
MythDVDPlayer::AutoDeint
void AutoDeint(MythVideoFrame *Frame, MythVideoOutput *VideoOutput, int FrameInterval, bool AllowLock=true) override
Check whether deinterlacing should be enabled.
Definition: mythdvdplayer.cpp:18
MythDVDBuffer::DVDWaitingForPlayer
bool DVDWaitingForPlayer(void) const
Definition: mythdvdbuffer.cpp:430
EofState
EofState
Definition: decoderbase.h:68
MythPlayerOverlayUI::UpdateOSDMessage
void UpdateOSDMessage(const QString &Message)
Definition: mythplayeroverlayui.cpp:71
MythDVDBuffer::GetCurrentAngle
int GetCurrentAngle(void) const
Definition: mythdvdbuffer.cpp:440
MythPlayerUI
Definition: mythplayerui.h:11
MythMediaBuffer::GetFilename
QString GetFilename(void) const
Definition: mythmediabuffer.cpp:1732
MythPlayer::UnpauseVideo
void UnpauseVideo(void)
Definition: mythplayer.cpp:230
DecoderBase::GetTrackCount
virtual uint GetTrackCount(uint Type)
Definition: decoderbase.cpp:903
MythPlayer::m_decoder
DecoderBase * m_decoder
Definition: mythplayer.h:366
MythPlayer::m_framesPlayed
uint64_t m_framesPlayed
Definition: mythplayer.h:427
MythDVDPlayer::PreProcessNormalFrame
void PreProcessNormalFrame(void) override
Definition: mythdvdplayer.cpp:111
MythPlayer::m_totalLength
long long m_totalLength
Definition: mythplayer.h:429
DecoderBase::GetTrackInfo
StreamInfo GetTrackInfo(uint Type, uint TrackNo)
Definition: decoderbase.cpp:977
MythVideoOutput::ValidVideoFrames
virtual int ValidVideoFrames() const
Returns number of frames that are fully decoded.
Definition: mythvideoout.cpp:313
StreamInfo
Definition: decoderbase.h:75
MythDVDPlayer::GoToDVDProgram
void GoToDVDProgram(bool Direction) override
Definition: mythdvdplayer.cpp:638
MythDVDBuffer::PlayTitleAndPart
void PlayTitleAndPart(int Title, int Part)
Definition: mythdvdbuffer.cpp:1955
kScan_Progressive
@ kScan_Progressive
Definition: videoouttypes.h:100
MythDVDBuffer::GetButtonCoords
QRect GetButtonCoords(void)
get coordinates of highlighted button
Definition: mythdvdbuffer.cpp:1441
PlayerContext::m_playingInfo
ProgramInfo * m_playingInfo
Currently playing info.
Definition: playercontext.h:116
MythMediaBuffer::IsInDiscMenuOrStillFrame
virtual bool IsInDiscMenuOrStillFrame(void) const
Definition: mythmediabuffer.h:132
MythDVDPlayer::m_dvdStillFrameShowing
bool m_dvdStillFrameShowing
Definition: mythdvdplayer.h:70
mythdvdplayer.h
PlayerContext::LockPlayingInfo
void LockPlayingInfo(const char *file, int line) const
Definition: playercontext.cpp:236
MythPlayer::m_bookmarkSeek
uint64_t m_bookmarkSeek
Definition: mythplayer.h:415
ProgramInfo::GetTitle
QString GetTitle(void) const
Definition: programinfo.h:359
MythDVDPlayer::StillFrameCheck
void StillFrameCheck(void)
Definition: mythdvdplayer.cpp:700
MythPlayer::m_videoOutput
MythVideoOutput * m_videoOutput
Definition: mythplayer.h:368
ProgramInfo::QueryDVDBookmark
QStringList QueryDVDBookmark(const QString &serialid) const
Queries "dvdbookmark" table for bookmarking DVD serial number.
Definition: programinfo.cpp:2714
MythCodecContext::IsDeinterlacing
virtual bool IsDeinterlacing(bool &, bool=false)
Definition: mythcodeccontext.h:154
MythPlayerCaptionsUI::m_captionsOverlay
MythCaptionsOverlay m_captionsOverlay
Definition: mythplayercaptionsui.h:70
PlayerContext::m_buffer
MythMediaBuffer * m_buffer
Definition: playercontext.h:115
MythPlayer::PauseVideo
void PauseVideo(void)
Definition: mythplayer.cpp:222
MythDVDPlayer::PrepareAudioSample
bool PrepareAudioSample(int64_t &Timecode) override
Definition: mythdvdplayer.cpp:316
MythDVDPlayer::GetChapterTimes
void GetChapterTimes(QList< long long > &Times) override
Definition: mythdvdplayer.cpp:514
MythPlayer::ClearAfterSeek
void ClearAfterSeek(bool clearvideobuffers=true)
This is to support seeking...
Definition: mythplayer.cpp:1656
MythVideoScanTracker::SetScanType
void SetScanType(FrameScanType Scan, MythVideoOutput *VideoOutput, int FrameInterval)
Definition: mythvideoscantracker.cpp:122
MythPlayer::m_totalFrames
uint64_t m_totalFrames
Definition: mythplayer.h:428
MythPlayer::ResetPlaying
virtual void ResetPlaying(bool resetframes=true)
Definition: mythplayer.cpp:910
MythDVDPlayer::GetCurrentAngle
int GetCurrentAngle(void) const override
Definition: mythdvdplayer.cpp:660
ProgramInfo::SetTitle
void SetTitle(const QString &t, const QString &st=nullptr)
Definition: programinfo.cpp:1145
TestBufferVec
std::vector< char > TestBufferVec
Definition: decoderbase.h:23
MythPlayer::m_playerCtx
PlayerContext * m_playerCtx
Definition: mythplayer.h:369
MythPlayerUI::DisplayPauseFrame
virtual void DisplayPauseFrame()
Definition: mythplayerui.cpp:630
kTrackTypeAudio
@ kTrackTypeAudio
Definition: decoderbase.h:29
MythDVDPlayer::CalcMaxFFTime
long long CalcMaxFFTime(long long FastFwd, bool Setjump=true) const override
CalcMaxFFTime(ffframes): forward ffframes forward.
Definition: mythdvdplayer.cpp:449
uint
unsigned int uint
Definition: compat.h:141
MythDVDBuffer::ReleaseMenuButton
void ReleaseMenuButton(void)
Definition: mythdvdbuffer.cpp:1434
MythDVDBuffer::NumPartsInTitle
int NumPartsInTitle(void) const
Definition: mythdvdbuffer.cpp:1183
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:60
MythPlayer::m_playerFlags
PlayerFlags m_playerFlags
Definition: mythplayer.h:375
MythDVDBuffer::IsWaiting
bool IsWaiting(void) const
Definition: mythdvdbuffer.cpp:1178
MythDVDPlayer::Rewind
bool Rewind(float Seconds) override
Definition: mythdvdplayer.cpp:239
MythDVDPlayer::EventEnd
virtual void EventEnd(void)
Definition: mythdvdplayer.cpp:310
kTrackTypeSubtitle
@ kTrackTypeSubtitle
Definition: decoderbase.h:31
MythPlayerCaptionsUI::DisableCaptions
virtual void DisableCaptions(uint Mode, bool UpdateOSD=true)
Definition: mythplayercaptionsui.cpp:149
MythPlayer::DecoderGetFrameREW
virtual bool DecoderGetFrameREW(void)
Definition: mythplayer.cpp:1181
MythDVDPlayer::GetCurrentChapter
int GetCurrentChapter(void) override
Definition: mythdvdplayer.cpp:507
MythVideoOutput::EnoughFreeFrames
bool EnoughFreeFrames()
Returns true iff enough frames are available to decode onto.
Definition: mythvideoout.cpp:325
MythDVDPlayer::m_stillFrameTimerLock
QMutex m_stillFrameTimerLock
Definition: mythdvdplayer.h:81
MythPlayer::m_jumpChapter
int m_jumpChapter
Definition: mythplayer.h:412
MythDVDBuffer::GetMenuSubtitle
AVSubtitle * GetMenuSubtitle(uint &Version)
returns dvd menu button information if available.
Definition: mythdvdbuffer.cpp:1419
MythPlayerCaptionsUI::EnableCaptions
virtual void EnableCaptions(uint Mode, bool UpdateOSD=true)
Definition: mythplayercaptionsui.cpp:209
MythTimer::elapsed
int elapsed(void)
Returns milliseconds elapsed since last start() or restart()
Definition: mythtimer.cpp:90
kDisplayDVDButton
@ kDisplayDVDButton
Definition: videoouttypes.h:19
MythDVDBuffer::SetDVDSpeed
void SetDVDSpeed(void)
set dvd speed. uses the constant DVD_DRIVE_SPEED table
Definition: mythdvdbuffer.cpp:1961
MythPlayer::CalcMaxFFTime
virtual long long CalcMaxFFTime(long long ff, bool setjump=true) const
CalcMaxFFTime(ffframes): forward ffframes forward.
Definition: mythplayer.cpp:1428
MythDVDBuffer::GoToNextProgram
void GoToNextProgram(void)
Definition: mythdvdbuffer.cpp:1297
MythDVDPlayer::ResetPlaying
void ResetPlaying(bool ResetFrames=true) override
Definition: mythdvdplayer.cpp:305
MythMediaBuffer::IsBookmarkAllowed
virtual bool IsBookmarkAllowed(void)
Definition: mythmediabuffer.h:126
MythDVDPlayer::DisplayPauseFrame
void DisplayPauseFrame(void) override
Definition: mythdvdplayer.cpp:73
DecoderBase::UpdateFramesPlayed
virtual void UpdateFramesPlayed(void)
Definition: decoderbase.cpp:870
Buffer
Definition: MythExternControl.h:37
MythPlayerUI::InitialSeek
virtual void InitialSeek()
Definition: mythplayerui.cpp:98
MythDVDBuffer::GetNumAngles
int GetNumAngles(void) const
Definition: mythdvdbuffer.cpp:445
MythDVDPlayer::ReleaseNextVideoFrame
void ReleaseNextVideoFrame(MythVideoFrame *Buffer, int64_t Timecode, bool Wrap=true) override
Definition: mythdvdplayer.cpp:37
MythDVDPlayer::GetNumChapters
int GetNumChapters(void) override
Definition: mythdvdplayer.cpp:500
kScan_Interlaced
@ kScan_Interlaced
Definition: videoouttypes.h:98
Clear
#define Clear(a)
Definition: audiooutputopensles.cpp:47
MythDVDPlayer::MythDVDPlayer
MythDVDPlayer(MythMainWindow *MainWindow, TV *Tv, PlayerContext *Context, PlayerFlags Flags=kNoFlags)
Definition: mythdvdplayer.cpp:13
MythDVDPlayer::GetBookmark
uint64_t GetBookmark(void) override
Definition: mythdvdplayer.cpp:373
MythDVDPlayer::DecoderPauseCheck
void DecoderPauseCheck(void) override
Definition: mythdvdplayer.cpp:81
TC_AUDIO
@ TC_AUDIO
Definition: mythplayer.h:54
MythDVDBuffer::GetNameAndSerialNum
bool GetNameAndSerialNum(QString &Name, QString &SerialNumber) override
Get the dvd title and serial num.
Definition: mythdvdbuffer.cpp:1901
MythDVDBuffer::GetPart
int GetPart(void) const
Definition: mythdvdbuffer.cpp:435
MythPlayer::m_decodeOneFrame
bool m_decodeOneFrame
Definition: mythplayer.h:392
MythDVDPlayer::m_stillFrameLength
int m_stillFrameLength
Definition: mythdvdplayer.h:80
audiooutput.h
MythDVDBuffer::GetCurrentTime
int64_t GetCurrentTime(void) const
Definition: mythdvdbuffer.cpp:1980
MythDVDPlayer::m_stillFrameTimer
MythTimer m_stillFrameTimer
Definition: mythdvdplayer.h:79
AvFormatDecoder::CanHandle
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.
Definition: avformatdecoder.cpp:849
MythDVDBuffer::GetCellStart
uint GetCellStart(void) const
get the start of the cell in seconds
Definition: mythdvdbuffer.cpp:1154
MythDVDPlayer::PrebufferEnoughFrames
bool PrebufferEnoughFrames(int MinBuffers=0) override
Definition: mythdvdplayer.cpp:87
PlayerContext
Definition: playercontext.h:49
MythDVDBuffer::IsStillFramePending
bool IsStillFramePending(void) const
Definition: mythdvdbuffer.cpp:1168
MythDVDBuffer::NumMenuButtons
int NumMenuButtons(void) const
Definition: mythdvdbuffer.cpp:1705
MythDVDPlayer::m_initialSubtitleTrack
int m_initialSubtitleTrack
Definition: mythdvdplayer.h:75
MythDVDPlayer::SetTrack
void SetTrack(uint Type, uint TrackNo) override
Definition: mythdvdplayer.cpp:489
MythPlayerCaptionsUI::CaptionsStateChanged
void CaptionsStateChanged(MythCaptionsState &CaptionsState)
MythDVDBuffer::WaitSkip
void WaitSkip(void)
Definition: mythdvdbuffer.cpp:1210
MythPlayer::DecoderGetFrameFFREW
virtual bool DecoderGetFrameFFREW(void)
Definition: mythplayer.cpp:1157
MythPlayer::JumpToFrame
virtual bool JumpToFrame(uint64_t frame)
Definition: mythplayer.cpp:883
MythMediaBuffer::DVD
const MythDVDBuffer * DVD(void) const
Definition: mythmediabuffer.cpp:1833
MythPlayer::m_allPaused
bool m_allPaused
Definition: mythplayer.h:396
MythPlayer::ReleaseNextVideoFrame
virtual void ReleaseNextVideoFrame(MythVideoFrame *buffer, int64_t timecode, bool wrap=true)
Places frame on the queue of frames ready for display.
Definition: mythplayer.cpp:605
MythPlayer::m_decoderChangeLock
QMutex m_decoderChangeLock
Definition: mythplayer.h:367
MythDVDBuffer::GetChapterTimes
void GetChapterTimes(QList< long long > &Times)
Definition: mythdvdbuffer.cpp:367
MythPlayerUI::ChangeSpeed
void ChangeSpeed() override
Definition: mythplayerui.cpp:389
MythPlayerCaptionsUI::m_captionsState
MythCaptionsState m_captionsState
Definition: mythplayercaptionsui.h:71
MythVideoFrame
Definition: mythframe.h:83
kDisplayAVSubtitle
@ kDisplayAVSubtitle
Definition: videoouttypes.h:15
MythDVDPlayer::DecoderGetFrameREW
bool DecoderGetFrameREW(void) override
Definition: mythdvdplayer.cpp:104
MythDVDPlayer::SetBookmark
void SetBookmark(bool Clear=false) override
Definition: mythdvdplayer.cpp:325
MythVideoOutput::GetLastShownFrame
virtual MythVideoFrame * GetLastShownFrame()
Returns frame from the head of the ready to be displayed queue, if StartDisplayingFrame has been call...
Definition: mythvideoout.cpp:351
MythDVDBuffer::GoToPreviousProgram
void GoToPreviousProgram(void)
Definition: mythdvdbuffer.cpp:1306
MythPlayer::WrapTimecode
void WrapTimecode(int64_t &timecode, TCTypes tc_type)
Definition: mythplayer.cpp:1276
MythDVDPlayer::DoJumpChapter
bool DoJumpChapter(int Chapter) override
Definition: mythdvdplayer.cpp:521
kOSDTimeout_Med
@ kOSDTimeout_Med
Definition: osd.h:61
MythDVDBuffer::SwitchAngle
bool SwitchAngle(int Angle)
Definition: mythdvdbuffer.cpp:2151
DecoderBase::SeekReset
virtual void SeekReset(long long newkey, uint skipFrames, bool doFlush, bool discardFrames)
Definition: decoderbase.cpp:69
MythPlayer::FastForward
virtual bool FastForward(float seconds)
Definition: mythplayer.cpp:836
MythDVDPlayer::ChangeSpeed
void ChangeSpeed(void) override
Definition: mythdvdplayer.cpp:421
MythDVDPlayer::VideoLoop
bool VideoLoop(void) override
Definition: mythdvdplayer.cpp:124
MythDVDPlayer::EventStart
void EventStart(void) override
Definition: mythdvdplayer.cpp:256
LOC
#define LOC
Definition: mythdvdplayer.cpp:11
MythDVDPlayer::m_initialTitle
int m_initialTitle
Definition: mythdvdplayer.h:73
MythMainWindow
Definition: mythmainwindow.h:35
MThread::usleep
static void usleep(unsigned long time)
Definition: mthread.cpp:342
MythTimer::restart
int restart(void)
Returns milliseconds elapsed since last start() or restart() and resets the count.
Definition: mythtimer.cpp:62
MythDVDPlayer::FastForward
bool FastForward(float Seconds) override
Definition: mythdvdplayer.cpp:232
MythDVDPlayer::m_initialAudioTrack
int m_initialAudioTrack
Definition: mythdvdplayer.h:74
MythDVDPlayer::GetTotalSeconds
int64_t GetTotalSeconds(bool HonorCutList, int Divisor=1000) const override
Definition: mythdvdplayer.cpp:475
MythCaptionsOverlay::DisplayDVDButton
void DisplayDVDButton(AVSubtitle *DVDButton, QRect &Pos)
Definition: mythcaptionsoverlay.cpp:213
MythDVDPlayer::GetSecondsPlayed
int64_t GetSecondsPlayed(bool HonorCutList, int Divisor=1000) override
Definition: mythdvdplayer.cpp:457
MythDVDPlayer::GetAngleName
QString GetAngleName(int Angle) const override
Definition: mythdvdplayer.cpp:667
MythDVDPlayer::DisplayDVDButton
void DisplayDVDButton(void)
Definition: mythdvdplayer.cpp:559
MythDVDPlayer::GetNumAngles
int GetNumAngles(void) const override
Definition: mythdvdplayer.cpp:653
MythPlayer::Rewind
virtual bool Rewind(float seconds)
Definition: mythplayer.cpp:861
MythDVDBuffer::GetDVDStateSnapshot
bool GetDVDStateSnapshot(QString &State)
Get a snapshot of the current DVD VM state.
Definition: mythdvdbuffer.cpp:1910
MythDVDPlayer::m_buttonVersion
int m_buttonVersion
Definition: mythdvdplayer.h:69
TV
Control TV playback.
Definition: tv_play.h:153