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