MythTV  0.28pre
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;
24  SetScanType(kScan_Interlaced);
25 }
26 
28  int64_t timecode, bool wrap)
29 {
30  MythPlayer::ReleaseNextVideoFrame(buffer, timecode,
31  !player_ctx->buffer->IsInDiscMenuOrStillFrame());
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())
47  player_ctx->buffer->DVD()->SetTrack(kTrackTypeSubtitle, -1);
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  {
58  StreamInfo stream = decoder->GetTrackInfo(kTrackTypeSubtitle,
59  track);
60  player_ctx->buffer->DVD()->SetTrack(kTrackTypeSubtitle,
61  stream.stream_id);
62  }
63  }
64  MythPlayer::EnableCaptions(mode, osd_msg);
65 }
66 
68 {
69  if (player_ctx->buffer->IsDVD() &&
70  player_ctx->buffer->DVD()->IsInStillFrame())
71  {
72  SetScanType(kScan_Progressive);
73  }
74  DisplayDVDButton();
76 }
77 
79 {
80  StillFrameCheck();
82 }
83 
85 {
87 }
88 
90 {
92  if (decoder_change_lock.tryLock(1))
93  {
94  if (decoder)
95  decoder->UpdateFramesPlayed();
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 {
110  DisplayDVDButton();
111 }
112 
114 {
115  if (!m_initial_dvdstate.isEmpty())
116  player_ctx->buffer->DVD()->RestoreDVDStateSnapshot(m_initial_dvdstate);
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 &&
143  (!videoOutput->EnoughFreeFrames() ||
144  player_ctx->buffer->DVD()->IsWaiting() ||
145  player_ctx->buffer->DVD()->IsInStillFrame());
146  if (release_all || release_one)
147  {
148  if (nbframes < 5 && videoOutput)
149  videoOutput->UpdatePauseFrame(disp_timecode);
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
164  if (player_ctx->buffer->DVD()->DVDWaitingForPlayer())
165  {
166  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Clearing MythTV DVD wait state");
167  player_ctx->buffer->DVD()->SkipDVDWaitingForPlayer();
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
188  if (player_ctx->buffer->DVD()->IsStillFramePending())
189  {
190  // ensure we refresh the pause frame
191  if (!dvd_stillframe_showing)
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 
234  SetScanType(kScan_Progressive);
235  DisplayDVDButton();
236 
237  AVSync(NULL, true);
238 }
239 
240 bool MythDVDPlayer::FastForward(float seconds)
241 {
242  if (decoder)
243  decoder->UpdateFramesPlayed();
244  return MythPlayer::FastForward(seconds);
245 }
246 
247 bool MythDVDPlayer::Rewind(float seconds)
248 {
249  if (decoder)
250  decoder->UpdateFramesPlayed();
251  return MythPlayer::Rewind(seconds);
252 }
253 
254 bool MythDVDPlayer::JumpToFrame(uint64_t frame)
255 {
256  if (frame == ~0x0ULL)
257  return false;
258 
259  if (decoder)
260  decoder->UpdateFramesPlayed();
261  return MythPlayer::JumpToFrame(frame);
262 }
263 
265 {
266  if (player_ctx->buffer->DVD())
267  player_ctx->buffer->DVD()->SetParent(this);
268 
269  player_ctx->LockPlayingInfo(__FILE__, __LINE__);
270  if (player_ctx->playingInfo)
271  {
272  QString name;
273  QString serialid;
274  if (player_ctx->playingInfo->GetTitle().isEmpty() &&
275  player_ctx->buffer->DVD() &&
276  player_ctx->buffer->DVD()->GetNameAndSerialNum(name, serialid))
277  {
278  player_ctx->playingInfo->SetTitle(name);
279  }
280  }
281  player_ctx->UnlockPlayingInfo(__FILE__, __LINE__);
282 
284 }
285 
287 {
288  player_ctx->buffer->IgnoreWaitStates(true);
289 
290  if (m_initial_title > -1)
291  player_ctx->buffer->DVD()->PlayTitleAndPart(m_initial_title, 1);
292 
293  if (m_initial_audio_track > -1)
294  player_ctx->buffer->DVD()->SetTrack(kTrackTypeAudio,
295  m_initial_audio_track);
296  if (m_initial_subtitle_track > -1)
297  player_ctx->buffer->DVD()->SetTrack(kTrackTypeSubtitle,
298  m_initial_subtitle_track);
299 
300  if (bookmarkseek > 30)
301  {
302  // we need to trigger a dvd cell change to ensure the new title length
303  // is set and the position map updated accordingly
304  decodeOneFrame = true;
305  int count = 0;
306  while (count++ < 100 && decodeOneFrame)
307  usleep(50000);
308  }
310  player_ctx->buffer->IgnoreWaitStates(false);
311 }
312 
313 void MythDVDPlayer::ResetPlaying(bool resetframes)
314 {
316 }
317 
319 {
320  if (player_ctx->buffer->DVD())
321  player_ctx->buffer->DVD()->SetParent(NULL);
322 }
323 
324 bool MythDVDPlayer::PrepareAudioSample(int64_t &timecode)
325 {
326  if (!player_ctx->buffer->IsInDiscMenuOrStillFrame())
327  WrapTimecode(timecode, TC_AUDIO);
328 
329  if (player_ctx->buffer->IsDVD() &&
330  player_ctx->buffer->DVD()->IsInStillFrame())
331  return true;
332  return false;
333 }
334 
336 {
337  if (!player_ctx->buffer->IsDVD())
338  return;
339 
340  QStringList fields;
341  QString name;
342  QString serialid;
343  QString dvdstate;
344 
345  if (!player_ctx->buffer->IsInMenu() &&
346  (player_ctx->buffer->IsBookmarkAllowed() || clear))
347  {
348  if (!player_ctx->buffer->DVD()->GetNameAndSerialNum(name, serialid))
349  {
350  LOG(VB_GENERAL, LOG_ERR, LOC +
351  "DVD has no name and serial number. Cannot set bookmark.");
352  return;
353  }
354 
355  if (!clear && !player_ctx->buffer->DVD()->GetDVDStateSnapshot(dvdstate))
356  {
357  LOG(VB_GENERAL, LOG_ERR, LOC +
358  "Unable to retrieve DVD state. Cannot set bookmark.");
359  return;
360  }
361 
362  player_ctx->LockPlayingInfo(__FILE__, __LINE__);
363  if (player_ctx->playingInfo)
364  {
365  fields += serialid;
366  fields += name;
367 
368  if (!clear)
369  {
370  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Set bookmark");
371  fields += dvdstate;
372  }
373  else
374  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Clear bookmark");
375 
376  player_ctx->playingInfo->SaveDVDBookmark(fields);
377 
378  }
379  player_ctx->UnlockPlayingInfo(__FILE__, __LINE__);
380  }
381 }
382 
384 {
385  if (gCoreContext->IsDatabaseIgnored() || !player_ctx->buffer->IsDVD())
386  return 0;
387 
388  QStringList dvdbookmark = QStringList();
389  QString name;
390  QString serialid;
391  uint64_t frames = 0;
392  player_ctx->LockPlayingInfo(__FILE__, __LINE__);
393  if (player_ctx->playingInfo)
394  {
395  if (!player_ctx->buffer->DVD()->GetNameAndSerialNum(name, serialid))
396  {
397  player_ctx->UnlockPlayingInfo(__FILE__, __LINE__);
398  return 0;
399  }
400 
401  dvdbookmark = player_ctx->playingInfo->QueryDVDBookmark(serialid);
402 
403  if (!dvdbookmark.empty())
404  {
405  QStringList::Iterator it = dvdbookmark.begin();
406 
407  if (dvdbookmark.count() == 1)
408  {
409  m_initial_dvdstate = *it;
410  frames = ~0x0ULL;
411  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Get Bookmark: bookmark found");
412  }
413  else
414  {
415  // Legacy bookmarks
416  m_initial_title = (*it).toInt();
417  frames = (uint64_t)((*++it).toLongLong() & 0xffffffffLL);
418  m_initial_audio_track = (*++it).toInt();
419  m_initial_subtitle_track = (*++it).toInt();
420  LOG(VB_PLAYBACK, LOG_INFO, LOC +
421  QString("Get Bookmark: title %1 audiotrack %2 subtrack %3 "
422  "frame %4")
423  .arg(m_initial_title).arg(m_initial_audio_track)
424  .arg(m_initial_subtitle_track).arg(frames));
425  }
426  }
427  }
428  player_ctx->UnlockPlayingInfo(__FILE__, __LINE__);
429  return frames;;
430 }
431 
433 {
434  if (m_stillFrameLength > 0)
435  {
436  m_stillFrameTimerLock.lock();
437  // Get the timestretched elapsed time and transform
438  // it to what the unstretched value would have been
439  // had we been playing with the new timestretch value
440  // all along
441  int elapsed = (int)(m_stillFrameTimer.elapsed() * play_speed / next_play_speed);
442  m_stillFrameTimer.restart();
443  m_stillFrameTimer.addMSecs(elapsed);
444  m_stillFrameTimerLock.unlock();
445  }
446 
448 
449  if (decoder)
450  decoder->UpdateFramesPlayed();
451  if (player_ctx->buffer->IsDVD())
452  {
453  if (play_speed > 1.0f)
454  player_ctx->buffer->DVD()->SetDVDSpeed(-1);
455  else
456  player_ctx->buffer->DVD()->SetDVDSpeed();
457  }
458 }
459 
460 void MythDVDPlayer::AVSync(VideoFrame *frame, bool limit_delay)
461 {
462  MythPlayer::AVSync(frame, true);
463 }
464 
465 long long MythDVDPlayer::CalcMaxFFTime(long long ff, bool setjump) const
466 {
467  if ((totalFrames > 0) && player_ctx->buffer->IsDVD() &&
468  player_ctx->buffer->DVD()->TitleTimeLeft() < 5)
469  return 0;
470  return MythPlayer::CalcMaxFFTime(ff, setjump);
471 }
472 
473 int64_t MythDVDPlayer::GetSecondsPlayed(bool, int divisor) const
474 {
475  if (!player_ctx->buffer->IsDVD())
476  return 0;
477 
478  int64_t played = player_ctx->buffer->DVD()->GetCurrentTime();
479 
480  if (m_stillFrameLength > 0)
481  {
482  if (m_stillFrameLength == 255)
483  played = -1;
484  else
485  played = m_stillFrameTimer.elapsed() * play_speed / divisor;
486  }
487 
488  return played;
489 }
490 
491 int64_t MythDVDPlayer::GetTotalSeconds(bool /*honorCutList*/, int divisor) const
492 {
493  int64_t total = totalLength;
494 
495  if (m_stillFrameLength > 0)
496  {
497  if (m_stillFrameLength == 255)
498  return -1;
499  else
500  total = m_stillFrameLength;
501  }
502 
503  return total * 1000 / divisor;
504 }
505 
506 void MythDVDPlayer::SeekForScreenGrab(uint64_t &number, uint64_t frameNum,
507  bool absolute)
508 {
509  if (!player_ctx->buffer->IsDVD())
510  return;
511  if (GoToMenu("menu"))
512  {
513  if (player_ctx->buffer->DVD()->IsInMenu() &&
514  !player_ctx->buffer->DVD()->IsInStillFrame())
515  {
516  GoToDVDProgram(1);
517  }
518  }
519  else if (player_ctx->buffer->DVD()->GetTotalTimeOfTitle() < 60)
520  {
521  GoToDVDProgram(1);
522  number = frameNum;
523  if (number >= totalFrames)
524  number = totalFrames / 2;
525  }
526 }
527 
529 {
530  if (kTrackTypeAudio == type)
531  {
532  StreamInfo stream = decoder->GetTrackInfo(type, trackNo);
533  player_ctx->buffer->DVD()->SetTrack(type, stream.stream_id);
534  }
535 
536  return MythPlayer::SetTrack(type, trackNo);
537 }
538 
540 {
541  if (!player_ctx->buffer->IsDVD())
542  return 0;
543  return player_ctx->buffer->DVD()->NumPartsInTitle();
544 }
545 
547 {
548  if (!player_ctx->buffer->IsDVD())
549  return 0;
550  return player_ctx->buffer->DVD()->GetPart();
551 }
552 
553 void MythDVDPlayer::GetChapterTimes(QList<long long> &times)
554 {
555  if (!player_ctx->buffer->IsDVD())
556  return;
557  player_ctx->buffer->DVD()->GetChapterTimes(times);
558 }
559 
561 {
562  if (!player_ctx->buffer->IsDVD())
563  return false;
564 
565  int total = GetNumChapters();
566  int current = GetCurrentChapter();
567 
568  if (chapter < 0 || chapter > total)
569  {
570  if (chapter < 0)
571  {
572  chapter = current -1;
573  if (chapter < 0) chapter = 0;
574  }
575  else if (chapter > total)
576  {
577  chapter = current + 1;
578  if (chapter > total) chapter = total;
579  }
580  }
581 
582  bool success = player_ctx->buffer->DVD()->playTrack(chapter);
583  if (success)
584  {
585  if (decoder)
586  {
587  decoder->UpdateFramesPlayed();
588  if (player_ctx->buffer->DVD()->GetCellStart() == 0)
589  decoder->SeekReset(framesPlayed, 0, true, true);
590  }
591  ClearAfterSeek(!player_ctx->buffer->IsInDiscMenuOrStillFrame());
592  }
593 
594  jumpchapter = 0;
595  return success;
596 }
597 
599 {
600  if (!osd || !player_ctx->buffer->IsDVD())
601  return;
602 
603  uint buttonversion = 0;
604  AVSubtitle *dvdSubtitle = player_ctx->buffer->DVD()->GetMenuSubtitle(buttonversion);
605  bool numbuttons = player_ctx->buffer->DVD()->NumMenuButtons();
606 
607  bool expired = false;
608 
609  VideoFrame *currentFrame = videoOutput ? videoOutput->GetLastShownFrame() : NULL;
610 
611  if (!currentFrame)
612  {
613  player_ctx->buffer->DVD()->ReleaseMenuButton();
614  return;
615  }
616 
617  if (dvdSubtitle &&
618  (dvdSubtitle->end_display_time > dvdSubtitle->start_display_time) &&
619  (dvdSubtitle->end_display_time < currentFrame->timecode))
620  {
621  expired = true;
622  }
623 
624  // nothing to do
625  if (!expired && (buttonversion == ((uint)m_buttonVersion)))
626  {
627  player_ctx->buffer->DVD()->ReleaseMenuButton();
628  return;
629  }
630 
631  // clear any buttons
632  if (!numbuttons || !dvdSubtitle || (buttonversion == 0) || expired)
633  {
634  osdLock.lock();
635  if (osd)
636  osd->ClearSubtitles();
637  osdLock.unlock();
638  m_buttonVersion = 0;
639  player_ctx->buffer->DVD()->ReleaseMenuButton();
640  return;
641  }
642 
643  if (currentFrame->timecode && (dvdSubtitle->start_display_time > currentFrame->timecode))
644  {
645  player_ctx->buffer->DVD()->ReleaseMenuButton();
646  return;
647  }
648 
649  m_buttonVersion = buttonversion;
650  QRect buttonPos = player_ctx->buffer->DVD()->GetButtonCoords();
651  osdLock.lock();
652  if (osd)
653  osd->DisplayDVDButton(dvdSubtitle, buttonPos);
654  osdLock.unlock();
655  textDisplayMode = kDisplayDVDButton;
656  player_ctx->buffer->DVD()->ReleaseMenuButton();
657 }
658 
659 bool MythDVDPlayer::GoToMenu(QString str)
660 {
661  if (!player_ctx->buffer->IsDVD())
662  return false;
663  textDisplayMode = kDisplayNone;
664  bool ret = player_ctx->buffer->DVD()->GoToMenu(str);
665 
666  if (!ret)
667  {
668  SetOSDMessage(tr("DVD Menu Not Available"), kOSDTimeout_Med);
669  LOG(VB_GENERAL, LOG_ERR, "No DVD Menu available.");
670  return false;
671  }
672 
673  return true;
674 }
675 
676 void MythDVDPlayer::GoToDVDProgram(bool direction)
677 {
678  if (!player_ctx->buffer->IsDVD())
679  return;
680  if (direction == 0)
681  player_ctx->buffer->DVD()->GoToPreviousProgram();
682  else
683  player_ctx->buffer->DVD()->GoToNextProgram();
684 }
685 
687 {
688  return (m_stillFrameLength > 0);
689 }
690 
692 {
693  if (player_ctx->buffer->DVD() && player_ctx->buffer->DVD()->IsOpen())
694  return player_ctx->buffer->DVD()->GetNumAngles();
695  return 0;
696 }
697 
699 {
700  if (player_ctx->buffer->DVD() && player_ctx->buffer->DVD()->IsOpen())
701  return player_ctx->buffer->DVD()->GetCurrentAngle();
702  return -1;
703 }
704 
705 QString MythDVDPlayer::GetAngleName(int angle) const
706 {
707  if (angle >= 1 && angle <= GetNumAngles())
708  {
709  QString name = tr("Angle %1").arg(angle);
710  return name;
711  }
712  return QString();
713 }
714 
716 {
717  uint total = GetNumAngles();
718  if (!total || angle == GetCurrentAngle())
719  return false;
720 
721  if (angle < 1 || angle > (int)total)
722  angle = 1;
723 
724  return player_ctx->buffer->DVD()->SwitchAngle(angle);
725 }
726 
728 {
729  m_stillFrameTimerLock.lock();
730  m_stillFrameTimer.restart();
731  m_stillFrameTimerLock.unlock();
732 }
733 
735 {
736  if (length != m_stillFrameLength)
737  {
738  m_stillFrameTimerLock.lock();
739  m_stillFrameLength = length;
740  m_stillFrameTimer.restart();
741  m_stillFrameTimerLock.unlock();
742  }
743 }
744 
746 {
747  if (player_ctx->buffer->IsDVD() &&
748  player_ctx->buffer->DVD()->IsInStillFrame() &&
749  (m_stillFrameLength > 0) && (m_stillFrameLength < 0xff))
750  {
751  m_stillFrameTimerLock.lock();
752  int elapsedTime = (int)(m_stillFrameTimer.elapsed() * play_speed / 1000);
753  m_stillFrameTimerLock.unlock();
754  if (elapsedTime >= m_stillFrameLength)
755  {
756  LOG(VB_PLAYBACK, LOG_INFO, LOC +
757  QString("Stillframe timeout after %1 seconds (timestretch %2)")
758  .arg(m_stillFrameLength)
759  .arg(play_speed));
760  player_ctx->buffer->DVD()->SkipStillFrame();
761  m_stillFrameLength = 0;
762  }
763  }
764 }
765 
766 void MythDVDPlayer::CreateDecoder(char *testbuf, int testreadsize)
767 {
768  if (AvFormatDecoderDVD::CanHandle(testbuf, player_ctx->buffer->GetFilename(),
769  testreadsize))
770  {
771  SetDecoder(new AvFormatDecoderDVD(this, *player_ctx->playingInfo,
772  playerFlags));
773  }
774 }
virtual bool DoJumpChapter(int chapter)
virtual bool DecoderGetFrameFFREW(void)
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:83
PlayerFlags
Definition: mythplayer.h:88
virtual void EventStart(void)
virtual bool VideoLoop(void)
virtual void DisplayPauseFrame(void)
virtual void DecoderPauseCheck(void)
virtual bool JumpToFrame(uint64_t frame)
virtual bool IsInStillFrame() const
virtual int GetCurrentAngle(void) const
virtual bool FastForward(float seconds)
virtual void CreateDecoder(char *testbuf, int testreadsize)
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 QString GetAngleName(int angle) const
unsigned int uint
Definition: compat.h:136
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
void DisplayLastFrame(void)
virtual bool VideoLoop(void)
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque
bool IsDatabaseIgnored(void) const
/brief Returns true if database is being ignored.
long long timecode
Definition: mythframe.h:44
virtual void ResetPlaying(bool resetframes=true)
virtual bool FastForward(float seconds)
virtual bool PrepareAudioSample(int64_t &timecode)
__u32 type
Definition: videodev2.h:1038
virtual bool Rewind(float seconds)
virtual int GetNumAngles(void) const
virtual void GoToDVDProgram(bool direction)
EofState
Definition: decoderbase.h:66
virtual void AutoDeint(VideoFrame *frame, bool allow_lock=true)
virtual bool JumpToFrame(uint64_t frame)
virtual int GetNumChapters(void)
virtual void InitialSeek(void)
virtual void ChangeSpeed(void)
virtual uint64_t GetBookmark(void)
virtual void EventStart(void)
const char * name
Definition: ParseText.cpp:338
virtual void AVSync(VideoFrame *buffer, bool limit_delay=false)
static void clear(SettingsMap &cache, SettingsMap &overrides, const QString &myKey)
Definition: mythdb.cpp:816
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.
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)
virtual void VideoStart(void)
__u32 flags
Definition: videodev2.h:1053
virtual void SeekForScreenGrab(uint64_t &number, uint64_t frameNum, bool absolute)
virtual bool DecoderGetFrameFFREW(void)
virtual bool Rewind(float seconds)
virtual long long CalcMaxFFTime(long long ff, bool setjump=true) const
CalcMaxFFTime(ffframes): forward ffframes forward.
virtual void ResetPlaying(bool resetframes=true)
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 ResetStillFrameTimer(void)
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.
virtual void EnableCaptions(uint mode, bool osd_msg=true)
virtual bool PrebufferEnoughFrames(int min_buffers=0)
virtual bool HasReachedEof(void) const
void StillFrameCheck(void)
virtual void ChangeSpeed(void)
virtual int GetCurrentChapter(void)
virtual int64_t GetSecondsPlayed(bool honorCutList, int divisor=1000) const
virtual int SetTrack(uint type, int trackNo)
virtual bool DecoderGetFrameREW(void)
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
virtual void InitialSeek(void)
virtual void GetChapterTimes(QList< long long > &times)
static void usleep(unsigned long time)
Definition: mthread.cpp:345
virtual bool DecoderGetFrameREW(void)
virtual void EventEnd(void)
virtual void DecoderPauseCheck(void)
void DisplayDVDButton(void)
virtual int64_t GetTotalSeconds(bool honorCutList, int divisor=1000) const
virtual long long CalcMaxFFTime(long long ff, bool setjump=true) const
CalcMaxFFTime(ffframes): forward ffframes forward.
virtual void AVSync(VideoFrame *buffer, bool limit_delay=false)
virtual int SetTrack(uint type, int trackNo)
void SetStillFrameTimeout(int length)
virtual void DisplayPauseFrame(void)