MythTV  master
mythplayerui.cpp
Go to the documentation of this file.
1 #include <algorithm>
2 
3 // MythTV
6 
9 #include "livetvchain.h"
10 #include "mheg/interactivescreen.h"
11 #include "mheg/interactivetv.h"
12 #include "mythplayerui.h"
13 #include "mythsystemevent.h"
14 #include "osd.h"
15 #include "tv_play.h"
16 
17 #define LOC QString("PlayerUI: ")
18 
20  PlayerContext *Context, PlayerFlags Flags)
21  : MythPlayerEditorUI(MainWindow, Tv, Context, Flags),
23 {
24  // Finish setting up the overlays
25  m_osd.SetPlayer(this);
27 
28  // User feedback during slow seeks
29  connect(this, &MythPlayerUI::SeekingSlow, [&](int Count)
30  {
31  UpdateOSDMessage(tr("Searching") + QString().fill('.', Count % 3), kOSDTimeout_Short);
33  });
34 
35  // Seeking has finished
36  connect(this, &MythPlayerUI::SeekingComplete, [&]()
37  {
38  m_osdLock.lock();
40  m_osdLock.unlock();
41  });
42 
43  // Setup OSD debug
44  m_osdDebugTimer.setInterval(1s);
47 
48  // Other connections
52 
53  // Setup refresh interval.
56 }
57 
59 {
60  LOG(VB_GENERAL, LOG_INFO, LOC + "Initialising player state");
62 }
63 
65 {
66  if (OpenFile() < 0)
67  {
68  LOG(VB_GENERAL, LOG_ERR, LOC + "Unable to open video file.");
69  return false;
70  }
71 
72  m_framesPlayed = 0;
73  m_rewindTime = m_ffTime = 0;
75  m_jumpChapter = 0;
78 
79  if (!InitVideo())
80  {
81  LOG(VB_GENERAL, LOG_ERR, LOC + "Unable to initialize video.");
83  return false;
84  }
85 
86  EventStart();
87  DecoderStart(true);
88  InitialSeek();
89  VideoStart();
90 
91  m_playerThread->setPriority(QThread::TimeCriticalPriority);
92 #ifdef Q_OS_ANDROID
93  setpriority(PRIO_PROCESS, m_playerThreadId, -20);
94 #endif
97  return !IsErrored();
98 }
99 
101 {
102  // TODO handle initial commskip and/or cutlist skip as well
103  if (m_bookmarkSeek > 30)
105 }
106 
108 {
109  // Handle decoder callbacks
111 
112  // Live TV program change
113  if (m_fileChanged)
114  FileChanged();
115 
116  // Check if visualiser is wanted on first start and after video change
118  AutoVisualise(!m_videoDim.isEmpty());
119 
120  // recreate the osd if a reinit was triggered by another thread
121  if (m_reinitOsd)
122  ReinitOSD();
123 
124  // enable/disable forced subtitles if signalled by the decoder
129 
130  // reset the scan (and hence deinterlacers) if triggered by the decoder
132 
133  // refresh the position map for an in-progress recording while editing
135  {
136  if (m_editUpdateTimer.hasExpired(2000))
137  {
138  // N.B. the positionmap update and osd refresh are asynchronous
139  m_forcePositionMapSync = true;
140  m_osdLock.lock();
142  m_osdLock.unlock();
143  m_editUpdateTimer.start();
144  }
145  }
146 
147  // Refresh the programinfo in use status
148  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
151  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
152 
153  // Disable timestretch if we are too close to the end of the buffer
154  if (m_ffrewSkip == 1 && (m_playSpeed > 1.0F) && IsNearEnd())
155  {
156  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Near end, Slowing down playback.");
157  Play(1.0F, true, true);
158  }
159 
161  {
162  // Switch from the dummy recorder to the tuned program in livetv
163  m_playerCtx->m_tvchain->JumpToNext(true, 0s);
164  JumpToProgram();
165  }
166  else if ((!m_allPaused || GetEof() != kEofStateNone) &&
169  {
170  // Switch to the next program in livetv
172  SwitchToProgram();
173  }
174 
175  // Jump to the next program in livetv
177  {
178  JumpToProgram();
179  }
180 
181  // Change interactive stream if requested
182  if (!m_newStream.isEmpty())
183  {
185  m_newStream = QString();
186  }
187 
188  // Disable fastforward if we are too close to the end of the buffer
189  if (m_ffrewSkip > 1 && (CalcMaxFFTime(100, false) < 100))
190  {
191  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Near end, stopping fastforward.");
192  Play(1.0F, true, true);
193  }
194 
195  // Disable rewind if we are too close to the beginning of the buffer
196  if (m_ffrewSkip < 0 && CalcRWTime(-m_ffrewSkip) >= 0 &&
198  {
199  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Near start, stopping rewind.");
200  float stretch = (m_ffrewSkip > 0) ? 1.0F : m_audio.GetStretchFactor();
201  Play(stretch, true, true);
202  }
203 
204  // Check for error
206  {
207  LOG(VB_GENERAL, LOG_ERR, LOC + "Unknown recorder error, exiting decoder");
208  if (!IsErrored())
209  SetErrored(tr("Irrecoverable recorder error"));
210  m_killDecoder = true;
211  return;
212  }
213 
214  // Handle speed change
215  if (!qFuzzyCompare(m_playSpeed + 1.0F, m_nextPlaySpeed + 1.0F) &&
217  {
218  ChangeSpeed();
219  return;
220  }
221 
222  // Check if we got a communication error, and if so pause playback
224  {
225  Pause();
227  }
228 
229  // Handle end of file
230  EofState eof = GetEof();
231  if (HasReachedEof())
232  {
233 #ifdef USING_MHEG
235  {
236  Pause();
237  return;
238  }
239 #endif
241  {
242  LOG(VB_GENERAL, LOG_NOTICE, LOC + "LiveTV forcing JumpTo 1");
243  m_playerCtx->m_tvchain->JumpToNext(true, 0s);
244  return;
245  }
246 
247  bool drained = false;
249  {
250  // We have audio only or mostly audio content. Exit when
251  // the audio is drained.
252  drained =
253  !m_audio.GetAudioOutput() ||
254  m_audio.IsPaused() ||
256  }
257  else
258  {
259  // We have normal or video only content. Exit when the
260  // video is drained.
262  }
263  if (eof != kEofStateDelayed || drained)
264  {
265  if (eof == kEofStateDelayed)
266  {
267  LOG(VB_PLAYBACK, LOG_INFO,
268  QString("waiting for no video frames %1")
270  }
271  LOG(VB_PLAYBACK, LOG_INFO,
272  QString("HasReachedEof() at framesPlayed=%1 totalFrames=%2")
273  .arg(m_framesPlayed).arg(GetCurrentFrameCount()));
274  Pause();
275  SetPlaying(false);
276  return;
277  }
278  }
279 
280  // Handle rewind
281  if (m_rewindTime > 0 && (m_ffrewSkip == 1 || m_ffrewSkip == 0))
282  {
284  if (m_rewindTime > 0)
285  DoRewind(static_cast<uint64_t>(m_rewindTime), kInaccuracyDefault);
286  }
287 
288  // Handle fast forward
289  if (m_ffTime > 0 && (m_ffrewSkip == 1 || m_ffrewSkip == 0))
290  {
292  if (m_ffTime > 0)
293  {
294  DoFastForward(static_cast<uint64_t>(m_ffTime), kInaccuracyDefault);
295  if (GetEof() != kEofStateNone)
296  return;
297  }
298  }
299 
300  // Handle chapter jump
301  if (m_jumpChapter != 0)
303 
304  // Handle commercial skipping
305  if (m_commBreakMap.GetSkipCommercials() != 0 && (m_ffrewSkip == 1))
306  {
307  if (!m_commBreakMap.HasMap())
308  {
309  //: The commercials/adverts have not been flagged
310  SetOSDStatus(tr("Not Flagged"), kOSDTimeout_Med);
311  QString message = "COMMFLAG_REQUEST ";
312  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
313  message += QString("%1").arg(m_playerCtx->m_playingInfo->GetChanID()) +
315  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
316  gCoreContext->SendMessage(message);
317  }
318  else
319  {
320  QString msg;
321  uint64_t jumpto = 0;
322  uint64_t frameCount = GetCurrentFrameCount();
323  // XXX CommBreakMap should use duration map not m_videoFrameRate
324  bool jump = m_commBreakMap.DoSkipCommercials(jumpto, m_framesPlayed,
326  frameCount, msg);
327  if (!msg.isEmpty())
329  if (jump)
331  }
333  return;
334  }
335 
336  // Handle automatic commercial skipping
337  uint64_t jumpto = 0;
338  if (m_deleteMap.IsEmpty() && (m_ffrewSkip == 1) &&
341  {
342  QString msg;
343  uint64_t frameCount = GetCurrentFrameCount();
344  // XXX CommBreakMap should use duration map not m_videoFrameRate
347  frameCount, msg);
348  if (!msg.isEmpty())
350  if (jump)
352  }
353 
354  // Handle cutlist skipping
355  if (!m_allPaused && (m_ffrewSkip == 1) &&
357  {
358  if (jumpto == m_totalFrames)
359  {
362  }
363  else
364  {
366  }
367  }
368 }
369 
371 {
372 #ifdef USING_MHEG
373  // handle Interactive TV
374  if (GetInteractiveTV())
375  {
376  m_osdLock.lock();
377  m_itvLock.lock();
378  auto *window = qobject_cast<InteractiveScreen *>(m_captionsOverlay.GetWindow(OSD_WIN_INTERACT));
379  if ((m_interactiveTV->ImageHasChanged() || !m_itvVisible) && window)
380  {
382  m_itvVisible = true;
383  }
384  m_itvLock.unlock();
385  m_osdLock.unlock();
386  }
387 #endif // USING_MHEG
388 }
389 
391 {
393  // ensure we re-check double rate support following a speed change
394  UnlockScan();
395 }
396 
397 void MythPlayerUI::ReinitVideo(bool ForceUpdate)
398 {
399  MythPlayer::ReinitVideo(ForceUpdate);
400 
401  // Signal to the main thread to reinit OSD
402  m_reinitOsd = true;
403 
404  // Signal to main thread to reinit subtitles
406  emit EnableSubtitles(true);
407 
408  // Signal to the main thread to check auto visualise
409  m_checkAutoVisualise = true;
410 }
411 
413 {
414  QRect visible;
415  QRect total;
416  float aspect = NAN;
417  float scaling = NAN;
418 
419  m_osdLock.lock();
420  m_videoOutput->GetOSDBounds(total, visible, aspect, scaling, 1.0F);
421  m_osd.Init(visible, aspect);
422  m_captionsOverlay.Init(visible, aspect);
424 
425 #ifdef USING_MHEG
426  if (GetInteractiveTV())
427  {
428  QMutexLocker locker(&m_itvLock);
429  m_interactiveTV->Reinit(total, visible, aspect);
430  }
431 #endif // USING_MHEG
432 
433  // If there is a forced text subtitle track (which is possible
434  // in e.g. a .mkv container), and forced subtitles are
435  // allowed, then start playback with that subtitle track
436  // selected. Otherwise, use the frontend settings to decide
437  // which captions/subtitles (if any) to enable at startup.
438  // TODO: modify the fix to #10735 to use this approach
439  // instead.
440  bool hasForcedTextTrack = false;
441  uint forcedTrackNumber = 0;
443  {
444  uint numTextTracks = m_decoder->GetTrackCount(kTrackTypeRawText);
445  for (uint i = 0; !hasForcedTextTrack && i < numTextTracks; ++i)
446  {
448  {
449  hasForcedTextTrack = true;
450  forcedTrackNumber = i;
451  }
452  }
453  }
454  if (hasForcedTextTrack)
455  SetTrack(kTrackTypeRawText, static_cast<uint>(forcedTrackNumber));
456  else
458 
459  m_osdLock.unlock();
460 
461  SetPlaying(true);
462  ClearAfterSeek(false);
465 
468  AutoVisualise(!m_videoDim.isEmpty());
469 }
470 
472 {
473  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
474  {
476  {
477  // When initial playback gets underway, we override the ProgramInfo
478  // flags such that future calls to GetBookmark() will consider only
479  // an actual bookmark and not progstart or lastplaypos information.
483  }
484  }
485  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
487 }
488 
490 {
492 
493  if (m_videoPaused || m_isDummy)
495  else if (DisplayNormalFrame())
496  {
499  else if (m_decoder && m_decoder->GetEof() != kEofStateNone)
500  ++m_framesPlayed;
501  else
502  m_framesPlayed = static_cast<uint64_t>(
504  }
505 
506  return !IsErrored();
507 }
508 
510 {
511  SetFrameInterval(GetScanType(), 1.0 / (m_videoFrameRate * static_cast<double>(m_playSpeed)));
513  LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("Display Refresh Rate: %1 Video Frame Rate: %2")
514  .arg(1000000.0 / m_refreshInterval.count(), 0, 'f', 3)
515  .arg(1000000.0 / m_frameInterval.count(), 0, 'f', 3));
516 }
517 
518 void MythPlayerUI::RenderVideoFrame(MythVideoFrame *Frame, FrameScanType Scan, bool Prepare, std::chrono::microseconds Wait)
519 {
520  if (!m_videoOutput)
521  return;
522 
523  if (Prepare)
527  if (m_renderOneFrame)
528  LOG(VB_PLAYBACK, LOG_DEBUG, QString("Clearing render one"));
529  m_renderOneFrame = false;
532  m_osd.Draw();
534 
535  if (Wait > 0us)
536  m_avSync.WaitForFrame(Wait);
537 
539 }
540 
542 {
543  m_fileChanged = false;
544  LOG(VB_PLAYBACK, LOG_INFO, LOC + "FileChanged");
545 
546  Pause();
547  ChangeSpeed();
548  if (dynamic_cast<AvFormatDecoder *>(m_decoder))
549  m_playerCtx->m_buffer->Reset(false, true);
550  else
551  m_playerCtx->m_buffer->Reset(false, true, true);
553  Play();
554 
556 
557  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
559  if (m_decoder)
561  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
562 
563  CheckTVChain();
564  m_forcePositionMapSync = true;
565 }
566 
568 {
570  {
572  {
574  m_needNewPauseFrame = false;
575 
576  if (m_deleteMap.IsEditing())
577  {
578  m_osdLock.lock();
580  m_osdLock.unlock();
581  }
582  }
583  else
584  {
585  m_decodeOneFrame = true;
586  }
587  }
588 }
589 
590 void MythPlayerUI::DoDisplayVideoFrame(MythVideoFrame* Frame, std::chrono::microseconds Due)
591 {
592  if (Due < 0us)
593  {
594  m_videoOutput->SetFramesPlayed(static_cast<long long>(++m_framesPlayed));
595  if (m_renderOneFrame)
596  LOG(VB_PLAYBACK, LOG_DEBUG, QString("Clearing render one"));
597  m_renderOneFrame = false;
598  }
599  else if (!FlagIsSet(kVideoIsNull) && Frame)
600  {
601 
602  // Check scan type
603  bool showsecondfield = false;
604  FrameScanType ps = GetScanForDisplay(Frame, showsecondfield);
605 
606  // if we get here, we're actually going to do video output
607  RenderVideoFrame(Frame, ps, true, Due);
608 
609  // Only double rate CPU deinterlacers require an extra call to PrepareFrame
610  bool secondprepare = Frame->GetDoubleRateOption(DEINT_CPU) && !Frame->GetDoubleRateOption(DEINT_SHADER);
611  // and the first deinterlacing pass will have marked the frame as already deinterlaced
612  // which will break GetScanForDisplay below and subsequent deinterlacing
613  bool olddeinterlaced = Frame->m_alreadyDeinterlaced;
614  if (secondprepare)
615  Frame->m_alreadyDeinterlaced = false;
616  // Update scan settings now that deinterlacer has been set and we know
617  // whether we need a second field
618  ps = GetScanForDisplay(Frame, showsecondfield);
619 
620  // Reset olddeinterlaced if necessary (pause frame etc)
621  if (!showsecondfield && secondprepare)
622  {
623  Frame->m_alreadyDeinterlaced = olddeinterlaced;
624  }
625  else if (showsecondfield)
626  {
627  // Second field
628  if (kScan_Interlaced == ps)
629  ps = kScan_Intr2ndField;
630  RenderVideoFrame(Frame, ps, secondprepare, Due + m_frameInterval / 2);
631  }
632  }
633  else
634  {
635  m_avSync.WaitForFrame(Due);
636  }
637 }
638 
640 {
641  if (!m_videoOutput)
642  return;
643 
644  if (m_videoOutput->IsErrored())
645  {
646  SetErrored(tr("Serious error detected in Video Output"));
647  return;
648  }
649 
650  // clear the buffering state
651  SetBuffering(false);
652 
654  PreProcessNormalFrame(); // Allow interactiveTV to draw on pause frame
655 
658  RenderVideoFrame(nullptr, scan, true, 0ms);
659 }
660 
661 bool MythPlayerUI::DisplayNormalFrame(bool CheckPrebuffer)
662 {
663  if (m_allPaused)
664  return false;
665 
666  if (CheckPrebuffer && !PrebufferEnoughFrames())
667  return false;
668 
669  // clear the buffering state
670  SetBuffering(false);
671 
672  // retrieve the next frame
675 
676  // Check aspect ratio
677  CheckAspectRatio(frame);
678 
680  UpdateFFRewSkip();
681 
682  // Player specific processing (dvd, bd, mheg etc)
684 
685  // handle scan type changes
687 
688  // Detect letter boxing
689  // FIXME this is temporarily moved entirely into the main thread as there are
690  // too many threading issues and the decoder thread is not yet ready to handle
691  // QObject signals and slots.
692  // When refactoring is complete, move it into the decoder thread and
693  // signal switches via a new field in MythVideoFrame
696  {
698  ReinitOSD();
699  }
700 
701  // When is the next frame due
702  std::chrono::microseconds due = m_avSync.AVSync(&m_audio, frame, m_frameInterval, m_playSpeed, !m_videoDim.isEmpty(),
704  // Display it
705  DoDisplayVideoFrame(frame, due);
708 
709  return true;
710 }
711 
712 void MythPlayerUI::SetVideoParams(int Width, int Height, double FrameRate, float Aspect,
713  bool ForceUpdate, int ReferenceFrames,
714  FrameScanType Scan, const QString &CodecName)
715 {
716  MythPlayer::SetVideoParams(Width, Height, FrameRate, Aspect, ForceUpdate, ReferenceFrames,
717  Scan, CodecName);
718 
719  // ensure deinterlacers are correctly reset after a change
720  UnlockScan();
721  FrameScanType newscan = DetectInterlace(Scan, static_cast<float>(m_videoFrameRate), m_videoDispDim.height());
723  ResetTracker();
724 }
725 
740 void MythPlayerUI::SetWatched(bool ForceWatched)
741 {
742  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
744  {
745  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
746  return;
747  }
748 
749  uint64_t numFrames = GetCurrentFrameCount();
750 
751  // For recordings we want to ignore the post-roll and account for
752  // in-progress recordings where totalFrames doesn't represent
753  // the full length of the recording. For videos we can only rely on
754  // totalFrames as duration metadata can be wrong
757  {
758 
759  // If the recording is stopped early we need to use the recording end
760  // time, not the programme end time
762  qint64 starttime = pi->GetRecordingStartTime().toSecsSinceEpoch();
763  qint64 endactual = pi->GetRecordingEndTime().toSecsSinceEpoch();
764  qint64 endsched = pi->GetScheduledEndTime().toSecsSinceEpoch();
765  qint64 endtime = std::min(endactual, endsched);
766  numFrames = static_cast<uint64_t>((endtime - starttime) * m_videoFrameRate);
767  }
768 
769  // 4 minutes min, 12 minutes max
770  auto offset = std::chrono::seconds(lround(0.14 * (numFrames / m_videoFrameRate)));
771  offset = std::clamp(offset, 240s, 720s);
772 
773  if (ForceWatched || (m_framesPlayed > (numFrames - (offset.count() * m_videoFrameRate))))
774  {
776  LOG(VB_GENERAL, LOG_INFO, LOC + QString("Marking recording as watched using offset %1 minutes")
777  .arg(offset.count()/60));
778  }
779 
780  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
781 }
782 
784 {
785  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
788  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
789 }
790 
792 {
793  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
796  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
797 }
798 
800 {
801  // At this point we may not have the correct frame rate.
802  // Since interlaced is always at 25 or 30 fps, if the interval
803  // is less than 30000 (33fps) it must be representing one
804  // field and not one frame, so multiply by 2.
805  std::chrono::microseconds realfi = m_frameInterval;
806  if (m_frameInterval < 30ms)
807  realfi = m_frameInterval * 2;
808  return (duration_cast<floatusecs>(realfi) / 2.0) > (duration_cast<floatusecs>(m_refreshInterval) * 0.995);
809 }
810 
812 {
813  QString samplerate = MythMediaBuffer::BitrateToString(static_cast<uint64_t>(m_audio.GetSampleRate()), true);
814  Map.insert("samplerate", samplerate);
815  Map.insert("filename", m_playerCtx->m_buffer->GetSafeFilename());
816  Map.insert("decoderrate", m_playerCtx->m_buffer->GetDecoderRate());
817  Map.insert("storagerate", m_playerCtx->m_buffer->GetStorageRate());
818  Map.insert("bufferavail", m_playerCtx->m_buffer->GetAvailableBuffer());
819  Map.insert("buffersize", QString::number(m_playerCtx->m_buffer->GetBufferSize() >> 20));
820  m_avSync.GetAVSyncData(Map);
821 
822  if (m_videoOutput)
823  {
824  QString frames = QString("%1/%2").arg(m_videoOutput->ValidVideoFrames())
826  Map.insert("videoframes", frames);
827  }
828  if (m_decoder)
829  Map["videodecoder"] = m_decoder->GetCodecDecoderName();
830 
831  Map["framerate"] = QString("%1%2%3")
832  .arg(static_cast<double>(m_outputJmeter.GetLastFPS()), 0, 'f', 2).arg(QChar(0xB1, 0))
833  .arg(static_cast<double>(m_outputJmeter.GetLastSD()), 0, 'f', 2);
834  Map["load"] = m_outputJmeter.GetLastCPUStats();
835 
836  GetCodecDescription(Map);
837 }
838 
840 {
841  Map["audiocodec"] = ff_codec_id_string(m_audio.GetCodec());
842  Map["audiochannels"] = QString::number(m_audio.GetOrigChannels());
843 
844  int width = m_videoDispDim.width();
845  int height = m_videoDispDim.height();
846  Map["videocodec"] = GetEncodingType();
847  if (m_decoder)
848  Map["videocodecdesc"] = m_decoder->GetRawEncodingType();
849  Map["videowidth"] = QString::number(width);
850  Map["videoheight"] = QString::number(height);
851  Map["videoframerate"] = QString::number(m_videoFrameRate, 'f', 2);
852  Map["deinterlacer"] = GetDeinterlacerName();
853 
854  if (width < 640)
855  return;
856 
857  bool interlaced = is_interlaced(GetScanType());
858  if (height > 2100)
859  Map["videodescrip"] = interlaced ? "UHD_4K_I" : "UHD_4K_P";
860  else if (width == 1920 || height == 1080 || height == 1088)
861  Map["videodescrip"] = interlaced ? "HD_1080_I" : "HD_1080_P";
862  else if ((width == 1280 || height == 720) && !interlaced)
863  Map["videodescrip"] = "HD_720_P";
864  else if (height >= 720)
865  Map["videodescrip"] = "HD";
866  else
867  Map["videodescrip"] = "SD";
868 }
869 
871 {
873  if (Visible)
874  {
875  // This should already have enabled the required monitors
876  m_osdDebugTimer.start();
877  }
878  else
879  {
880  // If we have cleared/escaped the debug OSD screen, then ChangeOSDDebug
881  // is not called, so we need to ensure we turn off the monitors
882  m_osdDebugTimer.stop();
885  }
886 }
887 
889 {
890  m_osdLock.lock();
891  InfoMap infoMap;
892  GetPlaybackData(infoMap);
895  m_osdLock.unlock();
896 }
897 
899 {
900  m_osdLock.lock();
901  bool enable = !m_osdDebug;
902  EnableBitrateMonitor(enable);
903  EnableFrameRateMonitor(enable);
904  if (enable)
905  UpdateOSDDebug();
906  else
908  m_osdDebug = enable;
909  m_osdLock.unlock();
910 }
911 
913 {
914  bool enable = VERBOSE_LEVEL_CHECK(VB_PLAYBACK, LOG_ANY) || Enable;
915  m_outputJmeter.SetNumCycles(enable ? static_cast<int>(m_videoFrameRate) : 0);
916 }
917 
919 {
920  if (m_playerCtx->m_buffer)
922 }
923 
924 /* JumpToStream, JumpToProgram and SwitchToProgram all need to be moved into the
925  * parent object and hopefully simplified. The fairly involved logic does not
926  * sit well with the new design objectives for the player classes and are better
927  * suited to the high level logic in TV.
928  */
929 void MythPlayerUI::JumpToStream(const QString &stream)
930 {
931  LOG(VB_PLAYBACK, LOG_INFO, LOC + "JumpToStream - begin");
932 
933  // Shouldn't happen
934  if (stream.isEmpty())
935  return;
936 
937  Pause();
938  ResetCaptions();
939 
940  ProgramInfo pginfo(stream);
941  SetPlayingInfo(pginfo);
942 
945  else
946  m_playerCtx->m_buffer->OpenFile(stream);
947 
948  if (!m_playerCtx->m_buffer->IsOpen())
949  {
950  LOG(VB_GENERAL, LOG_ERR, LOC + "JumpToStream buffer OpenFile failed");
952  SetErrored(tr("Error opening remote stream buffer"));
953  return;
954  }
955 
956  m_watchingRecording = false;
957  m_totalLength = 0s;
958  m_totalFrames = 0;
959  m_totalDuration = 0s;
960 
961  // 120 retries ~= 60 seconds
962  if (OpenFile(120) < 0)
963  {
964  LOG(VB_GENERAL, LOG_ERR, LOC + "JumpToStream OpenFile failed.");
966  SetErrored(tr("Error opening remote stream"));
967  return;
968  }
969 
970  if (m_totalLength == 0s)
971  {
972  long long len = m_playerCtx->m_buffer->GetRealFileSize();
973  m_totalLength = std::chrono::seconds(len / ((m_decoder->GetRawBitrate() * 1000) / 8));
974  m_totalFrames = static_cast<uint64_t>(m_totalLength.count() * SafeFPS());
975  }
976 
977  LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("JumpToStream length %1 bytes @ %2 Kbps = %3 Secs, %4 frames @ %5 fps")
979  .arg(m_totalLength.count()).arg(m_totalFrames).arg(m_decoder->GetFPS()) );
980 
982 
983  // the bitrate is reset by m_playerCtx->m_buffer->OpenFile()...
985  m_decoder->SetProgramInfo(pginfo);
986 
987  Play();
988  ChangeSpeed();
989 
991 #ifdef USING_MHEG
993 #endif
994 
995  LOG(VB_PLAYBACK, LOG_INFO, LOC + "JumpToStream - end");
996 }
997 
999 {
1000  if (!IsReallyNearEnd())
1001  return;
1002 
1003  LOG(VB_PLAYBACK, LOG_INFO, LOC + "SwitchToProgram - start");
1004  bool discontinuity = false;
1005  bool newtype = false;
1006  int newid = -1;
1007  ProgramInfo *pginfo = m_playerCtx->m_tvchain->GetSwitchProgram(discontinuity, newtype, newid);
1008  if (!pginfo)
1009  return;
1010 
1011  bool newIsDummy = m_playerCtx->m_tvchain->GetInputType(newid) == "DUMMY";
1012 
1013  SetPlayingInfo(*pginfo);
1014  Pause();
1015  ChangeSpeed();
1016 
1017  // Release all frames to ensure the current decoder resources are released
1018  DiscardVideoFrames(true, true);
1019 
1020  if (newIsDummy)
1021  {
1022  OpenDummy();
1023  ResetPlaying();
1025  delete pginfo;
1026  return;
1027  }
1028 
1030  {
1031  // Restore original ringbuffer
1032  auto *ic = dynamic_cast<MythInteractiveBuffer*>(m_playerCtx->m_buffer);
1033  if (ic)
1034  m_playerCtx->m_buffer = ic->TakeBuffer();
1035  delete ic;
1036  }
1037 
1039 
1040  if (!m_playerCtx->m_buffer->IsOpen())
1041  {
1042  LOG(VB_GENERAL, LOG_ERR, LOC + QString("SwitchToProgram's OpenFile failed (input type: %1)")
1043  .arg(m_playerCtx->m_tvchain->GetInputType(newid)));
1044  LOG(VB_GENERAL, LOG_ERR, m_playerCtx->m_tvchain->toString());
1046  SetErrored(tr("Error opening switch program buffer"));
1047  delete pginfo;
1048  return;
1049  }
1050 
1051  if (GetEof() != kEofStateNone)
1052  {
1053  discontinuity = true;
1054  ResetCaptions();
1055  }
1056 
1057  LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("SwitchToProgram(void) "
1058  "discont: %1 newtype: %2 newid: %3 decoderEof: %4")
1059  .arg(discontinuity).arg(newtype).arg(newid).arg(GetEof()));
1060 
1061  if (discontinuity || newtype)
1062  {
1063  m_playerCtx->m_tvchain->SetProgram(*pginfo);
1064  if (m_decoder)
1065  m_decoder->SetProgramInfo(*pginfo);
1066 
1067  m_playerCtx->m_buffer->Reset(true);
1068  if (newtype)
1069  {
1070  if (OpenFile() < 0)
1071  SetErrored(tr("Error opening switch program file"));
1072  }
1073  else
1074  ResetPlaying();
1075  }
1076  else
1077  {
1079  if (m_decoder)
1080  {
1083  }
1084  }
1085  delete pginfo;
1086 
1087  if (IsErrored())
1088  {
1089  LOG(VB_GENERAL, LOG_ERR, LOC + "SwitchToProgram failed.");
1091  return;
1092  }
1093 
1095 
1096  // the bitrate is reset by m_playerCtx->m_buffer->OpenFile()...
1097  if (m_decoder)
1100 
1101  if (discontinuity || newtype)
1102  {
1103  CheckTVChain();
1104  m_forcePositionMapSync = true;
1105  }
1106 
1107  Play();
1108  LOG(VB_PLAYBACK, LOG_INFO, LOC + "SwitchToProgram - end");
1109 }
1110 
1112 {
1113  LOG(VB_PLAYBACK, LOG_INFO, LOC + "JumpToProgram - start");
1114  bool discontinuity = false;
1115  bool newtype = false;
1116  int newid = -1;
1117  std::chrono::seconds nextpos = m_playerCtx->m_tvchain->GetJumpPos();
1118  ProgramInfo *pginfo = m_playerCtx->m_tvchain->GetSwitchProgram(discontinuity, newtype, newid);
1119  if (!pginfo)
1120  return;
1121 
1122  m_inJumpToProgramPause = true;
1123 
1124  bool newIsDummy = m_playerCtx->m_tvchain->GetInputType(newid) == "DUMMY";
1125  SetPlayingInfo(*pginfo);
1126 
1127  Pause();
1128  ChangeSpeed();
1129  ResetCaptions();
1130 
1131  // Release all frames to ensure the current decoder resources are released
1132  DiscardVideoFrames(true, true);
1133 
1134  m_playerCtx->m_tvchain->SetProgram(*pginfo);
1135  m_playerCtx->m_buffer->Reset(true);
1136 
1137  if (newIsDummy)
1138  {
1139  OpenDummy();
1140  ResetPlaying();
1142  delete pginfo;
1143  m_inJumpToProgramPause = false;
1144  return;
1145  }
1146 
1147  SendMythSystemPlayEvent("PLAY_CHANGED", pginfo);
1148 
1150  {
1151  // Restore original ringbuffer
1152  auto *ic = dynamic_cast<MythInteractiveBuffer*>(m_playerCtx->m_buffer);
1153  if (ic)
1154  m_playerCtx->m_buffer = ic->TakeBuffer();
1155  delete ic;
1156  }
1157 
1159  if (!m_playerCtx->m_buffer->IsOpen())
1160  {
1161  LOG(VB_GENERAL, LOG_ERR, LOC + QString("JumpToProgram's OpenFile failed (input type: %1)")
1162  .arg(m_playerCtx->m_tvchain->GetInputType(newid)));
1163  LOG(VB_GENERAL, LOG_ERR, m_playerCtx->m_tvchain->toString());
1165  SetErrored(tr("Error opening jump program file buffer"));
1166  delete pginfo;
1167  m_inJumpToProgramPause = false;
1168  return;
1169  }
1170 
1172 
1173  bool wasDummy = m_isDummy;
1174  if (newtype || wasDummy)
1175  {
1176  if (OpenFile() < 0)
1177  SetErrored(tr("Error opening jump program file"));
1178  }
1179  else
1180  ResetPlaying();
1181 
1182  if (IsErrored() || !m_decoder)
1183  {
1184  LOG(VB_GENERAL, LOG_ERR, LOC + "JumpToProgram failed.");
1185  if (!IsErrored())
1186  SetErrored(tr("Error reopening video decoder"));
1187  delete pginfo;
1188  m_inJumpToProgramPause = false;
1189  return;
1190  }
1191 
1193 
1194  // the bitrate is reset by m_playerCtx->m_buffer->OpenFile()...
1197 
1198  m_decoder->SetProgramInfo(*pginfo);
1199  delete pginfo;
1200 
1201  CheckTVChain();
1202  m_forcePositionMapSync = true;
1203  m_inJumpToProgramPause = false;
1204  Play();
1205  ChangeSpeed();
1206 
1207  // check that we aren't too close to the end of program.
1208  // and if so set it to 10s from the end if completed recordings
1209  // or 3s if live
1210  std::chrono::seconds duration = m_playerCtx->m_tvchain->GetLengthAtCurPos();
1211  std::chrono::seconds maxpos = m_playerCtx->m_tvchain->HasNext() ? 10s : 3s;
1212 
1213  if (nextpos > (duration - maxpos))
1214  {
1215  nextpos = duration - maxpos;
1216  if (nextpos < 0s)
1217  nextpos = 0s;
1218  }
1219  else if (nextpos < 0s)
1220  {
1221  // it's a relative position to the end
1222  nextpos += duration;
1223  }
1224 
1225  // nextpos is the new position to use in seconds
1226  uint64_t nextframe = TranslatePositionMsToFrame(nextpos, true);
1227 
1228  if (nextpos > 10s)
1229  DoJumpToFrame(nextframe, kInaccuracyNone);
1230 
1232  LOG(VB_PLAYBACK, LOG_INFO, LOC + "JumpToProgram - end");
1233 }
MythPlayer::IsNearEnd
bool IsNearEnd(void)
Returns true iff near end of recording.
Definition: mythplayer.cpp:1550
MythPlayerCaptionsUI::GetInteractiveTV
InteractiveTV * GetInteractiveTV() override
Definition: mythplayercaptionsui.cpp:520
MythVideoOutput::GetOSDBounds
virtual void GetOSDBounds(QRect &Total, QRect &Visible, float &VisibleAspect, float &FontScaling, float ThemeAspect) const
Definition: mythvideoout.cpp:207
MythPlayerUI::SetBookmark
virtual void SetBookmark(bool Clear=false)
Definition: mythplayerui.cpp:783
OSD_WIN_INTERACT
#define OSD_WIN_INTERACT
Definition: mythcaptionsoverlay.h:9
MythPlayerUI::VideoStart
virtual void VideoStart()
Definition: mythplayerui.cpp:412
PlayerContext::IsRecorderErrored
bool IsRecorderErrored(void) const
Definition: playercontext.cpp:141
MythPlayerCaptionsUI::SetTrack
virtual void SetTrack(uint Type, uint TrackNo)
Definition: mythplayercaptionsui.cpp:329
ProgramInfo::MakeUniqueKey
QString MakeUniqueKey(void) const
Creates a unique string that can be used to identify an existing recording.
Definition: programinfo.h:339
DetectLetterbox::Detect
bool Detect(MythVideoFrame *Frame, float VideoAspect, AdjustFillMode &Current)
Detects if this frame is or is not letterboxed.
Definition: DetectLetterbox.cpp:27
PlayerContext::GetState
TVState GetState(void) const
Definition: playercontext.cpp:334
MythPlayer::m_enableForcedSubtitles
bool m_enableForcedSubtitles
Definition: mythplayer.h:469
MythCoreContext::SendMessage
void SendMessage(const QString &message)
Definition: mythcorecontext.cpp:1521
hardwareprofile.smolt.timeout
float timeout
Definition: smolt.py:103
MythPlayer::m_videoPaused
bool m_videoPaused
Definition: mythplayer.h:399
PlayerContext::UnlockPlayingInfo
void UnlockPlayingInfo(const char *file, int line) const
Definition: playercontext.cpp:246
MythPlayer::m_watchingRecording
bool m_watchingRecording
Definition: mythplayer.h:410
MythPlayerUI::InitialiseState
void InitialiseState() override
Definition: mythplayerui.cpp:58
InteractiveTV::ImageHasChanged
bool ImageHasChanged(void)
Definition: interactivetv.cpp:41
LiveTVChain::JumpToNext
void JumpToNext(bool up, std::chrono::seconds pos)
jump to the next (up == true) or previous (up == false) liveTV program If pos > 0: indicate the absol...
Definition: livetvchain.cpp:617
MythPlayer::SetEof
void SetEof(EofState eof)
Definition: mythplayer.cpp:1092
MythPlayer::m_inJumpToProgramPause
bool m_inJumpToProgramPause
Definition: mythplayer.h:391
MythCaptionsOverlay::EnableSubtitles
void EnableSubtitles(int Type, bool ForcedOnly=false)
Definition: mythcaptionsoverlay.cpp:189
ProgramInfo::SaveBookmark
void SaveBookmark(uint64_t frame)
Clears any existing bookmark in DB and if frame is greater than 0 sets a new bookmark.
Definition: programinfo.cpp:2680
kScan_Detect
@ kScan_Detect
Definition: videoouttypes.h:97
mythplayerui.h
MythPlayer::m_commBreakMap
CommBreakMap m_commBreakMap
Definition: mythplayer.h:481
CommBreakMap::DoSkipCommercials
bool DoSkipCommercials(uint64_t &jumpToFrame, uint64_t framesPlayed, double video_frame_rate, uint64_t totalFrames, QString &comm_msg)
Definition: commbreakmap.cpp:249
MythPlayerUI::DisplayNormalFrame
virtual bool DisplayNormalFrame(bool CheckPrebuffer=true)
Definition: mythplayerui.cpp:661
MythPlayerVisualiserUI::m_checkAutoVisualise
bool m_checkAutoVisualise
Definition: mythplayervisualiserui.h:31
DecoderBase::GetEof
EofState GetEof(void)
Definition: decoderbase.h:135
MythPlayer::ChangeSpeed
virtual void ChangeSpeed(void)
Definition: mythplayer.cpp:1382
MythPlayerCaptionsUI::m_newStream
QString m_newStream
Definition: mythplayercaptionsui.h:78
kDisplayNone
@ kDisplayNone
Definition: videoouttypes.h:12
DEINT_SHADER
@ DEINT_SHADER
Definition: mythframe.h:74
TVPlaybackState::UpdateBookmark
void UpdateBookmark(bool Clear=false)
kEofStateNone
@ kEofStateNone
Definition: decoderbase.h:69
MythPlayer::m_bufferingCounter
int m_bufferingCounter
Definition: mythplayer.h:514
LiveTVChain::HasNext
bool HasNext(void) const
Definition: livetvchain.cpp:406
Jitterometer::SetNumCycles
void SetNumCycles(int cycles)
Definition: jitterometer.cpp:65
MythPlayerVisualiserUI::PrepareVisualiser
void PrepareVisualiser()
Definition: mythplayervisualiserui.cpp:132
MythPlayer::SeekingSlow
void SeekingSlow(int Count)
MythPlayer::m_avSync
MythPlayerAVSync m_avSync
Definition: mythplayer.h:436
MythPlayerUI::EnableFrameRateMonitor
void EnableFrameRateMonitor(bool Enable=false)
Definition: mythplayerui.cpp:912
MythPlayer::m_playSpeed
float m_playSpeed
Definition: mythplayer.h:494
MythVideoOutput::FreeVideoFrames
int FreeVideoFrames()
Returns number of frames available for decoding onto.
Definition: mythvideoout.cpp:284
MythPlayer::m_frameInterval
std::chrono::microseconds m_frameInterval
always adjusted for play_speed
Definition: mythplayer.h:496
kMusicChoice
@ kMusicChoice
Definition: mythplayer.h:77
MythPlayer::CheckTVChain
void CheckTVChain()
Definition: mythplayer.cpp:942
MythPlayer::OpenFile
virtual int OpenFile(int Retries=4)
Definition: mythplayer.cpp:421
MythPlayerUI::EventStart
virtual void EventStart()
Definition: mythplayerui.cpp:471
MythVideoBounds::GetDisplayVisibleRect
QRect GetDisplayVisibleRect(void) const
Definition: mythvideobounds.h:73
MythPlayerUI::GetCodecDescription
void GetCodecDescription(InfoMap &Map)
Definition: mythplayerui.cpp:839
MythMediaBuffer::EnableBitrateMonitor
void EnableBitrateMonitor(bool Enable)
Definition: mythmediabuffer.cpp:314
MythPlayerCaptionsUI::m_itvVisible
bool m_itvVisible
Definition: mythplayercaptionsui.h:77
MythPlayer::PrebufferEnoughFrames
virtual bool PrebufferEnoughFrames(int min_buffers=0)
Definition: mythplayer.cpp:724
MythPlayer::m_totalDuration
std::chrono::seconds m_totalDuration
Definition: mythplayer.h:433
Frame
Definition: zmdefines.h:93
PlayerContext::SetPlayerChangingBuffers
void SetPlayerChangingBuffers(bool val)
Definition: playercontext.h:93
MythPlayer::m_forcePositionMapSync
bool m_forcePositionMapSync
Definition: mythplayer.h:482
MythMediaBuffer::GetDecoderRate
QString GetDecoderRate(void)
Definition: mythmediabuffer.cpp:1534
MythMediaBuffer::kLiveTVOpenTimeout
static constexpr std::chrono::milliseconds kLiveTVOpenTimeout
Definition: mythmediabuffer.h:63
MythPlayer::HasReachedEof
virtual bool HasReachedEof(void) const
Definition: mythplayer.cpp:660
MythPlayerUI::MythPlayerUI
MythPlayerUI(MythMainWindow *MainWindow, TV *Tv, PlayerContext *Context, PlayerFlags Flags)
Definition: mythplayerui.cpp:19
MythVideoOutput::PrepareFrame
virtual void PrepareFrame(MythVideoFrame *Frame, FrameScanType Scan=kScan_Ignore)=0
MythPlayerCaptionsUI::m_itvLock
QMutex m_itvLock
Definition: mythplayercaptionsui.h:75
OSD::ResetWindow
void ResetWindow(const QString &Window)
Definition: osd.cpp:633
MythPlayer::m_ffrewSkip
int m_ffrewSkip
Definition: mythplayer.h:498
FrameScanType
FrameScanType
Definition: videoouttypes.h:94
osd.h
MythPlayerVideoUI::m_detectLetterBox
DetectLetterbox m_detectLetterBox
Definition: mythplayervideoui.h:64
MythPlayerUI::PreProcessNormalFrame
virtual void PreProcessNormalFrame()
Definition: mythplayerui.cpp:370
MythPlayer::IsErrored
bool IsErrored(void) const
Definition: mythplayer.cpp:1965
MythPlayer::m_normalSpeed
bool m_normalSpeed
Definition: mythplayer.h:504
MythMediaBuffer::Unpause
void Unpause(void)
Unpauses the read-ahead thread. Calls StartReads(void).
Definition: mythmediabuffer.cpp:698
ProgramInfo::GetScheduledEndTime
QDateTime GetScheduledEndTime(void) const
The scheduled end time of the program.
Definition: programinfo.h:397
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:23
MythMediaBuffer::GetSafeFilename
QString GetSafeFilename(void)
Definition: mythmediabuffer.cpp:1748
MythPlayer::GetCurrentFrameCount
uint64_t GetCurrentFrameCount(void) const
Definition: mythplayer.cpp:1755
DeleteMap::IsEmpty
bool IsEmpty(void) const
Definition: deletemap.cpp:259
OSD::SetText
void SetText(const QString &Window, const InfoMap &Map, OSDTimeout Timeout)
Definition: osd.cpp:209
ProgramInfo::UpdateInUseMark
void UpdateInUseMark(bool force=false)
Definition: programinfo.cpp:4885
MythVideoOutput::SetFramesPlayed
virtual void SetFramesPlayed(long long FramesPlayed)
Definition: mythvideoout.cpp:245
MythPlayer::CalcRWTime
long long CalcRWTime(long long rw) const
CalcRWTime(rw): rewind rw frames back.
Definition: mythplayer.cpp:1439
PlayerFlags
PlayerFlags
Definition: mythplayer.h:65
mythinteractivebuffer.h
mythsystemevent.h
MythPlayerVisualiserUI::RenderVisualiser
void RenderVisualiser()
Definition: mythplayervisualiserui.cpp:143
MythPlayer::GetEof
EofState GetEof(void) const
Definition: mythplayer.cpp:1079
MythPlayer::Pause
bool Pause(void)
Definition: mythplayer.cpp:152
kOSDTimeout_None
@ kOSDTimeout_None
Definition: osd.h:58
MythMediaBuffer::SetAdjustFilesize
long long SetAdjustFilesize(void)
Definition: mythmediabuffer.cpp:1153
MythPlayerUI::m_osdDebugTimer
QTimer m_osdDebugTimer
Definition: mythplayerui.h:68
MythPlayerUI::EnableBitrateMonitor
void EnableBitrateMonitor(bool Enable=false)
Definition: mythplayerui.cpp:918
MythPlayerAVSync::DisplayTimecode
std::chrono::milliseconds & DisplayTimecode()
Definition: mythplayeravsync.cpp:36
MythPlayer::m_nextPlaySpeed
float m_nextPlaySpeed
Definition: mythplayer.h:493
ProgramInfo::GetRecordingEndTime
QDateTime GetRecordingEndTime(void) const
Approximate time the recording should have ended, did end, or is intended to end.
Definition: programinfo.h:412
DecoderBase::GetRawBitrate
uint GetRawBitrate(void) const
Returns the estimated bitrate if the video were played at normal speed.
Definition: decoderbase.h:200
MythPlayerUI::VideoLoop
virtual bool VideoLoop()
Definition: mythplayerui.cpp:489
MythMediaBuffer::UpdateRawBitrate
void UpdateRawBitrate(uint RawBitrate)
Set the raw bit rate, to allow RingBuffer adjust effective bitrate.
Definition: mythmediabuffer.cpp:278
MythPlayerOverlayUI::SetOSDStatus
void SetOSDStatus(const QString &Title, OSDTimeout Timeout)
Definition: mythplayeroverlayui.cpp:90
DecoderBase::GetWaitForChange
bool GetWaitForChange(void) const
Definition: decoderbase.cpp:904
InteractiveTV::Reinit
void Reinit(QRect videoRect, QRect dispRect, float aspect)
Definition: interactivetv.cpp:62
Visible
Definition: channelsettings.cpp:392
DecoderBase::SetWaitForChange
void SetWaitForChange(void)
Definition: decoderbase.cpp:899
MythPlayer::SeekingComplete
void SeekingComplete()
MythPlayerUI::ReinitVideo
void ReinitVideo(bool ForceUpdate) override
Definition: mythplayerui.cpp:397
AudioPlayer::GetOrigChannels
int GetOrigChannels(void) const
Definition: audioplayer.h:63
MythCaptionsState::m_textDisplayMode
uint m_textDisplayMode
Definition: mythplayerstate.h:70
MythMediaBuffer::BitrateToString
static QString BitrateToString(uint64_t Rate, bool Hz=false)
Definition: mythmediabuffer.cpp:1501
hardwareprofile.scan.scan
def scan(profile, smoonURL, gate)
Definition: scan.py:57
MythDate::current
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:14
LiveTVChain::GetJumpPos
std::chrono::seconds GetJumpPos(void)
Returns the jump position in seconds and clears it.
Definition: livetvchain.cpp:673
ProgramInfo::GetRecordingStartTime
QDateTime GetRecordingStartTime(void) const
Approximate time the recording started.
Definition: programinfo.h:404
MythPlayer::SetErrored
void SetErrored(const QString &reason)
Definition: mythplayer.cpp:1941
LiveTVChain::NeedsToJump
bool NeedsToJump(void) const
Returns true iff a switch and jump are required.
Definition: livetvchain.h:71
MythPlayer::GetEncodingType
QString GetEncodingType(void) const
Definition: mythplayer.cpp:1725
MythPlayer::DiscardVideoFrames
void DiscardVideoFrames(bool KeyFrame, bool Flushed)
Places frames in the available frames queue.
Definition: mythplayer.cpp:649
MythPlayer::m_needNewPauseFrame
bool m_needNewPauseFrame
Definition: mythplayer.h:397
DeleteMap::TrackerWantsToJump
bool TrackerWantsToJump(uint64_t frame, uint64_t &to) const
Returns true if the given frame has passed the last cut point start and provides the frame number of ...
Definition: deletemap.cpp:840
MythPlayer::kInaccuracyNone
static const double kInaccuracyNone
Definition: mythplayer.h:242
AudioOutput::GetAudioBufferedTime
virtual std::chrono::milliseconds GetAudioBufferedTime(void)
report amount of audio buffered in milliseconds.
Definition: audiooutput.h:144
MythMediaBuffer::GetBufferSize
uint GetBufferSize(void) const
Definition: mythmediabuffer.cpp:1554
MythPlayerUI::DoDisplayVideoFrame
void DoDisplayVideoFrame(MythVideoFrame *Frame, std::chrono::microseconds Due)
Definition: mythplayerui.cpp:590
InfoMap
QHash< QString, QString > InfoMap
Definition: mythtypes.h:15
AudioPlayer::IsPaused
bool IsPaused(void)
Definition: audioplayer.cpp:189
MythPlayerUI::OSDDebugVisibilityChanged
void OSDDebugVisibilityChanged(bool Visible)
Definition: mythplayerui.cpp:870
MythVideoScanTracker::DetectInterlace
FrameScanType DetectInterlace(FrameScanType NewScan, float Rate, int VideoHeight)
Definition: mythvideoscantracker.cpp:243
EofState
EofState
Definition: decoderbase.h:67
MythPlayer::m_audio
AudioPlayer m_audio
Definition: mythplayer.h:478
DEINT_CPU
@ DEINT_CPU
Definition: mythframe.h:73
MythVideoBounds::GetAdjustFill
AdjustFillMode GetAdjustFill(void) const
Definition: mythvideobounds.h:80
MythPlayerOverlayUI::UpdateOSDMessage
void UpdateOSDMessage(const QString &Message)
Definition: mythplayeroverlayui.cpp:76
TRANSCODING_COMPLETE
@ TRANSCODING_COMPLETE
Definition: programtypes.h:160
Jitterometer::GetLastFPS
float GetLastFPS(void) const
Definition: jitterometer.h:53
DecoderBase::GetTrackCount
virtual uint GetTrackCount(uint Type)
Definition: decoderbase.cpp:909
MythMediaBuffer::GetRealFileSize
long long GetRealFileSize(void) const
Definition: mythmediabuffer.cpp:462
MythPlayer::m_decoder
DecoderBase * m_decoder
Definition: mythplayer.h:364
MythPlayerCaptionsUI::EnableSubtitles
void EnableSubtitles(bool Enable)
MythVideoOutput::EndFrame
virtual void EndFrame()=0
DecoderBase::GetCodecDecoderName
virtual QString GetCodecDecoderName(void) const =0
kScan_Intr2ndField
@ kScan_Intr2ndField
Definition: videoouttypes.h:99
MythPlayer::m_framesPlayed
uint64_t m_framesPlayed
Definition: mythplayer.h:430
MythPlayer::m_rewindTime
long long m_rewindTime
Definition: mythplayer.h:434
MythVideoScanTracker::CheckScanUpdate
void CheckScanUpdate(MythVideoOutput *VideoOutput, std::chrono::microseconds FrameInterval)
Definition: mythvideoscantracker.cpp:111
DecoderBase::GetTrackInfo
StreamInfo GetTrackInfo(uint Type, uint TrackNo)
Definition: decoderbase.cpp:983
MythVideoOutput::ValidVideoFrames
virtual int ValidVideoFrames() const
Returns number of frames that are fully decoded.
Definition: mythvideoout.cpp:278
MythPlayer::m_ffTime
long long m_ffTime
If m_ffTime>0, number of frames to seek forward.
Definition: mythplayer.h:425
LOC
#define LOC
Definition: mythplayerui.cpp:17
AudioPlayer::DeleteOutput
void DeleteOutput(void)
Definition: audioplayer.cpp:93
kScan_Progressive
@ kScan_Progressive
Definition: videoouttypes.h:100
PlayerContext::m_playingInfo
ProgramInfo * m_playingInfo
Currently playing info.
Definition: playercontext.h:121
MythPlayerUI::SwitchToProgram
void SwitchToProgram()
Definition: mythplayerui.cpp:998
MythPlayer::SetPlayingInfo
void SetPlayingInfo(const ProgramInfo &pginfo)
Definition: mythplayer.cpp:230
MythPlayer::m_captionsEnabledbyDefault
bool m_captionsEnabledbyDefault
This allows us to enable captions/subtitles later if the streams are not immediately available when t...
Definition: mythplayer.h:468
PlayerContext::LockPlayingInfo
void LockPlayingInfo(const char *file, int line) const
Definition: playercontext.cpp:234
MythPlayer::m_bookmarkSeek
uint64_t m_bookmarkSeek
Definition: mythplayer.h:419
DecoderBase::GetfpsMultiplier
int GetfpsMultiplier(void) const
Definition: decoderbase.h:262
MythPlayer::DoJumpChapter
virtual bool DoJumpChapter(int chapter)
Definition: mythplayer.cpp:1851
MythPlayer::m_videoOutput
MythVideoOutput * m_videoOutput
Definition: mythplayer.h:370
MythPlayer::m_hasFullPositionMap
bool m_hasFullPositionMap
Definition: mythplayer.h:412
MythPlayerCaptionsUI::m_captionsOverlay
MythCaptionsOverlay m_captionsOverlay
Definition: mythplayercaptionsui.h:69
PlayerContext::m_buffer
MythMediaBuffer * m_buffer
Definition: playercontext.h:120
MythPlayerUIBase::m_painter
MythPainter * m_painter
Definition: mythplayeruibase.h:20
MythMediaBuffer::ResetCommsError
void ResetCommsError(void)
Definition: mythmediabuffer.cpp:1774
OSD::Draw
void Draw()
Definition: osd.cpp:455
MythPlayerUI::m_outputJmeter
Jitterometer m_outputJmeter
Definition: mythplayerui.h:57
LiveTVChain::GetSwitchProgram
ProgramInfo * GetSwitchProgram(bool &discont, bool &newtype, int &newid)
Returns the recording we should switch to.
Definition: livetvchain.cpp:429
InteractiveTV::UpdateOSD
void UpdateOSD(InteractiveScreen *osdWindow, MythPainter *osdPainter)
Definition: interactivetv.cpp:47
ProgramInfo::SetIgnoreLastPlayPos
void SetIgnoreLastPlayPos(bool ignore)
If "ignore" is true QueryLastPlayPos() will return 0, otherwise QueryLastPlayPos() will return the la...
Definition: programinfo.h:575
MythPlayerUI::GetPlaybackData
void GetPlaybackData(InfoMap &Map)
Definition: mythplayerui.cpp:811
CommBreakMap::LoadMap
void LoadMap(PlayerContext *player_ctx, uint64_t framesPlayed)
Definition: commbreakmap.cpp:50
MythMediaBuffer::GetCommsError
bool GetCommsError(void) const
Definition: mythmediabuffer.cpp:1769
MythPlayerUI::SetVideoParams
void SetVideoParams(int Width, int Height, double FrameRate, float Aspect, bool ForceUpdate, int ReferenceFrames, FrameScanType Scan=kScan_Ignore, const QString &CodecName=QString()) override
Definition: mythplayerui.cpp:712
MythPlayer::ClearAfterSeek
void ClearAfterSeek(bool clearvideobuffers=true)
This is to support seeking...
Definition: mythplayer.cpp:1692
Jitterometer::GetLastSD
float GetLastSD(void) const
Definition: jitterometer.h:54
kOSDTimeout_Short
@ kOSDTimeout_Short
Definition: osd.h:59
FrameRate
Definition: recorderbase.h:37
ProgramInfo::QueryTranscodeStatus
TranscodingStatus QueryTranscodeStatus(void) const
Returns the "transcoded" field in "recorded" table.
Definition: programinfo.cpp:3301
MythVideoScanTracker::GetScanForDisplay
FrameScanType GetScanForDisplay(MythVideoFrame *Frame, bool &SecondField)
Definition: mythvideoscantracker.cpp:67
MythPlayerUI::m_refreshInterval
std::chrono::microseconds m_refreshInterval
Definition: mythplayerui.h:58
MythPlayer::SetBuffering
void SetBuffering(bool new_buffering)
Definition: mythplayer.cpp:704
MythPlayer::m_totalFrames
uint64_t m_totalFrames
Definition: mythplayer.h:431
MythPlayer::ResetPlaying
virtual void ResetPlaying(bool resetframes=true)
Definition: mythplayer.cpp:928
MythPlayer::m_videoFrameRate
double m_videoFrameRate
Video (input) Frame Rate (often inaccurate)
Definition: mythplayer.h:441
MythPlayer::UpdateFFRewSkip
bool UpdateFFRewSkip(float ffrewScale=1.0F)
Definition: mythplayer.cpp:1342
DecoderBase::GetRawEncodingType
virtual QString GetRawEncodingType(void)
Definition: decoderbase.h:208
MythVideoOutput::GetFramesPlayed
virtual long long GetFramesPlayed()
Definition: mythvideoout.cpp:250
kMythBufferMHEG
@ kMythBufferMHEG
Definition: mythmediabuffer.h:47
MythPlayerOverlayUI::m_reinitOsd
bool m_reinitOsd
Definition: mythplayeroverlayui.h:54
MythPlayer::m_playerCtx
PlayerContext * m_playerCtx
Definition: mythplayer.h:372
DecoderBase::GetFPS
virtual double GetFPS(void) const
Definition: decoderbase.h:198
MythPlayerAVSync::WaitForFrame
void WaitForFrame(std::chrono::microseconds FrameDue)
Definition: mythplayeravsync.cpp:28
MythPlayer::m_videoDispDim
QSize m_videoDispDim
Video (input) width & height.
Definition: mythplayer.h:444
MythPlayerUI::DisplayPauseFrame
virtual void DisplayPauseFrame()
Definition: mythplayerui.cpp:639
DecoderBase::SetReadAdjust
void SetReadAdjust(long long adjust)
Definition: decoderbase.cpp:894
MythPlayerCaptionsUI::SetCaptionsEnabled
void SetCaptionsEnabled(bool Enable, bool UpdateOSD=true)
Definition: mythplayercaptionsui.cpp:282
MythPlayerUI::RenderVideoFrame
void RenderVideoFrame(MythVideoFrame *Frame, FrameScanType Scan, bool Prepare, std::chrono::microseconds Wait)
Definition: mythplayerui.cpp:518
MythPlayerUI::JumpToProgram
void JumpToProgram()
Definition: mythplayerui.cpp:1111
AvFormatDecoder
A decoder for media files.
Definition: avformatdecoder.h:82
MythPlayer::m_latestVideoTimecode
std::chrono::milliseconds m_latestVideoTimecode
Definition: mythplayer.h:435
MythPlayer::m_disableForcedSubtitles
bool m_disableForcedSubtitles
Definition: mythplayer.h:470
MythPlayerCaptionsUI::SafeFPS
double SafeFPS()
Definition: mythplayercaptionsui.cpp:608
MythPlayer::m_keyframeDist
uint m_keyframeDist
Video (input) Number of frames between key frames (often inaccurate)
Definition: mythplayer.h:451
MythVideoBounds::ToggleAdjustFill
void ToggleAdjustFill(AdjustFillMode AdjustFillMode=kAdjustFill_Toggle)
Sets up letterboxing for various standard video frame and monitor dimensions, then calls MoveResize()...
Definition: mythvideobounds.cpp:565
MythPlayer::m_fpsMultiplier
int m_fpsMultiplier
used to detect changes
Definition: mythplayer.h:497
MythDisplay::GetRefreshInterval
std::chrono::microseconds GetRefreshInterval(std::chrono::microseconds Fallback) const
Definition: mythdisplay.cpp:807
uint
unsigned int uint
Definition: compat.h:79
MythPlayer::m_endExitPrompt
int m_endExitPrompt
Definition: mythplayer.h:420
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:59
MythPlayerOverlayUI::m_osd
OSD m_osd
Definition: mythplayeroverlayui.h:45
TVPlaybackState::InitialisePlayerState
void InitialisePlayerState()
InteractiveTV::StreamStarted
bool StreamStarted(bool bStarted=true)
Definition: interactivetv.cpp:82
MythPlayer::UnpauseDecoder
void UnpauseDecoder(void)
Definition: mythplayer.cpp:1001
MythPlayerAVSync::GetAVSyncData
void GetAVSyncData(InfoMap &Map) const
Definition: mythplayeravsync.cpp:71
interactivescreen.h
MythPlayer::GetAllowForcedSubtitles
bool GetAllowForcedSubtitles(void) const
Definition: mythplayer.h:209
CommBreakMap::GetSkipCommercials
int GetSkipCommercials(void) const
Definition: commbreakmap.h:34
MythPlayer::m_deleteMap
DeleteMap m_deleteMap
Definition: mythplayer.h:484
PlayerContext::m_tvchain
LiveTVChain * m_tvchain
Definition: playercontext.h:119
MythMediaOverlay::SetPlayer
void SetPlayer(MythPlayerUI *Player)
Definition: mythmediaoverlay.cpp:40
MythPlayerAVSync::SetRefreshInterval
void SetRefreshInterval(std::chrono::microseconds interval)
Definition: mythplayeravsync.h:31
MythPlayer::DoFastForward
bool DoFastForward(uint64_t frames, double inaccuracy)
Definition: mythplayer.cpp:1599
MythPlayer::m_playerThread
QThread * m_playerThread
Definition: mythplayer.h:374
OSD::Init
bool Init(QRect Rect, float FontAspect) override
Definition: osd.cpp:50
MythPlayerEditorUI::InitialiseState
void InitialiseState() override
Definition: mythplayereditorui.cpp:26
MythPlayer::ReinitVideo
virtual void ReinitVideo(bool ForceUpdate)
Definition: mythplayer.cpp:293
MythMediaBuffer::IgnoreLiveEOF
void IgnoreLiveEOF(bool Ignore)
Tells RingBuffer whether to ignore the end-of-file.
Definition: mythmediabuffer.cpp:1819
MythPlayer::DoJumpToFrame
void DoJumpToFrame(uint64_t frame, double inaccuracy)
Definition: mythplayer.cpp:1623
MythPlayer::SetVideoParams
virtual void SetVideoParams(int w, int h, double fps, float aspect, bool ForceUpdate, int ReferenceFrames, FrameScanType=kScan_Ignore, const QString &codecName=QString())
Definition: mythplayer.cpp:320
MythPlayerCaptionsUI::ResetCaptions
void ResetCaptions()
Definition: mythplayercaptionsui.cpp:120
DecoderBase::SetProgramInfo
void SetProgramInfo(const ProgramInfo &pginfo)
Definition: decoderbase.cpp:42
MythVideoOutput::StartDisplayingFrame
virtual void StartDisplayingFrame()
Tell GetLastShownFrame() to return the next frame from the head of the queue of frames to display.
Definition: mythvideoout.cpp:410
MythVideoOutput::IsErrored
bool IsErrored() const
Definition: mythvideoout.cpp:255
CommBreakMap::GetAutoCommercialSkip
CommSkipMode GetAutoCommercialSkip(void) const
Definition: commbreakmap.cpp:21
MythPlayerCaptionsUI::DoEnableForcedSubtitles
void DoEnableForcedSubtitles()
Definition: mythplayercaptionsui.cpp:357
MythPlayer::m_jumpChapter
int m_jumpChapter
Definition: mythplayer.h:416
MythPlayer::InitFrameInterval
virtual void InitFrameInterval()
Definition: mythplayer.cpp:698
MythPlayerUI::SetLastPlayPosition
virtual void SetLastPlayPosition(uint64_t frame=0)
Definition: mythplayerui.cpp:791
kState_WatchingPreRecorded
@ kState_WatchingPreRecorded
Watching Pre-recorded is a TV only state for when we are watching a pre-existing recording.
Definition: tv.h:67
MythMediaOverlay::Init
virtual bool Init(QRect Rect, float FontAspect)
Definition: mythmediaoverlay.cpp:62
MythPlayerAVSync::InitAVSync
void InitAVSync()
Definition: mythplayeravsync.cpp:17
LiveTVChain::GetInputType
QString GetInputType(int pos=-1) const
Definition: livetvchain.cpp:696
MythPlayer::CalcMaxFFTime
virtual long long CalcMaxFFTime(long long ff, bool setjump=true) const
CalcMaxFFTime(ffframes): forward ffframes forward.
Definition: mythplayer.cpp:1459
ProgramInfo::GetChanID
uint GetChanID(void) const
This is the unique key used in the database to locate tuning information.
Definition: programinfo.h:372
MythVideoScanTracker::AutoDeint
virtual void AutoDeint(MythVideoFrame *Frame, MythVideoOutput *VideoOutput, std::chrono::microseconds FrameInterval, bool AllowLock=true)
Check whether deinterlacing should be enabled.
Definition: mythvideoscantracker.cpp:177
MythPlayerUI::FileChanged
void FileChanged()
Definition: mythplayerui.cpp:541
AudioPlayer::GetAudioOutput
AudioOutput * GetAudioOutput(void) const
Return internal AudioOutput object.
Definition: audioplayer.h:106
livetvchain.h
kVideoIsNull
@ kVideoIsNull
Definition: mythplayer.h:74
MythVideoOutput::RenderFrame
virtual void RenderFrame(MythVideoFrame *Frame, FrameScanType)=0
DecoderBase::UpdateFramesPlayed
virtual void UpdateFramesPlayed(void)
Definition: decoderbase.cpp:876
MythVideoScanTracker::InitialiseScan
void InitialiseScan(MythVideoOutput *VideoOutput)
Definition: mythvideoscantracker.cpp:16
MythPlayerCaptionsUI::LoadExternalSubtitles
void LoadExternalSubtitles()
Definition: mythplayercaptionsui.cpp:69
VERBOSE_LEVEL_CHECK
#define VERBOSE_LEVEL_CHECK(_MASK_, _LEVEL_)
Definition: mythlogging.h:14
ProgramInfo
Holds information on recordings and videos.
Definition: programinfo.h:67
MythPlayerUI::InitialSeek
virtual void InitialSeek()
Definition: mythplayerui.cpp:100
kEofStateImmediate
@ kEofStateImmediate
Definition: decoderbase.h:71
AudioPlayer::GetCodec
AVCodecID GetCodec(void) const
Definition: audioplayer.h:62
MythPlayerEditorUI
Definition: mythplayereditorui.h:7
MythVideoScanTracker::SetScanType
void SetScanType(FrameScanType Scan, MythVideoOutput *VideoOutput, std::chrono::microseconds FrameInterval)
Definition: mythvideoscantracker.cpp:122
MythPlayer::IsReallyNearEnd
bool IsReallyNearEnd(void) const
Returns true iff really near end of recording.
Definition: mythplayer.cpp:1539
MythPlayerVideoUI::CheckAspectRatio
void CheckAspectRatio(MythVideoFrame *Frame)
Definition: mythplayervideoui.cpp:223
MythPlayer::IsWatchingInprogress
bool IsWatchingInprogress(void) const
Definition: mythplayer.cpp:126
MythPlayerOverlayUI::m_osdLock
QRecursiveMutex m_osdLock
Definition: mythplayeroverlayui.h:49
kEofStateDelayed
@ kEofStateDelayed
Definition: decoderbase.h:70
SendMythSystemPlayEvent
void SendMythSystemPlayEvent(const QString &msg, const ProgramInfo *pginfo)
Definition: mythsystemevent.cpp:361
MythPlayer::m_fileChanged
bool m_fileChanged
Definition: mythplayer.h:502
kScan_Interlaced
@ kScan_Interlaced
Definition: videoouttypes.h:98
LiveTVChain::NeedsToSwitch
bool NeedsToSwitch(void) const
Returns true iff a switch is required but no jump is required m_jumppos sets to INT_MAX means not set...
Definition: livetvchain.h:68
Clear
#define Clear(a)
Definition: audiooutputopensles.cpp:46
Jitterometer::RecordCycleTime
bool RecordCycleTime()
Definition: jitterometer.cpp:72
AudioPlayer::GetSampleRate
int GetSampleRate(void) const
Definition: audioplayer.h:64
CommBreakMap::AutoCommercialSkip
bool AutoCommercialSkip(uint64_t &jumpToFrame, uint64_t framesPlayed, double video_frame_rate, uint64_t totalFrames, QString &comm_msg)
Definition: commbreakmap.cpp:144
ProgramInfo::SetIgnoreBookmark
void SetIgnoreBookmark(bool ignore)
If "ignore" is true GetBookmark() will return 0, otherwise GetBookmark() will return the bookmark pos...
Definition: programinfo.h:560
avformatdecoder.h
AdjustFillMode
AdjustFillMode
Definition: videoouttypes.h:71
setpriority
#define setpriority(x, y, z)
Definition: compat.h:128
MythPlayerEditorUI::m_editUpdateTimer
QElapsedTimer m_editUpdateTimer
Definition: mythplayereditorui.h:30
ProgramInfo::GetPlaybackURL
QString GetPlaybackURL(bool checkMaster=false, bool forceCheckLocal=false)
Returns filename or URL to be used to play back this recording.
Definition: programinfo.cpp:2549
MythCaptionsOverlay::GetWindow
MythScreenType * GetWindow(const QString &Window) override
Definition: mythcaptionsoverlay.cpp:59
MythPlayerVideoUI::ReinitOSD
void ReinitOSD()
Definition: mythplayervideoui.cpp:182
MythPlayer::TranslatePositionMsToFrame
uint64_t TranslatePositionMsToFrame(std::chrono::milliseconds position, bool use_cutlist) const
Definition: mythplayer.h:259
MythPlayer::m_decodeOneFrame
bool m_decodeOneFrame
Definition: mythplayer.h:395
MythPlayer::SetPlaying
void SetPlaying(bool is_playing)
Definition: mythplayer.cpp:241
audiooutput.h
MythPlayerCaptionsUI::m_interactiveTV
InteractiveTV * m_interactiveTV
Definition: mythplayercaptionsui.h:74
MythPlayerUIBase::m_tv
TV * m_tv
Definition: mythplayeruibase.h:18
MythPlayerCaptionsUI::DoDisableForcedSubtitles
void DoDisableForcedSubtitles()
Definition: mythplayercaptionsui.cpp:349
LiveTVChain::toString
QString toString() const
Definition: livetvchain.cpp:739
MythPlayerVisualiserUI::AutoVisualise
void AutoVisualise(bool HaveVideo)
Enable visualisation if possible, there is no video and user has requested.
Definition: mythplayervisualiserui.cpp:112
MythMediaBuffer::OpenFile
virtual bool OpenFile(const QString &Filename, std::chrono::milliseconds Retry=kDefaultOpenTimeout)=0
ProgramInfo::SaveWatched
void SaveWatched(bool watchedFlag)
Set "watched" field in recorded/videometadata to "watchedFlag".
Definition: programinfo.cpp:3055
MythVideoScanTracker::GetDeinterlacerName
QString GetDeinterlacerName()
Definition: mythvideoscantracker.cpp:117
OSD_WIN_DEBUG
#define OSD_WIN_DEBUG
Definition: osd.h:33
MythMediaBuffer::GetAvailableBuffer
QString GetAvailableBuffer(void)
Definition: mythmediabuffer.cpp:1544
StreamInfo::m_forced
bool m_forced
Definition: decoderbase.h:103
OSD_WIN_MESSAGE
#define OSD_WIN_MESSAGE
Definition: osd.h:29
MythPlayer::m_totalLength
std::chrono::seconds m_totalLength
Definition: mythplayer.h:432
MythPlayer::SetFrameInterval
void SetFrameInterval(FrameScanType scan, double frame_period)
Definition: mythplayer.cpp:688
OSD::HideWindow
void HideWindow(const QString &Window) override
Definition: osd.cpp:672
MythInteractiveBuffer
Definition: mythinteractivebuffer.h:9
PlayerContext
Definition: playercontext.h:53
MythPlayer::m_isDummy
bool m_isDummy
Definition: mythplayer.h:511
MythPlayer::m_videoDim
QSize m_videoDim
Video (input) buffer width & height.
Definition: mythplayer.h:445
AudioPlayer::GetStretchFactor
float GetStretchFactor(void) const
Definition: audioplayer.h:68
MythPlayerUI::InitFrameInterval
void InitFrameInterval() override
Definition: mythplayerui.cpp:509
MythPlayerUI::SetWatched
void SetWatched(bool ForceWatched=false)
Determines if the recording should be considered watched.
Definition: mythplayerui.cpp:740
LiveTVChain::SetProgram
void SetProgram(const ProgramInfo &pginfo)
Definition: livetvchain.cpp:393
MythPlayerUI::m_osdDebug
bool m_osdDebug
Definition: mythplayerui.h:67
interactivetv.h
MythPlayer::FlagIsSet
bool FlagIsSet(PlayerFlags arg)
Definition: mythplayer.h:320
kTrackTypeRawText
@ kTrackTypeRawText
Definition: decoderbase.h:36
MythPlayer::m_videoAspect
float m_videoAspect
Video (input) Apect Ratio.
Definition: mythplayer.h:447
MythPlayerUI::RefreshPauseFrame
void RefreshPauseFrame()
Definition: mythplayerui.cpp:567
MythPlayer::m_allPaused
bool m_allPaused
Definition: mythplayer.h:400
ProgramInfo::SetIgnoreProgStart
void SetIgnoreProgStart(bool ignore)
If "ignore" is true QueryProgStart() will return 0, otherwise QueryProgStart() will return the progst...
Definition: programinfo.h:567
MythPlayerUI::ChangeSpeed
void ChangeSpeed() override
Definition: mythplayerui.cpp:390
LiveTVChain::GetLengthAtCurPos
std::chrono::seconds GetLengthAtCurPos(void)
Definition: livetvchain.cpp:361
MythPlayerCaptionsUI::m_captionsState
MythCaptionsState m_captionsState
Definition: mythplayercaptionsui.h:70
MythCaptionsOverlay::Draw
void Draw(QRect Rect)
Definition: mythcaptionsoverlay.cpp:31
Jitterometer::GetLastCPUStats
QString GetLastCPUStats(void) const
Definition: jitterometer.h:55
MythPlayerUI::JumpToStream
void JumpToStream(const QString &stream)
Definition: mythplayerui.cpp:929
PRIO_PROCESS
#define PRIO_PROCESS
Definition: compat.h:127
kCommSkipOff
@ kCommSkipOff
Definition: tv.h:132
MythVideoScanTracker
Definition: mythvideoscantracker.h:12
MythPlayerUI::UpdateOSDDebug
void UpdateOSDDebug()
Definition: mythplayerui.cpp:888
MythVideoFrame
Definition: mythframe.h:88
MythVideoScanTracker::ResetTracker
void ResetTracker()
Definition: mythvideoscantracker.cpp:39
MythPlayer::OpenDummy
void OpenDummy(void)
Definition: mythplayer.cpp:399
MythPlayerUI::ChangeOSDDebug
void ChangeOSDDebug()
Definition: mythplayerui.cpp:898
MythVideoScanTracker::GetScanType
FrameScanType GetScanType() const
Definition: mythvideoscantracker.cpp:99
MythVideoScanTracker::UnlockScan
void UnlockScan()
Definition: mythvideoscantracker.cpp:33
MythPlayerVideoUI::ProcessCallbacks
void ProcessCallbacks()
Definition: mythplayervideoui.cpp:152
MythPlayerAVSync::AVSync
std::chrono::microseconds AVSync(AudioPlayer *Audio, MythVideoFrame *Frame, std::chrono::microseconds FrameInterval, float PlaySpeed, bool HaveVideo, bool Force)
Definition: mythplayeravsync.cpp:77
ProgramInfo::IsRecording
bool IsRecording(void) const
Definition: programinfo.h:488
MythVideoOutput::GetLastShownFrame
virtual MythVideoFrame * GetLastShownFrame()
Returns frame from the head of the ready to be displayed queue, if StartDisplayingFrame has been call...
Definition: mythvideoout.cpp:316
TVPlaybackState::ChangeOSDDebug
void ChangeOSDDebug()
MythVideoOutput::RenderEnd
virtual void RenderEnd()=0
CommBreakMap::HasMap
bool HasMap(void) const
Definition: commbreakmap.h:29
MythPlayerUI::CanSupportDoubleRate
bool CanSupportDoubleRate()
Definition: mythplayerui.cpp:799
mythmainwindow.h
MythMediaBuffer::GetStorageRate
QString GetStorageRate(void)
Definition: mythmediabuffer.cpp:1539
is_interlaced
bool is_interlaced(FrameScanType Scan)
Definition: videoouttypes.h:188
MythPlayer::DoRewind
bool DoRewind(uint64_t frames, double inaccuracy)
Definition: mythplayer.cpp:1413
kOSDTimeout_Med
@ kOSDTimeout_Med
Definition: osd.h:60
MythPlayerUI::EventLoop
virtual void EventLoop()
Definition: mythplayerui.cpp:107
MythPlayer::kInaccuracyDefault
static const double kInaccuracyDefault
Definition: mythplayer.h:243
MythPlayerUI::StartPlaying
bool StartPlaying()
Definition: mythplayerui.cpp:64
DeleteMap::UpdateOSD
void UpdateOSD(uint64_t frame, double frame_rate, OSD *osd)
Show and update the edit mode On Screen Display.
Definition: deletemap.cpp:177
MythPlayerVideoUI::InitVideo
bool InitVideo() override
Definition: mythplayervideoui.cpp:31
DeleteMap::IsEditing
bool IsEditing(void) const
Definition: deletemap.h:40
MythMainWindow
Definition: mythmainwindow.h:35
TVPlaybackState::UpdateLastPlayPosition
void UpdateLastPlayPosition(uint64_t frame)
MythVideoOutput::UpdatePauseFrame
virtual void UpdatePauseFrame(std::chrono::milliseconds &, FrameScanType=kScan_Progressive)
Definition: mythvideoout.h:87
MythPlayer::Play
bool Play(float speed=1.0, bool normal=true, bool unpauseaudio=true)
Definition: mythplayer.cpp:185
kScan_Ignore
@ kScan_Ignore
Definition: videoouttypes.h:96
ProgramInfo::SaveLastPlayPos
void SaveLastPlayPos(uint64_t frame)
TODO Move to RecordingInfo.
Definition: programinfo.cpp:2717
MythMediaBuffer::Reset
void Reset(bool Full=false, bool ToAdjust=false, bool ResetInternal=false)
Resets the read-ahead thread and our position in the file.
Definition: mythmediabuffer.cpp:237
MythPlayer::m_killDecoder
bool volatile m_killDecoder
Definition: mythplayer.h:394
CommBreakMap::SkipCommercials
void SkipCommercials(int direction)
Definition: commbreakmap.cpp:41
MythMediaBuffer::IsOpen
virtual bool IsOpen(void) const =0
MythMediaBuffer::GetType
MythBufferType GetType() const
Definition: mythmediabuffer.cpp:203
MythPlayer::m_renderOneFrame
bool m_renderOneFrame
Definition: mythplayer.h:396
tv_play.h
MythPlayer::DecoderStart
virtual void DecoderStart(bool start_paused)
Definition: mythplayer.cpp:1028
MythVideoOutput::DoneDisplayingFrame
virtual void DoneDisplayingFrame(MythVideoFrame *Frame)
Releases frame returned from GetLastShownFrame() onto the queue of frames ready for decoding onto.
Definition: mythvideoout.cpp:417
MythPlayerUIBase::m_display
MythDisplay * m_display
Definition: mythplayeruibase.h:21
TV
Control TV playback.
Definition: tv_play.h:154