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 "myth_imgconvert.h"
5 #include "avformatdecoderdvd.h"
6 #include "mythdvdplayer.h"
7 
8 #define LOC QString("DVDPlayer: ")
9 
10 MythDVDPlayer::MythDVDPlayer(PlayerFlags flags)
11  : MythPlayer(flags), m_buttonVersion(0),
12  dvd_stillframe_showing(false),
13  m_initial_title(-1), m_initial_audio_track(-1),
14  m_initial_subtitle_track(-1),
15  m_stillFrameLength(0)
16 {
17 }
18 
19 void MythDVDPlayer::AutoDeint(VideoFrame *frame, bool allow_lock)
20 {
21  (void)frame;
22  (void)allow_lock;
24 }
25 
27  int64_t timecode, bool wrap)
28 {
29  MythPlayer::ReleaseNextVideoFrame(buffer, timecode,
31 }
32 
34 {
35  EofState eof = GetEof();
36  if (eof != kEofStateNone && !allpaused)
37  return true;
38  // DeleteMap and EditMode from the parent MythPlayer should not be
39  // relevant here.
40  return false;
41 }
42 
44 {
45  if ((kDisplayAVSubtitle & mode) && player_ctx->buffer->IsDVD())
47  MythPlayer::DisableCaptions(mode, osd_msg);
48 }
49 
51 {
52  if ((kDisplayAVSubtitle & mode) && player_ctx->buffer->IsDVD())
53  {
54  int track = GetTrack(kTrackTypeSubtitle);
55  if (track >= 0 && track < (int)decoder->GetTrackCount(kTrackTypeSubtitle))
56  {
58  track);
60  stream.stream_id);
61  }
62  }
63  MythPlayer::EnableCaptions(mode, osd_msg);
64 }
65 
67 {
68  if (player_ctx->buffer->IsDVD() &&
70  {
72  }
75 }
76 
78 {
81 }
82 
84 {
86 }
87 
89 {
91  if (decoder_change_lock.tryLock(1))
92  {
93  if (decoder)
95  decoder_change_lock.unlock();
96  }
97  return res;
98 }
99 
101 {
103  return (player_ctx->buffer->IsDVD() &&
104  (player_ctx->buffer->DVD()->GetCurrentTime() < 2));
105 }
106 
108 {
110 }
111 
113 {
114  if (!m_initial_dvdstate.isEmpty())
116 
118 }
119 
121 {
122  if (!player_ctx->buffer->IsDVD())
123  {
124  SetErrored("RingBuffer is not a DVD.");
125  return !IsErrored();
126  }
127 
128  int nbframes = 0;
129  if (videoOutput)
130  nbframes = videoOutput->ValidVideoFrames();
131 
132 #if 0
133  LOG(VB_PLAYBACK, LOG_DEBUG,
134  LOC + QString("Validframes %1, FreeFrames %2, VideoPaused %3")
135  .arg(nbframes).arg(videoOutput->FreeVideoFrames()).arg(videoPaused));
136 #endif
137 
138  // completely drain the video buffers for certain situations
139  bool release_all = player_ctx->buffer->DVD()->DVDWaitingForPlayer() &&
140  (nbframes > 0);
141  bool release_one = (nbframes > 1) && videoPaused && !allpaused &&
143  player_ctx->buffer->DVD()->IsWaiting() ||
145  if (release_all || release_one)
146  {
147  if (nbframes < 5 && videoOutput)
149 
150  // if we go below the pre-buffering limit, the player will pause
151  // so do this 'manually'
152  DisplayNormalFrame(false);
153  // unpause the still frame if more frames become available
154  if (dvd_stillframe_showing && nbframes > 1)
155  {
156  dvd_stillframe_showing = false;
157  UnpauseVideo();
158  }
159  return !IsErrored();
160  }
161 
162  // clear the mythtv imposed wait state
164  {
165  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Clearing MythTV DVD wait state");
167  ClearAfterSeek(true);
168  if (videoPaused && !allpaused)
169  UnpauseVideo();
170  return !IsErrored();
171  }
172 
173  // wait for the video buffers to drain
174  if (nbframes < 2)
175  {
176  // clear the DVD wait state
177  if (player_ctx->buffer->DVD()->IsWaiting())
178  {
179  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Clearing DVD wait state");
180  player_ctx->buffer->DVD()->WaitSkip();
181  if (videoPaused && !allpaused)
182  UnpauseVideo();
183  return !IsErrored();
184  }
185 
186  // the still frame is treated as a pause frame
188  {
189  // ensure we refresh the pause frame
191  needNewPauseFrame = true;
192 
193  // we are in a still frame so pause video output
194  if (!videoPaused)
195  {
196  PauseVideo();
197  dvd_stillframe_showing = true;
198  return !IsErrored();
199  }
200 
201  // see if the pause frame has timed out
202  StillFrameCheck();
203 
204  // flag if we have no frame
205  if (nbframes == 0)
206  {
207  LOG(VB_PLAYBACK, LOG_WARNING, LOC +
208  "In DVD Menu: No video frames in queue");
209  usleep(10000);
210  return !IsErrored();
211  }
212 
213  dvd_stillframe_showing = true;
214  }
215  }
216 
217  // unpause the still frame if more frames become available
218  if (dvd_stillframe_showing && nbframes > 1)
219  {
220  UnpauseVideo();
221  dvd_stillframe_showing = false;
222  return !IsErrored();
223  }
224 
225  return MythPlayer::VideoLoop();
226 }
227 
229 {
230  // clear the buffering state
231  SetBuffering(false);
232 
235 
236  osdLock.lock();
237  videofiltersLock.lock();
240  videofiltersLock.unlock();
241  osdLock.unlock();
242 
243  AVSync(NULL, true);
244 }
245 
246 bool MythDVDPlayer::FastForward(float seconds)
247 {
248  if (decoder)
250  return MythPlayer::FastForward(seconds);
251 }
252 
253 bool MythDVDPlayer::Rewind(float seconds)
254 {
255  if (decoder)
257  return MythPlayer::Rewind(seconds);
258 }
259 
260 bool MythDVDPlayer::JumpToFrame(uint64_t frame)
261 {
262  if (frame == ~0x0ULL)
263  return false;
264 
265  if (decoder)
267  return MythPlayer::JumpToFrame(frame);
268 }
269 
271 {
272  if (player_ctx->buffer->DVD())
273  player_ctx->buffer->DVD()->SetParent(this);
274 
275  player_ctx->LockPlayingInfo(__FILE__, __LINE__);
276  if (player_ctx->playingInfo)
277  {
278  QString name;
279  QString serialid;
280  if (player_ctx->playingInfo->GetTitle().isEmpty() &&
281  player_ctx->buffer->DVD() &&
282  player_ctx->buffer->DVD()->GetNameAndSerialNum(name, serialid))
283  {
285  }
286  }
287  player_ctx->UnlockPlayingInfo(__FILE__, __LINE__);
288 
290 }
291 
293 {
295 
296  if (m_initial_title > -1)
298 
299  if (m_initial_audio_track > -1)
302  if (m_initial_subtitle_track > -1)
305 
306  if (bookmarkseek > 30)
307  {
308  // we need to trigger a dvd cell change to ensure the new title length
309  // is set and the position map updated accordingly
310  decodeOneFrame = true;
311  int count = 0;
312  while (count++ < 100 && decodeOneFrame)
313  usleep(50000);
314  }
317 }
318 
319 void MythDVDPlayer::ResetPlaying(bool resetframes)
320 {
322 }
323 
325 {
326  if (player_ctx->buffer->DVD())
327  player_ctx->buffer->DVD()->SetParent(NULL);
328 }
329 
330 bool MythDVDPlayer::PrepareAudioSample(int64_t &timecode)
331 {
333  WrapTimecode(timecode, TC_AUDIO);
334 
335  if (player_ctx->buffer->IsDVD() &&
337  return true;
338  return false;
339 }
340 
342 {
343  if (!player_ctx->buffer->IsDVD())
344  return;
345 
346  QStringList fields;
347  QString name;
348  QString serialid;
349  QString dvdstate;
350 
351  if (!player_ctx->buffer->IsInMenu() &&
353  {
354  if (!player_ctx->buffer->DVD()->GetNameAndSerialNum(name, serialid))
355  {
356  LOG(VB_GENERAL, LOG_ERR, LOC +
357  "DVD has no name and serial number. Cannot set bookmark.");
358  return;
359  }
360 
361  if (!clear && !player_ctx->buffer->DVD()->GetDVDStateSnapshot(dvdstate))
362  {
363  LOG(VB_GENERAL, LOG_ERR, LOC +
364  "Unable to retrieve DVD state. Cannot set bookmark.");
365  return;
366  }
367 
368  player_ctx->LockPlayingInfo(__FILE__, __LINE__);
369  if (player_ctx->playingInfo)
370  {
371  fields += serialid;
372  fields += name;
373 
374  if (!clear)
375  {
376  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Set bookmark");
377  fields += dvdstate;
378  }
379  else
380  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Clear bookmark");
381 
383 
384  }
385  player_ctx->UnlockPlayingInfo(__FILE__, __LINE__);
386  }
387 }
388 
390 {
392  return 0;
393 
394  QStringList dvdbookmark = QStringList();
395  QString name;
396  QString serialid;
397  uint64_t frames = 0;
398  player_ctx->LockPlayingInfo(__FILE__, __LINE__);
399  if (player_ctx->playingInfo)
400  {
401  if (!player_ctx->buffer->DVD()->GetNameAndSerialNum(name, serialid))
402  {
403  player_ctx->UnlockPlayingInfo(__FILE__, __LINE__);
404  return 0;
405  }
406 
407  dvdbookmark = player_ctx->playingInfo->QueryDVDBookmark(serialid);
408 
409  if (!dvdbookmark.empty())
410  {
411  QStringList::Iterator it = dvdbookmark.begin();
412 
413  if (dvdbookmark.count() == 1)
414  {
415  m_initial_dvdstate = *it;
416  frames = ~0x0ULL;
417  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Get Bookmark: bookmark found");
418  }
419  else
420  {
421  // Legacy bookmarks
422  m_initial_title = (*it).toInt();
423  frames = (uint64_t)((*++it).toLongLong() & 0xffffffffLL);
424  m_initial_audio_track = (*++it).toInt();
425  m_initial_subtitle_track = (*++it).toInt();
426  LOG(VB_PLAYBACK, LOG_INFO, LOC +
427  QString("Get Bookmark: title %1 audiotrack %2 subtrack %3 "
428  "frame %4")
430  .arg(m_initial_subtitle_track).arg(frames));
431  }
432  }
433  }
434  player_ctx->UnlockPlayingInfo(__FILE__, __LINE__);
435  return frames;;
436 }
437 
439 {
440  if (m_stillFrameLength > 0)
441  {
442  m_stillFrameTimerLock.lock();
443  // Get the timestretched elapsed time and transform
444  // it to what the unstretched value would have been
445  // had we been playing with the new timestretch value
446  // all along
447  int elapsed = (int)(m_stillFrameTimer.elapsed() * play_speed / next_play_speed);
449  m_stillFrameTimer.addMSecs(elapsed);
450  m_stillFrameTimerLock.unlock();
451  }
452 
454 
455  if (decoder)
458  player_ctx->buffer->DVD()->SetDVDSpeed(-1);
459  else if (player_ctx->buffer->IsDVD())
461 }
462 
463 void MythDVDPlayer::AVSync(VideoFrame *frame, bool limit_delay)
464 {
465  MythPlayer::AVSync(frame, true);
466 }
467 
468 long long MythDVDPlayer::CalcMaxFFTime(long long ff, bool setjump) const
469 {
470  if ((totalFrames > 0) && player_ctx->buffer->IsDVD() &&
471  player_ctx->buffer->DVD()->TitleTimeLeft() < 5)
472  return 0;
473  return MythPlayer::CalcMaxFFTime(ff, setjump);
474 }
475 
476 int64_t MythDVDPlayer::GetSecondsPlayed(bool, int divisor) const
477 {
478  if (!player_ctx->buffer->IsDVD())
479  return 0;
480 
481  int64_t played = player_ctx->buffer->DVD()->GetCurrentTime();
482 
483  if (m_stillFrameLength > 0)
484  {
485  if (m_stillFrameLength == 255)
486  played = -1;
487  else
488  played = m_stillFrameTimer.elapsed() * play_speed / divisor;
489  }
490 
491  return played;
492 }
493 
494 int64_t MythDVDPlayer::GetTotalSeconds(bool /*honorCutList*/, int divisor) const
495 {
496  int64_t total = totalLength;
497 
498  if (m_stillFrameLength > 0)
499  {
500  if (m_stillFrameLength == 255)
501  return -1;
502  else
503  total = m_stillFrameLength;
504  }
505 
506  return total * 1000 / divisor;
507 }
508 
509 void MythDVDPlayer::SeekForScreenGrab(uint64_t &number, uint64_t frameNum,
510  bool absolute)
511 {
512  if (!player_ctx->buffer->IsDVD())
513  return;
514  if (GoToMenu("menu"))
515  {
516  if (player_ctx->buffer->DVD()->IsInMenu() &&
518  {
519  GoToDVDProgram(1);
520  }
521  }
522  else if (player_ctx->buffer->DVD()->GetTotalTimeOfTitle() < 60)
523  {
524  GoToDVDProgram(1);
525  number = frameNum;
526  if (number >= totalFrames)
527  number = totalFrames / 2;
528  }
529 }
530 
532 {
533  if (kTrackTypeAudio == type)
534  {
535  StreamInfo stream = decoder->GetTrackInfo(type, trackNo);
536  player_ctx->buffer->DVD()->SetTrack(type, stream.stream_id);
537  }
538 
539  return MythPlayer::SetTrack(type, trackNo);
540 }
541 
543 {
544  if (!player_ctx->buffer->IsDVD())
545  return 0;
546  return player_ctx->buffer->DVD()->NumPartsInTitle();
547 }
548 
550 {
551  if (!player_ctx->buffer->IsDVD())
552  return 0;
553  return player_ctx->buffer->DVD()->GetPart();
554 }
555 
556 void MythDVDPlayer::GetChapterTimes(QList<long long> &times)
557 {
558  if (!player_ctx->buffer->IsDVD())
559  return;
560  player_ctx->buffer->DVD()->GetChapterTimes(times);
561 }
562 
564 {
565  if (!player_ctx->buffer->IsDVD())
566  return false;
567 
568  int total = GetNumChapters();
569  int current = GetCurrentChapter();
570 
571  if (chapter < 0 || chapter > total)
572  {
573  if (chapter < 0)
574  {
575  chapter = current -1;
576  if (chapter < 0) chapter = 0;
577  }
578  else if (chapter > total)
579  {
580  chapter = current + 1;
581  if (chapter > total) chapter = total;
582  }
583  }
584 
585  bool success = player_ctx->buffer->DVD()->playTrack(chapter);
586  if (success)
587  {
588  if (decoder)
589  {
591  if (player_ctx->buffer->DVD()->GetCellStart() == 0)
592  decoder->SeekReset(framesPlayed, 0, true, true);
593  }
595  }
596 
597  jumpchapter = 0;
598  return success;
599 }
600 
602 {
603  if (!osd || !player_ctx->buffer->IsDVD())
604  return;
605 
606  uint buttonversion = 0;
607  AVSubtitle *dvdSubtitle = player_ctx->buffer->DVD()->GetMenuSubtitle(buttonversion);
608  bool numbuttons = player_ctx->buffer->DVD()->NumMenuButtons();
609 
610  bool expired = false;
611 
612  VideoFrame *currentFrame = videoOutput ? videoOutput->GetLastShownFrame() : NULL;
613 
614  if (!currentFrame)
615  {
617  return;
618  }
619 
620  if (dvdSubtitle &&
621  (dvdSubtitle->end_display_time > dvdSubtitle->start_display_time) &&
622  (dvdSubtitle->end_display_time < currentFrame->timecode))
623  {
624  expired = true;
625  }
626 
627  // nothing to do
628  if (!expired && (buttonversion == ((uint)m_buttonVersion)))
629  {
631  return;
632  }
633 
634  // clear any buttons
635  if (!numbuttons || !dvdSubtitle || (buttonversion == 0) || expired)
636  {
637  osdLock.lock();
638  if (osd)
639  osd->ClearSubtitles();
640  osdLock.unlock();
641  m_buttonVersion = 0;
643  return;
644  }
645 
646  if (currentFrame->timecode && (dvdSubtitle->start_display_time > currentFrame->timecode))
647  {
649  return;
650  }
651 
652  m_buttonVersion = buttonversion;
653  QRect buttonPos = player_ctx->buffer->DVD()->GetButtonCoords();
654  osdLock.lock();
655  if (osd)
656  osd->DisplayDVDButton(dvdSubtitle, buttonPos);
657  osdLock.unlock();
660 }
661 
662 bool MythDVDPlayer::GoToMenu(QString str)
663 {
664  if (!player_ctx->buffer->IsDVD())
665  return false;
667  bool ret = player_ctx->buffer->DVD()->GoToMenu(str);
668 
669  if (!ret)
670  {
671  SetOSDMessage(tr("DVD Menu Not Available"), kOSDTimeout_Med);
672  LOG(VB_GENERAL, LOG_ERR, "No DVD Menu available.");
673  return false;
674  }
675 
676  return true;
677 }
678 
679 void MythDVDPlayer::GoToDVDProgram(bool direction)
680 {
681  if (!player_ctx->buffer->IsDVD())
682  return;
683  if (direction == 0)
685  else
687 }
688 
690 {
691  return (m_stillFrameLength > 0);
692 }
693 
695 {
696  if (player_ctx->buffer->DVD() && player_ctx->buffer->DVD()->IsOpen())
697  return player_ctx->buffer->DVD()->GetNumAngles();
698  return 0;
699 }
700 
702 {
703  if (player_ctx->buffer->DVD() && player_ctx->buffer->DVD()->IsOpen())
704  return player_ctx->buffer->DVD()->GetCurrentAngle();
705  return -1;
706 }
707 
708 QString MythDVDPlayer::GetAngleName(int angle) const
709 {
710  if (angle >= 1 && angle <= GetNumAngles())
711  {
712  QString name = tr("Angle %1").arg(angle);
713  return name;
714  }
715  return QString();
716 }
717 
719 {
720  uint total = GetNumAngles();
721  if (!total || angle == GetCurrentAngle())
722  return false;
723 
724  if (angle < 1 || angle > (int)total)
725  angle = 1;
726 
727  return player_ctx->buffer->DVD()->SwitchAngle(angle);
728 }
729 
731 {
732  m_stillFrameTimerLock.lock();
734  m_stillFrameTimerLock.unlock();
735 }
736 
738 {
739  if (length != m_stillFrameLength)
740  {
741  m_stillFrameTimerLock.lock();
742  m_stillFrameLength = length;
744  m_stillFrameTimerLock.unlock();
745  }
746 }
747 
749 {
750  if (player_ctx->buffer->IsDVD() &&
752  (m_stillFrameLength > 0) && (m_stillFrameLength < 0xff))
753  {
754  m_stillFrameTimerLock.lock();
755  int elapsedTime = (int)(m_stillFrameTimer.elapsed() * play_speed / 1000);
756  m_stillFrameTimerLock.unlock();
757  if (elapsedTime >= m_stillFrameLength)
758  {
759  LOG(VB_PLAYBACK, LOG_INFO, LOC +
760  QString("Stillframe timeout after %1 seconds (timestretch %2)")
761  .arg(m_stillFrameLength)
762  .arg(play_speed));
764  m_stillFrameLength = 0;
765  }
766  }
767 }
768 
769 void MythDVDPlayer::CreateDecoder(char *testbuf, int testreadsize)
770 {
772  testreadsize))
773  {
775  playerFlags));
776  }
777 }
GLuint buffer
bool normal_speed
Definition: mythplayer.h:792
uint64_t totalFrames
Definition: mythplayer.h:688
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)
typedef void(__LZO_CDECL *lzo_free_func_t)(lzo_callback_p self
int FreeVideoFrames(void)
Returns number of frames available for decoding onto.
Definition: videooutbase.h:174
PlayerFlags
Definition: mythplayer.h:82
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:742
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:768
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:1343
long long totalLength
Definition: mythplayer.h:689
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:413
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:135
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:619
void DisplayLastFrame(void)
bool IsStillFramePending(void) const
void SkipStillFrame(void)
virtual bool VideoLoop(void)
void SetOSDMessage(const QString &msg, OSDTimeout timeout)
long long timecode
Definition: frame.h:43
int GetPart(void) const
virtual void ResetPlaying(bool resetframes=true)
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:83
float play_speed
Definition: mythplayer.h:791
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:684
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:65
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:810
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:669
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:762
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:788
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:720
bool allpaused
Definition: mythplayer.h:650
virtual uint GetTrackCount(uint type) const
Definition: decoderbase.h:239
virtual bool IsInStillFrame(void) const
void UnpauseVideo(void)
Definition: mythplayer.cpp:421
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:124
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:176
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)
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:221
virtual int GetCurrentChapter(void)
int m_initial_subtitle_track
FilterChain * videoFilters
Definition: mythplayer.h:773
void SetBuffering(bool new_buffering)
virtual int SetTrack(uint type, int trackNo)
PlayerFlags playerFlags
Definition: mythplayer.h:617
virtual bool DecoderGetFrameREW(void)
void SetTitle(const QString &t)
Definition: programinfo.h:486
bool needNewPauseFrame
Definition: mythplayer.h:644
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
typedef int
Definition: lzoconf.h:279
virtual void InitialSeek(void)
virtual void GetChapterTimes(QList< long long > &times)
VideoOutput * videoOutput
Definition: mythplayer.h:620
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:171
virtual void DecoderPauseCheck(void)
OSD * osd
Definition: mythplayer.h:754
PlayerContext * player_ctx
Definition: mythplayer.h:621
virtual int GetNumAngles(void) const
uint64_t bookmarkseek
Definition: mythplayer.h:672
void DisplayDVDButton(void)
bool videoPaused
Definition: mythplayer.h:649
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:342
DecoderBase * decoder
Definition: mythplayer.h:618
virtual bool HasReachedEof(void) const
void DisplayDVDButton(AVSubtitle *dvdButton, QRect &pos)
Definition: osd.cpp:1353
bool decodeOneFrame
Definition: mythplayer.h:643
bool GetDVDStateSnapshot(QString &state)
Get a snapshot of the current DVD VM state.
QMutex osdLock
Definition: mythplayer.h:756
virtual void IgnoreWaitStates(bool ignore)
void ReleaseMenuButton(void)