MythTV  0.28pre
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
mythdvdplayer.cpp
Go to the documentation of this file.
1 #include "dvdringbuffer.h"
2 #include "DetectLetterbox.h"
3 #include "audiooutput.h"
4 #include "avformatdecoderdvd.h"
5 #include "mythdvdplayer.h"
6 
7 #define LOC QString("DVDPlayer: ")
8 
9 MythDVDPlayer::MythDVDPlayer(PlayerFlags flags)
10  : MythPlayer(flags), m_buttonVersion(0),
11  dvd_stillframe_showing(false),
12  m_initial_title(-1), m_initial_audio_track(-1),
13  m_initial_subtitle_track(-1),
14  m_stillFrameLength(0)
15 {
16 }
17 
18 void MythDVDPlayer::AutoDeint(VideoFrame *frame, bool allow_lock)
19 {
20  (void)frame;
21  (void)allow_lock;
23 }
24 
26  int64_t timecode, bool wrap)
27 {
28  MythPlayer::ReleaseNextVideoFrame(buffer, timecode,
30 }
31 
33 {
34  EofState eof = GetEof();
35  if (eof != kEofStateNone && !allpaused)
36  return true;
37  // DeleteMap and EditMode from the parent MythPlayer should not be
38  // relevant here.
39  return false;
40 }
41 
43 {
44  if ((kDisplayAVSubtitle & mode) && player_ctx->buffer->IsDVD())
46  MythPlayer::DisableCaptions(mode, osd_msg);
47 }
48 
50 {
51  if ((kDisplayAVSubtitle & mode) && player_ctx->buffer->IsDVD())
52  {
53  int track = GetTrack(kTrackTypeSubtitle);
54  if (track >= 0 && track < (int)decoder->GetTrackCount(kTrackTypeSubtitle))
55  {
57  track);
59  stream.stream_id);
60  }
61  }
62  MythPlayer::EnableCaptions(mode, osd_msg);
63 }
64 
66 {
67  if (player_ctx->buffer->IsDVD() &&
69  {
71  }
74 }
75 
77 {
80 }
81 
83 {
85 }
86 
88 {
90  if (decoder_change_lock.tryLock(1))
91  {
92  if (decoder)
94  decoder_change_lock.unlock();
95  }
96  return res;
97 }
98 
100 {
102  return (player_ctx->buffer->IsDVD() &&
103  (player_ctx->buffer->DVD()->GetCurrentTime() < 2));
104 }
105 
107 {
109 }
110 
112 {
113  if (!m_initial_dvdstate.isEmpty())
115 
117 }
118 
120 {
121  if (!player_ctx->buffer->IsDVD())
122  {
123  SetErrored("RingBuffer is not a DVD.");
124  return !IsErrored();
125  }
126 
127  int nbframes = 0;
128  if (videoOutput)
129  nbframes = videoOutput->ValidVideoFrames();
130 
131 #if 0
132  LOG(VB_PLAYBACK, LOG_DEBUG,
133  LOC + QString("Validframes %1, FreeFrames %2, VideoPaused %3")
134  .arg(nbframes).arg(videoOutput->FreeVideoFrames()).arg(videoPaused));
135 #endif
136 
137  // completely drain the video buffers for certain situations
138  bool release_all = player_ctx->buffer->DVD()->DVDWaitingForPlayer() &&
139  (nbframes > 0);
140  bool release_one = (nbframes > 1) && videoPaused && !allpaused &&
142  player_ctx->buffer->DVD()->IsWaiting() ||
144  if (release_all || release_one)
145  {
146  if (nbframes < 5 && videoOutput)
148 
149  // if we go below the pre-buffering limit, the player will pause
150  // so do this 'manually'
151  DisplayNormalFrame(false);
152  // unpause the still frame if more frames become available
153  if (dvd_stillframe_showing && nbframes > 1)
154  {
155  dvd_stillframe_showing = false;
156  UnpauseVideo();
157  }
158  return !IsErrored();
159  }
160 
161  // clear the mythtv imposed wait state
163  {
164  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Clearing MythTV DVD wait state");
166  ClearAfterSeek(true);
167  if (videoPaused && !allpaused)
168  UnpauseVideo();
169  return !IsErrored();
170  }
171 
172  // wait for the video buffers to drain
173  if (nbframes < 2)
174  {
175  // clear the DVD wait state
176  if (player_ctx->buffer->DVD()->IsWaiting())
177  {
178  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Clearing DVD wait state");
179  player_ctx->buffer->DVD()->WaitSkip();
180  if (videoPaused && !allpaused)
181  UnpauseVideo();
182  return !IsErrored();
183  }
184 
185  // the still frame is treated as a pause frame
187  {
188  // ensure we refresh the pause frame
190  needNewPauseFrame = true;
191 
192  // we are in a still frame so pause video output
193  if (!videoPaused)
194  {
195  PauseVideo();
196  dvd_stillframe_showing = true;
197  return !IsErrored();
198  }
199 
200  // see if the pause frame has timed out
201  StillFrameCheck();
202 
203  // flag if we have no frame
204  if (nbframes == 0)
205  {
206  LOG(VB_PLAYBACK, LOG_WARNING, LOC +
207  "In DVD Menu: No video frames in queue");
208  usleep(10000);
209  return !IsErrored();
210  }
211 
212  dvd_stillframe_showing = true;
213  }
214  }
215 
216  // unpause the still frame if more frames become available
217  if (dvd_stillframe_showing && nbframes > 1)
218  {
219  UnpauseVideo();
220  dvd_stillframe_showing = false;
221  return !IsErrored();
222  }
223 
224  return MythPlayer::VideoLoop();
225 }
226 
228 {
229  // clear the buffering state
230  SetBuffering(false);
231 
234 
235  osdLock.lock();
236  videofiltersLock.lock();
239  videofiltersLock.unlock();
240  osdLock.unlock();
241 
242  AVSync(NULL, true);
243 }
244 
245 bool MythDVDPlayer::FastForward(float seconds)
246 {
247  if (decoder)
249  return MythPlayer::FastForward(seconds);
250 }
251 
252 bool MythDVDPlayer::Rewind(float seconds)
253 {
254  if (decoder)
256  return MythPlayer::Rewind(seconds);
257 }
258 
259 bool MythDVDPlayer::JumpToFrame(uint64_t frame)
260 {
261  if (frame == ~0x0ULL)
262  return false;
263 
264  if (decoder)
266  return MythPlayer::JumpToFrame(frame);
267 }
268 
270 {
271  if (player_ctx->buffer->DVD())
272  player_ctx->buffer->DVD()->SetParent(this);
273 
274  player_ctx->LockPlayingInfo(__FILE__, __LINE__);
275  if (player_ctx->playingInfo)
276  {
277  QString name;
278  QString serialid;
279  if (player_ctx->playingInfo->GetTitle().isEmpty() &&
280  player_ctx->buffer->DVD() &&
281  player_ctx->buffer->DVD()->GetNameAndSerialNum(name, serialid))
282  {
284  }
285  }
286  player_ctx->UnlockPlayingInfo(__FILE__, __LINE__);
287 
289 }
290 
292 {
294 
295  if (m_initial_title > -1)
297 
298  if (m_initial_audio_track > -1)
301  if (m_initial_subtitle_track > -1)
304 
305  if (bookmarkseek > 30)
306  {
307  // we need to trigger a dvd cell change to ensure the new title length
308  // is set and the position map updated accordingly
309  decodeOneFrame = true;
310  int count = 0;
311  while (count++ < 100 && decodeOneFrame)
312  usleep(50000);
313  }
316 }
317 
318 void MythDVDPlayer::ResetPlaying(bool resetframes)
319 {
321 }
322 
324 {
325  if (player_ctx->buffer->DVD())
326  player_ctx->buffer->DVD()->SetParent(NULL);
327 }
328 
329 bool MythDVDPlayer::PrepareAudioSample(int64_t &timecode)
330 {
332  WrapTimecode(timecode, TC_AUDIO);
333 
334  if (player_ctx->buffer->IsDVD() &&
336  return true;
337  return false;
338 }
339 
341 {
342  if (!player_ctx->buffer->IsDVD())
343  return;
344 
345  QStringList fields;
346  QString name;
347  QString serialid;
348  QString dvdstate;
349 
350  if (!player_ctx->buffer->IsInMenu() &&
352  {
353  if (!player_ctx->buffer->DVD()->GetNameAndSerialNum(name, serialid))
354  {
355  LOG(VB_GENERAL, LOG_ERR, LOC +
356  "DVD has no name and serial number. Cannot set bookmark.");
357  return;
358  }
359 
360  if (!clear && !player_ctx->buffer->DVD()->GetDVDStateSnapshot(dvdstate))
361  {
362  LOG(VB_GENERAL, LOG_ERR, LOC +
363  "Unable to retrieve DVD state. Cannot set bookmark.");
364  return;
365  }
366 
367  player_ctx->LockPlayingInfo(__FILE__, __LINE__);
368  if (player_ctx->playingInfo)
369  {
370  fields += serialid;
371  fields += name;
372 
373  if (!clear)
374  {
375  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Set bookmark");
376  fields += dvdstate;
377  }
378  else
379  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Clear bookmark");
380 
382 
383  }
384  player_ctx->UnlockPlayingInfo(__FILE__, __LINE__);
385  }
386 }
387 
389 {
391  return 0;
392 
393  QStringList dvdbookmark = QStringList();
394  QString name;
395  QString serialid;
396  uint64_t frames = 0;
397  player_ctx->LockPlayingInfo(__FILE__, __LINE__);
398  if (player_ctx->playingInfo)
399  {
400  if (!player_ctx->buffer->DVD()->GetNameAndSerialNum(name, serialid))
401  {
402  player_ctx->UnlockPlayingInfo(__FILE__, __LINE__);
403  return 0;
404  }
405 
406  dvdbookmark = player_ctx->playingInfo->QueryDVDBookmark(serialid);
407 
408  if (!dvdbookmark.empty())
409  {
410  QStringList::Iterator it = dvdbookmark.begin();
411 
412  if (dvdbookmark.count() == 1)
413  {
414  m_initial_dvdstate = *it;
415  frames = ~0x0ULL;
416  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Get Bookmark: bookmark found");
417  }
418  else
419  {
420  // Legacy bookmarks
421  m_initial_title = (*it).toInt();
422  frames = (uint64_t)((*++it).toLongLong() & 0xffffffffLL);
423  m_initial_audio_track = (*++it).toInt();
424  m_initial_subtitle_track = (*++it).toInt();
425  LOG(VB_PLAYBACK, LOG_INFO, LOC +
426  QString("Get Bookmark: title %1 audiotrack %2 subtrack %3 "
427  "frame %4")
429  .arg(m_initial_subtitle_track).arg(frames));
430  }
431  }
432  }
433  player_ctx->UnlockPlayingInfo(__FILE__, __LINE__);
434  return frames;;
435 }
436 
438 {
439  if (m_stillFrameLength > 0)
440  {
441  m_stillFrameTimerLock.lock();
442  // Get the timestretched elapsed time and transform
443  // it to what the unstretched value would have been
444  // had we been playing with the new timestretch value
445  // all along
446  int elapsed = (int)(m_stillFrameTimer.elapsed() * play_speed / next_play_speed);
448  m_stillFrameTimer.addMSecs(elapsed);
449  m_stillFrameTimerLock.unlock();
450  }
451 
453 
454  if (decoder)
457  player_ctx->buffer->DVD()->SetDVDSpeed(-1);
458  else if (player_ctx->buffer->IsDVD())
460 }
461 
462 void MythDVDPlayer::AVSync(VideoFrame *frame, bool limit_delay)
463 {
464  MythPlayer::AVSync(frame, true);
465 }
466 
467 long long MythDVDPlayer::CalcMaxFFTime(long long ff, bool setjump) const
468 {
469  if ((totalFrames > 0) && player_ctx->buffer->IsDVD() &&
470  player_ctx->buffer->DVD()->TitleTimeLeft() < 5)
471  return 0;
472  return MythPlayer::CalcMaxFFTime(ff, setjump);
473 }
474 
475 int64_t MythDVDPlayer::GetSecondsPlayed(bool, int divisor) const
476 {
477  if (!player_ctx->buffer->IsDVD())
478  return 0;
479 
480  int64_t played = player_ctx->buffer->DVD()->GetCurrentTime();
481 
482  if (m_stillFrameLength > 0)
483  {
484  if (m_stillFrameLength == 255)
485  played = -1;
486  else
487  played = m_stillFrameTimer.elapsed() * play_speed / divisor;
488  }
489 
490  return played;
491 }
492 
493 int64_t MythDVDPlayer::GetTotalSeconds(bool /*honorCutList*/, int divisor) const
494 {
495  int64_t total = totalLength;
496 
497  if (m_stillFrameLength > 0)
498  {
499  if (m_stillFrameLength == 255)
500  return -1;
501  else
502  total = m_stillFrameLength;
503  }
504 
505  return total * 1000 / divisor;
506 }
507 
508 void MythDVDPlayer::SeekForScreenGrab(uint64_t &number, uint64_t frameNum,
509  bool absolute)
510 {
511  if (!player_ctx->buffer->IsDVD())
512  return;
513  if (GoToMenu("menu"))
514  {
515  if (player_ctx->buffer->DVD()->IsInMenu() &&
517  {
518  GoToDVDProgram(1);
519  }
520  }
521  else if (player_ctx->buffer->DVD()->GetTotalTimeOfTitle() < 60)
522  {
523  GoToDVDProgram(1);
524  number = frameNum;
525  if (number >= totalFrames)
526  number = totalFrames / 2;
527  }
528 }
529 
531 {
532  if (kTrackTypeAudio == type)
533  {
534  StreamInfo stream = decoder->GetTrackInfo(type, trackNo);
535  player_ctx->buffer->DVD()->SetTrack(type, stream.stream_id);
536  }
537 
538  return MythPlayer::SetTrack(type, trackNo);
539 }
540 
542 {
543  if (!player_ctx->buffer->IsDVD())
544  return 0;
545  return player_ctx->buffer->DVD()->NumPartsInTitle();
546 }
547 
549 {
550  if (!player_ctx->buffer->IsDVD())
551  return 0;
552  return player_ctx->buffer->DVD()->GetPart();
553 }
554 
555 void MythDVDPlayer::GetChapterTimes(QList<long long> &times)
556 {
557  if (!player_ctx->buffer->IsDVD())
558  return;
559  player_ctx->buffer->DVD()->GetChapterTimes(times);
560 }
561 
563 {
564  if (!player_ctx->buffer->IsDVD())
565  return false;
566 
567  int total = GetNumChapters();
568  int current = GetCurrentChapter();
569 
570  if (chapter < 0 || chapter > total)
571  {
572  if (chapter < 0)
573  {
574  chapter = current -1;
575  if (chapter < 0) chapter = 0;
576  }
577  else if (chapter > total)
578  {
579  chapter = current + 1;
580  if (chapter > total) chapter = total;
581  }
582  }
583 
584  bool success = player_ctx->buffer->DVD()->playTrack(chapter);
585  if (success)
586  {
587  if (decoder)
588  {
590  if (player_ctx->buffer->DVD()->GetCellStart() == 0)
591  decoder->SeekReset(framesPlayed, 0, true, true);
592  }
594  }
595 
596  jumpchapter = 0;
597  return success;
598 }
599 
601 {
602  if (!osd || !player_ctx->buffer->IsDVD())
603  return;
604 
605  uint buttonversion = 0;
606  AVSubtitle *dvdSubtitle = player_ctx->buffer->DVD()->GetMenuSubtitle(buttonversion);
607  bool numbuttons = player_ctx->buffer->DVD()->NumMenuButtons();
608 
609  bool expired = false;
610 
611  VideoFrame *currentFrame = videoOutput ? videoOutput->GetLastShownFrame() : NULL;
612 
613  if (!currentFrame)
614  {
616  return;
617  }
618 
619  if (dvdSubtitle &&
620  (dvdSubtitle->end_display_time > dvdSubtitle->start_display_time) &&
621  (dvdSubtitle->end_display_time < currentFrame->timecode))
622  {
623  expired = true;
624  }
625 
626  // nothing to do
627  if (!expired && (buttonversion == ((uint)m_buttonVersion)))
628  {
630  return;
631  }
632 
633  // clear any buttons
634  if (!numbuttons || !dvdSubtitle || (buttonversion == 0) || expired)
635  {
636  osdLock.lock();
637  if (osd)
638  osd->ClearSubtitles();
639  osdLock.unlock();
640  m_buttonVersion = 0;
642  return;
643  }
644 
645  if (currentFrame->timecode && (dvdSubtitle->start_display_time > currentFrame->timecode))
646  {
648  return;
649  }
650 
651  m_buttonVersion = buttonversion;
652  QRect buttonPos = player_ctx->buffer->DVD()->GetButtonCoords();
653  osdLock.lock();
654  if (osd)
655  osd->DisplayDVDButton(dvdSubtitle, buttonPos);
656  osdLock.unlock();
659 }
660 
661 bool MythDVDPlayer::GoToMenu(QString str)
662 {
663  if (!player_ctx->buffer->IsDVD())
664  return false;
666  bool ret = player_ctx->buffer->DVD()->GoToMenu(str);
667 
668  if (!ret)
669  {
670  SetOSDMessage(tr("DVD Menu Not Available"), kOSDTimeout_Med);
671  LOG(VB_GENERAL, LOG_ERR, "No DVD Menu available.");
672  return false;
673  }
674 
675  return true;
676 }
677 
678 void MythDVDPlayer::GoToDVDProgram(bool direction)
679 {
680  if (!player_ctx->buffer->IsDVD())
681  return;
682  if (direction == 0)
684  else
686 }
687 
689 {
690  return (m_stillFrameLength > 0);
691 }
692 
694 {
695  if (player_ctx->buffer->DVD() && player_ctx->buffer->DVD()->IsOpen())
696  return player_ctx->buffer->DVD()->GetNumAngles();
697  return 0;
698 }
699 
701 {
702  if (player_ctx->buffer->DVD() && player_ctx->buffer->DVD()->IsOpen())
703  return player_ctx->buffer->DVD()->GetCurrentAngle();
704  return -1;
705 }
706 
707 QString MythDVDPlayer::GetAngleName(int angle) const
708 {
709  if (angle >= 1 && angle <= GetNumAngles())
710  {
711  QString name = tr("Angle %1").arg(angle);
712  return name;
713  }
714  return QString();
715 }
716 
718 {
719  uint total = GetNumAngles();
720  if (!total || angle == GetCurrentAngle())
721  return false;
722 
723  if (angle < 1 || angle > (int)total)
724  angle = 1;
725 
726  return player_ctx->buffer->DVD()->SwitchAngle(angle);
727 }
728 
730 {
731  m_stillFrameTimerLock.lock();
733  m_stillFrameTimerLock.unlock();
734 }
735 
737 {
738  if (length != m_stillFrameLength)
739  {
740  m_stillFrameTimerLock.lock();
741  m_stillFrameLength = length;
743  m_stillFrameTimerLock.unlock();
744  }
745 }
746 
748 {
749  if (player_ctx->buffer->IsDVD() &&
751  (m_stillFrameLength > 0) && (m_stillFrameLength < 0xff))
752  {
753  m_stillFrameTimerLock.lock();
754  int elapsedTime = (int)(m_stillFrameTimer.elapsed() * play_speed / 1000);
755  m_stillFrameTimerLock.unlock();
756  if (elapsedTime >= m_stillFrameLength)
757  {
758  LOG(VB_PLAYBACK, LOG_INFO, LOC +
759  QString("Stillframe timeout after %1 seconds (timestretch %2)")
760  .arg(m_stillFrameLength)
761  .arg(play_speed));
763  m_stillFrameLength = 0;
764  }
765  }
766 }
767 
768 void MythDVDPlayer::CreateDecoder(char *testbuf, int testreadsize)
769 {
771  testreadsize))
772  {
774  playerFlags));
775  }
776 }
GLuint buffer
bool normal_speed
Definition: mythplayer.h:802
uint64_t totalFrames
Definition: mythplayer.h:695
void SetTrack(uint type, int trackNo)
set the dvd subtitle/audio track used
virtual bool DoJumpChapter(int chapter)
virtual bool IsInDiscMenuOrStillFrame(void) const
QStringList QueryDVDBookmark(const QString &serialid) const
Queries "dvdbookmark" table for bookmarking DVD serial number.
int restart(void)
Returns milliseconds elapsed since last start() or restart() and resets the count.
Definition: mythtimer.cpp:62
virtual bool DecoderGetFrameFFREW(void)
void SetErrored(const QString &reason)
int FreeVideoFrames(void)
Returns number of frames available for decoding onto.
Definition: videooutbase.h:175
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:83
PlayerFlags
Definition: mythplayer.h:83
virtual void SeekReset(long long newkey, uint skipFrames, bool doFlush, bool discardFrames)
Definition: decoderbase.cpp:99
virtual void UpdatePauseFrame(int64_t &disp_timecode)=0
Updates frame displayed when video is paused.
QMutex m_stillFrameTimerLock
void SetScanType(FrameScanType)
Definition: mythplayer.cpp:746
void SkipDVDWaitingForPlayer(void)
void LockPlayingInfo(const char *file, int line) const
virtual void EventStart(void)
void GoToNextProgram(void)
void ClearAfterSeek(bool clearvideobuffers=true)
This is to support seeking...
virtual bool VideoLoop(void)
virtual void DisplayPauseFrame(void)
uint GetTotalTimeOfTitle(void)
get the total time of the title in seconds 90000 ticks = 1 sec
virtual void DecoderPauseCheck(void)
QMutex videofiltersLock
Definition: mythplayer.h:778
bool SwitchAngle(uint angle)
virtual long long CalcMaxFFTime(long long ff, bool setjump=true) const
CalcMaxFFTime(ffframes): forward ffframes forward.
virtual bool JumpToFrame(uint64_t frame)
void ClearSubtitles(void)
Definition: osd.cpp:1361
long long totalLength
Definition: mythplayer.h:696
bool RestoreDVDStateSnapshot(QString &state)
Restore a DVD VM from a snapshot.
virtual bool IsInMenu(void) const
virtual bool FastForward(float seconds)
void SetDVDSpeed(void)
set dvd speed.
StreamInfo GetTrackInfo(uint type, uint trackNo) const
virtual void CreateDecoder(char *testbuf, int testreadsize)
void PauseVideo(void)
Definition: mythplayer.cpp:418
virtual void VideoStart(void)
virtual bool SwitchAngle(int angle)
virtual void DisableCaptions(uint mode, bool osd_msg=true)
virtual bool GoToMenu(QString str)
virtual void EnableCaptions(uint mode, bool osd_msg=true)
virtual int64_t GetTotalSeconds(bool honorCutList, int divisor=1000) const
unsigned int uint
Definition: compat.h:139
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
GLint GLenum GLsizei GLint GLenum GLenum type
QMutex decoder_change_lock
Definition: mythplayer.h:626
void DisplayLastFrame(void)
bool IsStillFramePending(void) const
void SkipStillFrame(void)
virtual bool VideoLoop(void)
void SetOSDMessage(const QString &msg, OSDTimeout timeout)
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque
long long timecode
Definition: mythframe.h:44
int GetPart(void) const
virtual void ResetPlaying(bool resetframes=true)
float play_speed
Definition: mythplayer.h:801
void GetChapterTimes(QList< long long > &times)
virtual bool FastForward(float seconds)
QRect GetButtonCoords(void)
get coordinates of highlighted button
virtual bool PrepareAudioSample(int64_t &timecode)
uint64_t framesPlayed
Definition: mythplayer.h:691
virtual bool IsInStillFrame() const
int GetCurrentAngle(void) const
$tree eof()
bool IsDVD(void) const
virtual bool Rewind(float seconds)
virtual long long CalcMaxFFTime(long long ff, bool setjump=true) const
CalcMaxFFTime(ffframes): forward ffframes forward.
virtual int64_t GetSecondsPlayed(bool honorCutList, int divisor=1000) const
virtual void GoToDVDProgram(bool direction)
EofState
Definition: decoderbase.h:66
virtual void AutoDeint(VideoFrame *frame, bool allow_lock=true)
int m_initial_audio_track
bool DVDWaitingForPlayer(void)
virtual bool JumpToFrame(uint64_t frame)
virtual int GetNumChapters(void)
int NumMenuButtons(void) const
virtual void InitialSeek(void)
virtual void ChangeSpeed(void)
virtual uint64_t GetBookmark(void)
virtual void EventStart(void)
int64_t disp_timecode
Definition: mythplayer.h:820
virtual void AVSync(VideoFrame *buffer, bool limit_delay=false)
QString GetFilename(void) const
Returns name of file used by this RingBuffer.
bool IsOpen(void) const
Returns true if open for either reading or writing.
QString m_initial_dvdstate
int elapsed(void) const
Returns milliseconds elapsed since last start() or restart()
Definition: mythtimer.cpp:90
static void clear(SettingsMap &cache, SettingsMap &overrides, const QString &myKey)
Definition: mythdb.cpp:816
uint TitleTimeLeft(void)
returns seconds left in the title
virtual Q_DECLARE_TR_FUNCTIONS(MythDVDPlayer) public void ReleaseNextVideoFrame(VideoFrame *buffer, int64_t timecode, bool wrap=true)
Places frame on the queue of frames ready for display.
int jumpchapter
Definition: mythplayer.h:676
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:10
virtual void PreProcessNormalFrame(void)
virtual void DisableCaptions(uint mode, bool osd_msg=true)
int GetTrack(uint type)
bool playTrack(int track)
bool IsDatabaseIgnored(void) const
/brief Returns true if database is being ignored.
virtual void UpdateFramesPlayed(void)
virtual void VideoStart(void)
virtual void ProcessFrame(VideoFrame *frame, OSD *osd, FilterChain *filterList, const PIPMap &pipPlayers, FrameScanType scan=kScan_Ignore)=0
PIPMap pip_players
Definition: mythplayer.h:772
virtual void SeekForScreenGrab(uint64_t &number, uint64_t frameNum, bool absolute)
void WrapTimecode(int64_t &timecode, TCTypes tc_type)
virtual bool IsBookmarkAllowed(void)
RingBuffer * buffer
const char * name
Definition: ParseText.cpp:338
void SetParent(MythDVDPlayer *p)
virtual bool DecoderGetFrameFFREW(void)
virtual void DisplayNormalFrame(bool check_prebuffer=true)
float next_play_speed
Definition: mythplayer.h:798
EofState GetEof(void) const
AVSubtitle * GetMenuSubtitle(uint &version)
returns dvd menu button information if available.
ProgramInfo * playingInfo
Currently playing info.
MythTimer m_stillFrameTimer
virtual bool Rewind(float seconds)
uint textDisplayMode
Definition: mythplayer.h:728
bool allpaused
Definition: mythplayer.h:657
virtual uint GetTrackCount(uint type) const
Definition: decoderbase.h:243
virtual bool IsInStillFrame(void) const
void UnpauseVideo(void)
Definition: mythplayer.cpp:426
virtual void ResetPlaying(bool resetframes=true)
int NumPartsInTitle(void) const
static bool CanHandle(char testbuf[kDecoderProbeBufferSize], const QString &filename, int testbufsize=kDecoderProbeBufferSize)
Perform an av_probe_input_format on the passed data to see if we can decode it with this class...
void addMSecs(int ms)
Adds an offset to the last call to start() or restart().
Definition: mythtimer.cpp:145
void GoToPreviousProgram(void)
virtual bool IsInMenu(void) const
void ResetStillFrameTimer(void)
bool IsErrored(void) const
voidpf stream
Definition: ioapi.h:136
virtual void ReleaseNextVideoFrame(VideoFrame *buffer, int64_t timecode, bool wrap=true)
Places frame on the queue of frames ready for display.
void WaitSkip(void)
virtual void EnableCaptions(uint mode, bool osd_msg=true)
void SetDecoder(DecoderBase *dec)
Sets the stream decoder, deleting any existing recorder.
bool GetNameAndSerialNum(QString &_name, QString &_serialnum)
Get the dvd title and serial num.
bool EnoughFreeFrames(void)
Returns true iff enough frames are available to decode onto.
Definition: videooutbase.h:177
void UnlockPlayingInfo(const char *file, int line) const
uint GetCellStart(void)
get the start of the cell in seconds
virtual bool PrebufferEnoughFrames(int min_buffers=0)
typedef void(APIENTRY *MYTH_GLTEXIMAGE1DPROC)(GLenum target
void SaveDVDBookmark(const QStringList &fields) const
void PlayTitleAndPart(int _title, int _part)
void StillFrameCheck(void)
virtual void ChangeSpeed(void)
virtual QString GetAngleName(int angle) const
virtual VideoFrame * GetLastShownFrame(void)
Returns frame from the head of the ready to be displayed queue, if StartDisplayingFrame has been call...
Definition: videooutbase.h:222
virtual int GetCurrentChapter(void)
int m_initial_subtitle_track
FilterChain * videoFilters
Definition: mythplayer.h:783
void SetBuffering(bool new_buffering)
virtual int SetTrack(uint type, int trackNo)
PlayerFlags playerFlags
Definition: mythplayer.h:624
virtual bool DecoderGetFrameREW(void)
void SetTitle(const QString &t)
Definition: programinfo.h:490
bool needNewPauseFrame
Definition: mythplayer.h:651
virtual bool PrebufferEnoughFrames(int min_buffers=0)
const char * frames[3]
Definition: element.c:46
virtual void SetBookmark(bool clear=false)
static const QString LOC
const char int mode
Definition: ioapi.h:135
int GetNumAngles(void)
const DVDRingBuffer * DVD(void) const
virtual void InitialSeek(void)
virtual void GetChapterTimes(QList< long long > &times)
VideoOutput * videoOutput
Definition: mythplayer.h:627
virtual bool DecoderGetFrameREW(void)
virtual void EventEnd(void)
virtual int GetCurrentAngle(void) const
virtual int ValidVideoFrames(void) const
Returns number of frames that are fully decoded.
Definition: videooutbase.h:172
virtual void DecoderPauseCheck(void)
OSD * osd
Definition: mythplayer.h:763
PlayerContext * player_ctx
Definition: mythplayer.h:628
virtual int GetNumAngles(void) const
uint64_t bookmarkseek
Definition: mythplayer.h:679
void DisplayDVDButton(void)
bool videoPaused
Definition: mythplayer.h:656
int64_t GetCurrentTime(void)
virtual void AVSync(VideoFrame *buffer, bool limit_delay=false)
bool dvd_stillframe_showing
virtual int SetTrack(uint type, int trackNo)
bool IsWaiting(void) const
void SetStillFrameTimeout(int length)
virtual void DisplayPauseFrame(void)
bool GoToMenu(const QString &str)
jump to a dvd root or chapter menu
QString GetTitle(void) const
Definition: programinfo.h:346
DecoderBase * decoder
Definition: mythplayer.h:625
virtual bool HasReachedEof(void) const
void DisplayDVDButton(AVSubtitle *dvdButton, QRect &pos)
Definition: osd.cpp:1371
bool decodeOneFrame
Definition: mythplayer.h:650
bool GetDVDStateSnapshot(QString &state)
Get a snapshot of the current DVD VM state.
QMutex osdLock
Definition: mythplayer.h:765
virtual void IgnoreWaitStates(bool ignore)
void ReleaseMenuButton(void)