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;
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)
458  if (player_ctx->buffer->IsDVD())
459  {
460  if (play_speed > 1.0f)
461  player_ctx->buffer->DVD()->SetDVDSpeed(-1);
462  else
464  }
465 }
466 
467 void MythDVDPlayer::AVSync(VideoFrame *frame, bool limit_delay)
468 {
469  MythPlayer::AVSync(frame, true);
470 }
471 
472 long long MythDVDPlayer::CalcMaxFFTime(long long ff, bool setjump) const
473 {
474  if ((totalFrames > 0) && player_ctx->buffer->IsDVD() &&
475  player_ctx->buffer->DVD()->TitleTimeLeft() < 5)
476  return 0;
477  return MythPlayer::CalcMaxFFTime(ff, setjump);
478 }
479 
480 int64_t MythDVDPlayer::GetSecondsPlayed(bool, int divisor) const
481 {
482  if (!player_ctx->buffer->IsDVD())
483  return 0;
484 
485  int64_t played = player_ctx->buffer->DVD()->GetCurrentTime();
486 
487  if (m_stillFrameLength > 0)
488  {
489  if (m_stillFrameLength == 255)
490  played = -1;
491  else
492  played = m_stillFrameTimer.elapsed() * play_speed / divisor;
493  }
494 
495  return played;
496 }
497 
498 int64_t MythDVDPlayer::GetTotalSeconds(bool /*honorCutList*/, int divisor) const
499 {
500  int64_t total = totalLength;
501 
502  if (m_stillFrameLength > 0)
503  {
504  if (m_stillFrameLength == 255)
505  return -1;
506  else
507  total = m_stillFrameLength;
508  }
509 
510  return total * 1000 / divisor;
511 }
512 
513 void MythDVDPlayer::SeekForScreenGrab(uint64_t &number, uint64_t frameNum,
514  bool absolute)
515 {
516  if (!player_ctx->buffer->IsDVD())
517  return;
518  if (GoToMenu("menu"))
519  {
520  if (player_ctx->buffer->DVD()->IsInMenu() &&
522  {
523  GoToDVDProgram(1);
524  }
525  }
526  else if (player_ctx->buffer->DVD()->GetTotalTimeOfTitle() < 60)
527  {
528  GoToDVDProgram(1);
529  number = frameNum;
530  if (number >= totalFrames)
531  number = totalFrames / 2;
532  }
533 }
534 
536 {
537  if (kTrackTypeAudio == type)
538  {
539  StreamInfo stream = decoder->GetTrackInfo(type, trackNo);
540  player_ctx->buffer->DVD()->SetTrack(type, stream.stream_id);
541  }
542 
543  return MythPlayer::SetTrack(type, trackNo);
544 }
545 
547 {
548  if (!player_ctx->buffer->IsDVD())
549  return 0;
550  return player_ctx->buffer->DVD()->NumPartsInTitle();
551 }
552 
554 {
555  if (!player_ctx->buffer->IsDVD())
556  return 0;
557  return player_ctx->buffer->DVD()->GetPart();
558 }
559 
560 void MythDVDPlayer::GetChapterTimes(QList<long long> &times)
561 {
562  if (!player_ctx->buffer->IsDVD())
563  return;
564  player_ctx->buffer->DVD()->GetChapterTimes(times);
565 }
566 
568 {
569  if (!player_ctx->buffer->IsDVD())
570  return false;
571 
572  int total = GetNumChapters();
573  int current = GetCurrentChapter();
574 
575  if (chapter < 0 || chapter > total)
576  {
577  if (chapter < 0)
578  {
579  chapter = current -1;
580  if (chapter < 0) chapter = 0;
581  }
582  else if (chapter > total)
583  {
584  chapter = current + 1;
585  if (chapter > total) chapter = total;
586  }
587  }
588 
589  bool success = player_ctx->buffer->DVD()->playTrack(chapter);
590  if (success)
591  {
592  if (decoder)
593  {
595  if (player_ctx->buffer->DVD()->GetCellStart() == 0)
596  decoder->SeekReset(framesPlayed, 0, true, true);
597  }
599  }
600 
601  jumpchapter = 0;
602  return success;
603 }
604 
606 {
607  if (!osd || !player_ctx->buffer->IsDVD())
608  return;
609 
610  uint buttonversion = 0;
611  AVSubtitle *dvdSubtitle = player_ctx->buffer->DVD()->GetMenuSubtitle(buttonversion);
612  bool numbuttons = player_ctx->buffer->DVD()->NumMenuButtons();
613 
614  bool expired = false;
615 
616  VideoFrame *currentFrame = videoOutput ? videoOutput->GetLastShownFrame() : NULL;
617 
618  if (!currentFrame)
619  {
621  return;
622  }
623 
624  if (dvdSubtitle &&
625  (dvdSubtitle->end_display_time > dvdSubtitle->start_display_time) &&
626  (dvdSubtitle->end_display_time < currentFrame->timecode))
627  {
628  expired = true;
629  }
630 
631  // nothing to do
632  if (!expired && (buttonversion == ((uint)m_buttonVersion)))
633  {
635  return;
636  }
637 
638  // clear any buttons
639  if (!numbuttons || !dvdSubtitle || (buttonversion == 0) || expired)
640  {
641  osdLock.lock();
642  if (osd)
643  osd->ClearSubtitles();
644  osdLock.unlock();
645  m_buttonVersion = 0;
647  return;
648  }
649 
650  if (currentFrame->timecode && (dvdSubtitle->start_display_time > currentFrame->timecode))
651  {
653  return;
654  }
655 
656  m_buttonVersion = buttonversion;
657  QRect buttonPos = player_ctx->buffer->DVD()->GetButtonCoords();
658  osdLock.lock();
659  if (osd)
660  osd->DisplayDVDButton(dvdSubtitle, buttonPos);
661  osdLock.unlock();
664 }
665 
666 bool MythDVDPlayer::GoToMenu(QString str)
667 {
668  if (!player_ctx->buffer->IsDVD())
669  return false;
671  bool ret = player_ctx->buffer->DVD()->GoToMenu(str);
672 
673  if (!ret)
674  {
675  SetOSDMessage(tr("DVD Menu Not Available"), kOSDTimeout_Med);
676  LOG(VB_GENERAL, LOG_ERR, "No DVD Menu available.");
677  return false;
678  }
679 
680  return true;
681 }
682 
683 void MythDVDPlayer::GoToDVDProgram(bool direction)
684 {
685  if (!player_ctx->buffer->IsDVD())
686  return;
687  if (direction == 0)
689  else
691 }
692 
694 {
695  return (m_stillFrameLength > 0);
696 }
697 
699 {
700  if (player_ctx->buffer->DVD() && player_ctx->buffer->DVD()->IsOpen())
701  return player_ctx->buffer->DVD()->GetNumAngles();
702  return 0;
703 }
704 
706 {
707  if (player_ctx->buffer->DVD() && player_ctx->buffer->DVD()->IsOpen())
708  return player_ctx->buffer->DVD()->GetCurrentAngle();
709  return -1;
710 }
711 
712 QString MythDVDPlayer::GetAngleName(int angle) const
713 {
714  if (angle >= 1 && angle <= GetNumAngles())
715  {
716  QString name = tr("Angle %1").arg(angle);
717  return name;
718  }
719  return QString();
720 }
721 
723 {
724  uint total = GetNumAngles();
725  if (!total || angle == GetCurrentAngle())
726  return false;
727 
728  if (angle < 1 || angle > (int)total)
729  angle = 1;
730 
731  return player_ctx->buffer->DVD()->SwitchAngle(angle);
732 }
733 
735 {
736  m_stillFrameTimerLock.lock();
738  m_stillFrameTimerLock.unlock();
739 }
740 
742 {
743  if (length != m_stillFrameLength)
744  {
745  m_stillFrameTimerLock.lock();
746  m_stillFrameLength = length;
748  m_stillFrameTimerLock.unlock();
749  }
750 }
751 
753 {
754  if (player_ctx->buffer->IsDVD() &&
756  (m_stillFrameLength > 0) && (m_stillFrameLength < 0xff))
757  {
758  m_stillFrameTimerLock.lock();
759  int elapsedTime = (int)(m_stillFrameTimer.elapsed() * play_speed / 1000);
760  m_stillFrameTimerLock.unlock();
761  if (elapsedTime >= m_stillFrameLength)
762  {
763  LOG(VB_PLAYBACK, LOG_INFO, LOC +
764  QString("Stillframe timeout after %1 seconds (timestretch %2)")
765  .arg(m_stillFrameLength)
766  .arg(play_speed));
768  m_stillFrameLength = 0;
769  }
770  }
771 }
772 
773 void MythDVDPlayer::CreateDecoder(char *testbuf, int testreadsize)
774 {
776  testreadsize))
777  {
779  playerFlags));
780  }
781 }
GLuint buffer
uint64_t totalFrames
Definition: mythplayer.h:702
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:88
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:744
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:785
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:1380
long long totalLength
Definition: mythplayer.h:703
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:409
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.
QMutex decoder_change_lock
Definition: mythplayer.h:630
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:808
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:698
virtual bool IsInStillFrame() const
int GetCurrentAngle(void) const
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)
const char * name
Definition: ParseText.cpp:338
int64_t disp_timecode
Definition: mythplayer.h:827
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:683
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:779
__u32 flags
Definition: videodev2.h:1053
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
void SetParent(MythDVDPlayer *p)
virtual bool DecoderGetFrameFFREW(void)
virtual void DisplayNormalFrame(bool check_prebuffer=true)
float next_play_speed
Definition: mythplayer.h:805
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:735
bool allpaused
Definition: mythplayer.h:664
virtual uint GetTrackCount(uint type) const
Definition: decoderbase.h:243
virtual bool IsInStillFrame(void) const
void UnpauseVideo(void)
Definition: mythplayer.cpp:417
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:790
void SetBuffering(bool new_buffering)
virtual int SetTrack(uint type, int trackNo)
PlayerFlags playerFlags
Definition: mythplayer.h:628
virtual bool DecoderGetFrameREW(void)
void SetTitle(const QString &t)
Definition: programinfo.h:484
GLint GLenum GLsizei GLint GLenum GLenum type
bool needNewPauseFrame
Definition: mythplayer.h:658
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:631
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:770
PlayerContext * player_ctx
Definition: mythplayer.h:632
virtual int GetNumAngles(void) const
uint64_t bookmarkseek
Definition: mythplayer.h:686
void DisplayDVDButton(void)
bool videoPaused
Definition: mythplayer.h:663
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:341
DecoderBase * decoder
Definition: mythplayer.h:629
virtual bool HasReachedEof(void) const
void DisplayDVDButton(AVSubtitle *dvdButton, QRect &pos)
Definition: osd.cpp:1390
bool decodeOneFrame
Definition: mythplayer.h:657
bool GetDVDStateSnapshot(QString &state)
Get a snapshot of the current DVD VM state.
QMutex osdLock
Definition: mythplayer.h:772
virtual void IgnoreWaitStates(bool ignore)
void ReleaseMenuButton(void)