MythTV  master
mythplayerui.cpp
Go to the documentation of this file.
1 #include <algorithm>
2 
3 // MythTV
4 #include "mythsystemevent.h"
5 #include "audiooutput.h"
6 #include "mythmainwindow.h"
9 #include "interactivetv.h"
10 #include "osd.h"
11 #include "interactivescreen.h"
12 #include "tv_play.h"
13 #include "livetvchain.h"
14 #include "mythplayerui.h"
15 
16 #define LOC QString("PlayerUI: ")
17 
19  PlayerContext *Context, PlayerFlags Flags)
20  : MythPlayerEditorUI(MainWindow, Tv, Context, Flags),
22 {
23  // Finish setting up the overlays
24  m_osd.SetPlayer(this);
26 
27  // User feedback during slow seeks
28  connect(this, &MythPlayerUI::SeekingSlow, [&](int Count)
29  {
30  UpdateOSDMessage(tr("Searching") + QString().fill('.', Count % 3), kOSDTimeout_Short);
32  });
33 
34  // Seeking has finished
35  connect(this, &MythPlayerUI::SeekingComplete, [&]()
36  {
37  m_osdLock.lock();
39  m_osdLock.unlock();
40  });
41 
42  // Setup OSD debug
43  m_osdDebugTimer.setInterval(1s);
46 
47  // Other connections
51 }
52 
54 {
55  LOG(VB_GENERAL, LOG_INFO, LOC + "Initialising player state");
57 }
58 
60 {
61  if (OpenFile() < 0)
62  {
63  LOG(VB_GENERAL, LOG_ERR, LOC + "Unable to open video file.");
64  return false;
65  }
66 
67  m_framesPlayed = 0;
68  m_rewindTime = m_ffTime = 0;
70  m_jumpChapter = 0;
73 
74  if (!InitVideo())
75  {
76  LOG(VB_GENERAL, LOG_ERR, LOC + "Unable to initialize video.");
78  return false;
79  }
80 
81  EventStart();
82  DecoderStart(true);
83  InitialSeek();
84  VideoStart();
85 
86  m_playerThread->setPriority(QThread::TimeCriticalPriority);
87 #ifdef Q_OS_ANDROID
88  setpriority(PRIO_PROCESS, m_playerThreadId, -20);
89 #endif
92  return !IsErrored();
93 }
94 
96 {
97  // TODO handle initial commskip and/or cutlist skip as well
98  if (m_bookmarkSeek > 30)
100 }
101 
103 {
104  // Handle decoder callbacks
106 
107  // Live TV program change
108  if (m_fileChanged)
109  FileChanged();
110 
111  // Check if visualiser is wanted on first start and after video change
113  AutoVisualise(!m_videoDim.isEmpty());
114 
115  // recreate the osd if a reinit was triggered by another thread
116  if (m_reinitOsd)
117  ReinitOSD();
118 
119  // enable/disable forced subtitles if signalled by the decoder
124 
125  // reset the scan (and hence deinterlacers) if triggered by the decoder
127 
128  // refresh the position map for an in-progress recording while editing
130  {
131  if (m_editUpdateTimer.hasExpired(2000))
132  {
133  // N.B. the positionmap update and osd refresh are asynchronous
134  m_forcePositionMapSync = true;
135  m_osdLock.lock();
137  m_osdLock.unlock();
138  m_editUpdateTimer.start();
139  }
140  }
141 
142  // Refresh the programinfo in use status
143  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
146  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
147 
148  // Disable timestretch if we are too close to the end of the buffer
149  if (m_ffrewSkip == 1 && (m_playSpeed > 1.0F) && IsNearEnd())
150  {
151  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Near end, Slowing down playback.");
152  Play(1.0F, true, true);
153  }
154 
156  {
157  // Switch from the dummy recorder to the tuned program in livetv
158  m_playerCtx->m_tvchain->JumpToNext(true, 0s);
159  JumpToProgram();
160  }
161  else if ((!m_allPaused || GetEof() != kEofStateNone) &&
164  {
165  // Switch to the next program in livetv
167  SwitchToProgram();
168  }
169 
170  // Jump to the next program in livetv
172  {
173  JumpToProgram();
174  }
175 
176  // Change interactive stream if requested
177  if (!m_newStream.isEmpty())
178  {
180  m_newStream = QString();
181  }
182 
183  // Disable fastforward if we are too close to the end of the buffer
184  if (m_ffrewSkip > 1 && (CalcMaxFFTime(100, false) < 100))
185  {
186  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Near end, stopping fastforward.");
187  Play(1.0F, true, true);
188  }
189 
190  // Disable rewind if we are too close to the beginning of the buffer
191  if (m_ffrewSkip < 0 && CalcRWTime(-m_ffrewSkip) >= 0 &&
193  {
194  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Near start, stopping rewind.");
195  float stretch = (m_ffrewSkip > 0) ? 1.0F : m_audio.GetStretchFactor();
196  Play(stretch, true, true);
197  }
198 
199  // Check for error
201  {
202  LOG(VB_GENERAL, LOG_ERR, LOC + "Unknown recorder error, exiting decoder");
203  if (!IsErrored())
204  SetErrored(tr("Irrecoverable recorder error"));
205  m_killDecoder = true;
206  return;
207  }
208 
209  // Handle speed change
210  if (!qFuzzyCompare(m_playSpeed + 1.0F, m_nextPlaySpeed + 1.0F) &&
212  {
213  ChangeSpeed();
214  return;
215  }
216 
217  // Check if we got a communication error, and if so pause playback
219  {
220  Pause();
222  }
223 
224  // Handle end of file
225  EofState eof = GetEof();
226  if (HasReachedEof())
227  {
228 #ifdef USING_MHEG
230  {
231  Pause();
232  return;
233  }
234 #endif
236  {
237  LOG(VB_GENERAL, LOG_NOTICE, LOC + "LiveTV forcing JumpTo 1");
238  m_playerCtx->m_tvchain->JumpToNext(true, 0s);
239  return;
240  }
241 
242  bool videoDrained =
244  bool audioDrained =
245  !m_audio.GetAudioOutput() ||
246  m_audio.IsPaused() ||
248  if (eof != kEofStateDelayed || (videoDrained && audioDrained))
249  {
250  if (eof == kEofStateDelayed)
251  {
252  LOG(VB_PLAYBACK, LOG_INFO,
253  QString("waiting for no video frames %1")
255  }
256  LOG(VB_PLAYBACK, LOG_INFO,
257  QString("HasReachedEof() at framesPlayed=%1 totalFrames=%2")
258  .arg(m_framesPlayed).arg(GetCurrentFrameCount()));
259  Pause();
260  SetPlaying(false);
261  return;
262  }
263  }
264 
265  // Handle rewind
266  if (m_rewindTime > 0 && (m_ffrewSkip == 1 || m_ffrewSkip == 0))
267  {
269  if (m_rewindTime > 0)
270  DoRewind(static_cast<uint64_t>(m_rewindTime), kInaccuracyDefault);
271  }
272 
273  // Handle fast forward
274  if (m_ffTime > 0 && (m_ffrewSkip == 1 || m_ffrewSkip == 0))
275  {
277  if (m_ffTime > 0)
278  {
279  DoFastForward(static_cast<uint64_t>(m_ffTime), kInaccuracyDefault);
280  if (GetEof() != kEofStateNone)
281  return;
282  }
283  }
284 
285  // Handle chapter jump
286  if (m_jumpChapter != 0)
288 
289  // Handle commercial skipping
290  if (m_commBreakMap.GetSkipCommercials() != 0 && (m_ffrewSkip == 1))
291  {
292  if (!m_commBreakMap.HasMap())
293  {
294  //: The commercials/adverts have not been flagged
295  SetOSDStatus(tr("Not Flagged"), kOSDTimeout_Med);
296  QString message = "COMMFLAG_REQUEST ";
297  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
298  message += QString("%1").arg(m_playerCtx->m_playingInfo->GetChanID()) +
300  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
301  gCoreContext->SendMessage(message);
302  }
303  else
304  {
305  QString msg;
306  uint64_t jumpto = 0;
307  uint64_t frameCount = GetCurrentFrameCount();
308  // XXX CommBreakMap should use duration map not m_videoFrameRate
309  bool jump = m_commBreakMap.DoSkipCommercials(jumpto, m_framesPlayed,
311  frameCount, msg);
312  if (!msg.isEmpty())
314  if (jump)
316  }
318  return;
319  }
320 
321  // Handle automatic commercial skipping
322  uint64_t jumpto = 0;
323  if (m_deleteMap.IsEmpty() && (m_ffrewSkip == 1) &&
326  {
327  QString msg;
328  uint64_t frameCount = GetCurrentFrameCount();
329  // XXX CommBreakMap should use duration map not m_videoFrameRate
332  frameCount, msg);
333  if (!msg.isEmpty())
335  if (jump)
337  }
338 
339  // Handle cutlist skipping
340  if (!m_allPaused && (m_ffrewSkip == 1) &&
342  {
343  if (jumpto == m_totalFrames)
344  {
347  }
348  else
349  {
351  }
352  }
353 }
354 
356 {
357 #ifdef USING_MHEG
358  // handle Interactive TV
359  if (GetInteractiveTV())
360  {
361  m_osdLock.lock();
362  m_itvLock.lock();
363  auto *window = qobject_cast<InteractiveScreen *>(m_captionsOverlay.GetWindow(OSD_WIN_INTERACT));
364  if ((m_interactiveTV->ImageHasChanged() || !m_itvVisible) && window)
365  {
367  m_itvVisible = true;
368  }
369  m_itvLock.unlock();
370  m_osdLock.unlock();
371  }
372 #endif // USING_MHEG
373 }
374 
376 {
378  // ensure we re-check double rate support following a speed change
379  UnlockScan();
380 }
381 
382 void MythPlayerUI::ReinitVideo(bool ForceUpdate)
383 {
384  MythPlayer::ReinitVideo(ForceUpdate);
385 
386  // Signal to the main thread to reinit OSD
387  m_reinitOsd = true;
388 
389  // Signal to main thread to reinit subtitles
391  emit EnableSubtitles(true);
392 
393  // Signal to the main thread to check auto visualise
394  m_checkAutoVisualise = true;
395 }
396 
398 {
399  QRect visible;
400  QRect total;
401  float aspect = NAN;
402  float scaling = NAN;
403 
404  m_osdLock.lock();
405  m_videoOutput->GetOSDBounds(total, visible, aspect, scaling, 1.0F);
406  m_osd.Init(visible, aspect);
407  m_captionsOverlay.Init(visible, aspect);
409 
410 #ifdef USING_MHEG
411  if (GetInteractiveTV())
412  {
413  QMutexLocker locker(&m_itvLock);
414  m_interactiveTV->Reinit(total, visible, aspect);
415  }
416 #endif // USING_MHEG
417 
418  // If there is a forced text subtitle track (which is possible
419  // in e.g. a .mkv container), and forced subtitles are
420  // allowed, then start playback with that subtitle track
421  // selected. Otherwise, use the frontend settings to decide
422  // which captions/subtitles (if any) to enable at startup.
423  // TODO: modify the fix to #10735 to use this approach
424  // instead.
425  bool hasForcedTextTrack = false;
426  uint forcedTrackNumber = 0;
428  {
429  uint numTextTracks = m_decoder->GetTrackCount(kTrackTypeRawText);
430  for (uint i = 0; !hasForcedTextTrack && i < numTextTracks; ++i)
431  {
433  {
434  hasForcedTextTrack = true;
435  forcedTrackNumber = i;
436  }
437  }
438  }
439  if (hasForcedTextTrack)
440  SetTrack(kTrackTypeRawText, static_cast<uint>(forcedTrackNumber));
441  else
443 
444  m_osdLock.unlock();
445 
446  SetPlaying(true);
447  ClearAfterSeek(false);
450 
453  AutoVisualise(!m_videoDim.isEmpty());
454 }
455 
457 {
458  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
459  {
461  {
462  // When initial playback gets underway, we override the ProgramInfo
463  // flags such that future calls to GetBookmark() will consider only
464  // an actual bookmark and not progstart or lastplaypos information.
468  }
469  }
470  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
472 }
473 
475 {
477 
478  if (m_videoPaused || m_isDummy)
480  else
482 
485  else if (m_decoder && m_decoder->GetEof() != kEofStateNone)
486  ++m_framesPlayed;
487  else
488  m_framesPlayed = static_cast<uint64_t>(m_videoOutput->GetFramesPlayed());
489  return !IsErrored();
490 }
491 
493 {
494  SetFrameInterval(GetScanType(), 1.0 / (m_videoFrameRate * static_cast<double>(m_playSpeed)));
496  LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("Display Refresh Rate: %1 Video Frame Rate: %2")
497  .arg(1000000.0 / m_display->GetRefreshInterval(m_frameInterval).count(), 0, 'f', 3)
498  .arg(1000000.0 / m_frameInterval.count(), 0, 'f', 3));
499 }
500 
501 void MythPlayerUI::RenderVideoFrame(MythVideoFrame *Frame, FrameScanType Scan, bool Prepare, std::chrono::microseconds Wait)
502 {
503  if (!m_videoOutput)
504  return;
505 
506  if (Prepare)
512  m_osd.Draw();
514 
515  if (Wait > 0us)
516  m_avSync.WaitForFrame(Wait);
517 
519 }
520 
522 {
523  m_fileChanged = false;
524  LOG(VB_PLAYBACK, LOG_INFO, LOC + "FileChanged");
525 
526  Pause();
527  ChangeSpeed();
528  if (dynamic_cast<AvFormatDecoder *>(m_decoder))
529  m_playerCtx->m_buffer->Reset(false, true);
530  else
531  m_playerCtx->m_buffer->Reset(false, true, true);
533  Play();
534 
536 
537  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
539  if (m_decoder)
541  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
542 
543  CheckTVChain();
544  m_forcePositionMapSync = true;
545 }
546 
548 {
550  {
552  {
554  m_needNewPauseFrame = false;
555 
556  if (m_deleteMap.IsEditing())
557  {
558  m_osdLock.lock();
560  m_osdLock.unlock();
561  }
562  }
563  else
564  {
565  m_decodeOneFrame = true;
566  }
567  }
568 }
569 
570 void MythPlayerUI::DoDisplayVideoFrame(MythVideoFrame* Frame, std::chrono::microseconds Due)
571 {
572  if (Due < 0us)
573  {
574  m_videoOutput->SetFramesPlayed(static_cast<long long>(++m_framesPlayed));
575  }
576  else if (!FlagIsSet(kVideoIsNull) && Frame)
577  {
578 
579  // Check scan type
580  bool showsecondfield = false;
581  FrameScanType ps = GetScanForDisplay(Frame, showsecondfield);
582 
583  // if we get here, we're actually going to do video output
584  RenderVideoFrame(Frame, ps, true, Due);
585 
586  // Only double rate CPU deinterlacers require an extra call to PrepareFrame
587  bool secondprepare = Frame->GetDoubleRateOption(DEINT_CPU) && !Frame->GetDoubleRateOption(DEINT_SHADER);
588  // and the first deinterlacing pass will have marked the frame as already deinterlaced
589  // which will break GetScanForDisplay below and subsequent deinterlacing
590  bool olddeinterlaced = Frame->m_alreadyDeinterlaced;
591  if (secondprepare)
592  Frame->m_alreadyDeinterlaced = false;
593  // Update scan settings now that deinterlacer has been set and we know
594  // whether we need a second field
595  ps = GetScanForDisplay(Frame, showsecondfield);
596 
597  // Reset olddeinterlaced if necessary (pause frame etc)
598  if (!showsecondfield && secondprepare)
599  {
600  Frame->m_alreadyDeinterlaced = olddeinterlaced;
601  }
602  else if (showsecondfield)
603  {
604  // Second field
605  if (kScan_Interlaced == ps)
606  ps = kScan_Intr2ndField;
607  RenderVideoFrame(Frame, ps, secondprepare, Due + m_frameInterval / 2);
608  }
609  }
610  else
611  {
612  m_avSync.WaitForFrame(Due);
613  }
614 }
615 
617 {
618  if (!m_videoOutput)
619  return;
620 
621  if (m_videoOutput->IsErrored())
622  {
623  SetErrored(tr("Serious error detected in Video Output"));
624  return;
625  }
626 
627  // clear the buffering state
628  SetBuffering(false);
629 
631  PreProcessNormalFrame(); // Allow interactiveTV to draw on pause frame
632 
635  RenderVideoFrame(nullptr, scan, true, 0ms);
636 }
637 
638 void MythPlayerUI::DisplayNormalFrame(bool CheckPrebuffer)
639 {
640  if (m_allPaused)
641  return;
642 
643  if (CheckPrebuffer && !PrebufferEnoughFrames())
644  return;
645 
646  // clear the buffering state
647  SetBuffering(false);
648 
649  // retrieve the next frame
652 
653  // Check aspect ratio
654  CheckAspectRatio(frame);
655 
657  UpdateFFRewSkip();
658 
659  // Player specific processing (dvd, bd, mheg etc)
661 
662  // handle scan type changes
664 
665  // Detect letter boxing
666  // FIXME this is temporarily moved entirely into the main thread as there are
667  // too many threading issues and the decoder thread is not yet ready to handle
668  // QObject signals and slots.
669  // When refactoring is complete, move it into the decoder thread and
670  // signal switches via a new field in MythVideoFrame
673  {
675  ReinitOSD();
676  }
677 
678  // When is the next frame due
679  std::chrono::microseconds due = m_avSync.AVSync(&m_audio, frame, m_frameInterval, m_playSpeed, !m_videoDim.isEmpty(),
681  // Display it
682  DoDisplayVideoFrame(frame, due);
685 }
686 
687 void MythPlayerUI::SetVideoParams(int Width, int Height, double FrameRate, float Aspect,
688  bool ForceUpdate, int ReferenceFrames,
689  FrameScanType Scan, const QString &CodecName)
690 {
691  MythPlayer::SetVideoParams(Width, Height, FrameRate, Aspect, ForceUpdate, ReferenceFrames,
692  Scan, CodecName);
693 
694  // ensure deinterlacers are correctly reset after a change
695  UnlockScan();
696  FrameScanType newscan = DetectInterlace(Scan, static_cast<float>(m_videoFrameRate), m_videoDispDim.height());
698  ResetTracker();
699 }
700 
715 void MythPlayerUI::SetWatched(bool ForceWatched)
716 {
717  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
719  {
720  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
721  return;
722  }
723 
724  uint64_t numFrames = GetCurrentFrameCount();
725 
726  // For recordings we want to ignore the post-roll and account for
727  // in-progress recordings where totalFrames doesn't represent
728  // the full length of the recording. For videos we can only rely on
729  // totalFrames as duration metadata can be wrong
732  {
733 
734  // If the recording is stopped early we need to use the recording end
735  // time, not the programme end time
737  qint64 starttime = pi->GetRecordingStartTime().toSecsSinceEpoch();
738  qint64 endactual = pi->GetRecordingEndTime().toSecsSinceEpoch();
739  qint64 endsched = pi->GetScheduledEndTime().toSecsSinceEpoch();
740  qint64 endtime = std::min(endactual, endsched);
741  numFrames = static_cast<uint64_t>((endtime - starttime) * m_videoFrameRate);
742  }
743 
744  // 4 minutes min, 12 minutes max
745  auto offset = std::chrono::seconds(lround(0.14 * (numFrames / m_videoFrameRate)));
746  offset = std::clamp(offset, 240s, 720s);
747 
748  if (ForceWatched || (m_framesPlayed > (numFrames - (offset.count() * m_videoFrameRate))))
749  {
751  LOG(VB_GENERAL, LOG_INFO, LOC + QString("Marking recording as watched using offset %1 minutes")
752  .arg(offset.count()/60));
753  }
754 
755  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
756 }
757 
759 {
760  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
763  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
764 }
765 
767 {
768  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
771  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
772 }
773 
775 {
776  std::chrono::microseconds refreshinterval = 1us;
777  if (m_display)
778  refreshinterval = m_display->GetRefreshInterval(m_frameInterval);
779 
780  // At this point we may not have the correct frame rate.
781  // Since interlaced is always at 25 or 30 fps, if the interval
782  // is less than 30000 (33fps) it must be representing one
783  // field and not one frame, so multiply by 2.
784  std::chrono::microseconds realfi = m_frameInterval;
785  if (m_frameInterval < 30ms)
786  realfi = m_frameInterval * 2;
787  return (duration_cast<floatusecs>(realfi) / 2.0) > (duration_cast<floatusecs>(refreshinterval) * 0.995);
788 }
789 
791 {
792  QString samplerate = MythMediaBuffer::BitrateToString(static_cast<uint64_t>(m_audio.GetSampleRate()), true);
793  Map.insert("samplerate", samplerate);
794  Map.insert("filename", m_playerCtx->m_buffer->GetSafeFilename());
795  Map.insert("decoderrate", m_playerCtx->m_buffer->GetDecoderRate());
796  Map.insert("storagerate", m_playerCtx->m_buffer->GetStorageRate());
797  Map.insert("bufferavail", m_playerCtx->m_buffer->GetAvailableBuffer());
798  Map.insert("buffersize", QString::number(m_playerCtx->m_buffer->GetBufferSize() >> 20));
799  m_avSync.GetAVSyncData(Map);
800 
801  if (m_videoOutput)
802  {
803  QString frames = QString("%1/%2").arg(m_videoOutput->ValidVideoFrames())
805  Map.insert("videoframes", frames);
806  }
807  if (m_decoder)
808  Map["videodecoder"] = m_decoder->GetCodecDecoderName();
809 
810  Map["framerate"] = QString("%1%2%3")
811  .arg(static_cast<double>(m_outputJmeter.GetLastFPS()), 0, 'f', 2).arg(QChar(0xB1, 0))
812  .arg(static_cast<double>(m_outputJmeter.GetLastSD()), 0, 'f', 2);
813  Map["load"] = m_outputJmeter.GetLastCPUStats();
814 
815  GetCodecDescription(Map);
816 }
817 
819 {
820  Map["audiocodec"] = ff_codec_id_string(m_audio.GetCodec());
821  Map["audiochannels"] = QString::number(m_audio.GetOrigChannels());
822 
823  int width = m_videoDispDim.width();
824  int height = m_videoDispDim.height();
825  Map["videocodec"] = GetEncodingType();
826  if (m_decoder)
827  Map["videocodecdesc"] = m_decoder->GetRawEncodingType();
828  Map["videowidth"] = QString::number(width);
829  Map["videoheight"] = QString::number(height);
830  Map["videoframerate"] = QString::number(m_videoFrameRate, 'f', 2);
831  Map["deinterlacer"] = GetDeinterlacerName();
832 
833  if (width < 640)
834  return;
835 
836  bool interlaced = is_interlaced(GetScanType());
837  if (height > 2100)
838  Map["videodescrip"] = interlaced ? "UHD_4K_I" : "UHD_4K_P";
839  else if (width == 1920 || height == 1080 || height == 1088)
840  Map["videodescrip"] = interlaced ? "HD_1080_I" : "HD_1080_P";
841  else if ((width == 1280 || height == 720) && !interlaced)
842  Map["videodescrip"] = "HD_720_P";
843  else if (height >= 720)
844  Map["videodescrip"] = "HD";
845  else
846  Map["videodescrip"] = "SD";
847 }
848 
850 {
852  if (Visible)
853  {
854  // This should already have enabled the required monitors
855  m_osdDebugTimer.start();
856  }
857  else
858  {
859  // If we have cleared/escaped the debug OSD screen, then ChangeOSDDebug
860  // is not called, so we need to ensure we turn off the monitors
861  m_osdDebugTimer.stop();
864  }
865 }
866 
868 {
869  m_osdLock.lock();
870  InfoMap infoMap;
871  GetPlaybackData(infoMap);
874  m_osdLock.unlock();
875 }
876 
878 {
879  m_osdLock.lock();
880  bool enable = !m_osdDebug;
881  EnableBitrateMonitor(enable);
882  EnableFrameRateMonitor(enable);
883  if (enable)
884  UpdateOSDDebug();
885  else
887  m_osdDebug = enable;
888  m_osdLock.unlock();
889 }
890 
892 {
893  bool enable = VERBOSE_LEVEL_CHECK(VB_PLAYBACK, LOG_ANY) || Enable;
894  m_outputJmeter.SetNumCycles(enable ? static_cast<int>(m_videoFrameRate) : 0);
895 }
896 
898 {
899  if (m_playerCtx->m_buffer)
901 }
902 
903 /* JumpToStream, JumpToProgram and SwitchToProgram all need to be moved into the
904  * parent object and hopefully simplified. The fairly involved logic does not
905  * sit well with the new design objectives for the player classes and are better
906  * suited to the high level logic in TV.
907  */
908 void MythPlayerUI::JumpToStream(const QString &stream)
909 {
910  LOG(VB_PLAYBACK, LOG_INFO, LOC + "JumpToStream - begin");
911 
912  // Shouldn't happen
913  if (stream.isEmpty())
914  return;
915 
916  Pause();
917  ResetCaptions();
918 
919  ProgramInfo pginfo(stream);
920  SetPlayingInfo(pginfo);
921 
924  else
925  m_playerCtx->m_buffer->OpenFile(stream);
926 
927  if (!m_playerCtx->m_buffer->IsOpen())
928  {
929  LOG(VB_GENERAL, LOG_ERR, LOC + "JumpToStream buffer OpenFile failed");
931  SetErrored(tr("Error opening remote stream buffer"));
932  return;
933  }
934 
935  m_watchingRecording = false;
936  m_totalLength = 0s;
937  m_totalFrames = 0;
938  m_totalDuration = 0s;
939 
940  // 120 retries ~= 60 seconds
941  if (OpenFile(120) < 0)
942  {
943  LOG(VB_GENERAL, LOG_ERR, LOC + "JumpToStream OpenFile failed.");
945  SetErrored(tr("Error opening remote stream"));
946  return;
947  }
948 
949  if (m_totalLength == 0s)
950  {
951  long long len = m_playerCtx->m_buffer->GetRealFileSize();
952  m_totalLength = std::chrono::seconds(len / ((m_decoder->GetRawBitrate() * 1000) / 8));
953  m_totalFrames = static_cast<uint64_t>(m_totalLength.count() * SafeFPS());
954  }
955 
956  LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("JumpToStream length %1 bytes @ %2 Kbps = %3 Secs, %4 frames @ %5 fps")
958  .arg(m_totalLength.count()).arg(m_totalFrames).arg(m_decoder->GetFPS()) );
959 
961 
962  // the bitrate is reset by m_playerCtx->m_buffer->OpenFile()...
964  m_decoder->SetProgramInfo(pginfo);
965 
966  Play();
967  ChangeSpeed();
968 
970 #ifdef USING_MHEG
972 #endif
973 
974  LOG(VB_PLAYBACK, LOG_INFO, LOC + "JumpToStream - end");
975 }
976 
978 {
979  if (!IsReallyNearEnd())
980  return;
981 
982  LOG(VB_PLAYBACK, LOG_INFO, LOC + "SwitchToProgram - start");
983  bool discontinuity = false;
984  bool newtype = false;
985  int newid = -1;
986  ProgramInfo *pginfo = m_playerCtx->m_tvchain->GetSwitchProgram(discontinuity, newtype, newid);
987  if (!pginfo)
988  return;
989 
990  bool newIsDummy = m_playerCtx->m_tvchain->GetInputType(newid) == "DUMMY";
991 
992  SetPlayingInfo(*pginfo);
993  Pause();
994  ChangeSpeed();
995 
996  // Release all frames to ensure the current decoder resources are released
997  DiscardVideoFrames(true, true);
998 
999  if (newIsDummy)
1000  {
1001  OpenDummy();
1002  ResetPlaying();
1004  delete pginfo;
1005  return;
1006  }
1007 
1009  {
1010  // Restore original ringbuffer
1011  auto *ic = dynamic_cast<MythInteractiveBuffer*>(m_playerCtx->m_buffer);
1012  if (ic)
1013  m_playerCtx->m_buffer = ic->TakeBuffer();
1014  delete ic;
1015  }
1016 
1018 
1019  if (!m_playerCtx->m_buffer->IsOpen())
1020  {
1021  LOG(VB_GENERAL, LOG_ERR, LOC + QString("SwitchToProgram's OpenFile failed (input type: %1)")
1022  .arg(m_playerCtx->m_tvchain->GetInputType(newid)));
1023  LOG(VB_GENERAL, LOG_ERR, m_playerCtx->m_tvchain->toString());
1025  SetErrored(tr("Error opening switch program buffer"));
1026  delete pginfo;
1027  return;
1028  }
1029 
1030  if (GetEof() != kEofStateNone)
1031  {
1032  discontinuity = true;
1033  ResetCaptions();
1034  }
1035 
1036  LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("SwitchToProgram(void) "
1037  "discont: %1 newtype: %2 newid: %3 decoderEof: %4")
1038  .arg(discontinuity).arg(newtype).arg(newid).arg(GetEof()));
1039 
1040  if (discontinuity || newtype)
1041  {
1042  m_playerCtx->m_tvchain->SetProgram(*pginfo);
1043  if (m_decoder)
1044  m_decoder->SetProgramInfo(*pginfo);
1045 
1046  m_playerCtx->m_buffer->Reset(true);
1047  if (newtype)
1048  {
1049  if (OpenFile() < 0)
1050  SetErrored(tr("Error opening switch program file"));
1051  }
1052  else
1053  ResetPlaying();
1054  }
1055  else
1056  {
1058  if (m_decoder)
1059  {
1062  }
1063  }
1064  delete pginfo;
1065 
1066  if (IsErrored())
1067  {
1068  LOG(VB_GENERAL, LOG_ERR, LOC + "SwitchToProgram failed.");
1070  return;
1071  }
1072 
1074 
1075  // the bitrate is reset by m_playerCtx->m_buffer->OpenFile()...
1076  if (m_decoder)
1079 
1080  if (discontinuity || newtype)
1081  {
1082  CheckTVChain();
1083  m_forcePositionMapSync = true;
1084  }
1085 
1086  Play();
1087  LOG(VB_PLAYBACK, LOG_INFO, LOC + "SwitchToProgram - end");
1088 }
1089 
1091 {
1092  LOG(VB_PLAYBACK, LOG_INFO, LOC + "JumpToProgram - start");
1093  bool discontinuity = false;
1094  bool newtype = false;
1095  int newid = -1;
1096  std::chrono::seconds nextpos = m_playerCtx->m_tvchain->GetJumpPos();
1097  ProgramInfo *pginfo = m_playerCtx->m_tvchain->GetSwitchProgram(discontinuity, newtype, newid);
1098  if (!pginfo)
1099  return;
1100 
1101  m_inJumpToProgramPause = true;
1102 
1103  bool newIsDummy = m_playerCtx->m_tvchain->GetInputType(newid) == "DUMMY";
1104  SetPlayingInfo(*pginfo);
1105 
1106  Pause();
1107  ChangeSpeed();
1108  ResetCaptions();
1109 
1110  // Release all frames to ensure the current decoder resources are released
1111  DiscardVideoFrames(true, true);
1112 
1113  m_playerCtx->m_tvchain->SetProgram(*pginfo);
1114  m_playerCtx->m_buffer->Reset(true);
1115 
1116  if (newIsDummy)
1117  {
1118  OpenDummy();
1119  ResetPlaying();
1121  delete pginfo;
1122  m_inJumpToProgramPause = false;
1123  return;
1124  }
1125 
1126  SendMythSystemPlayEvent("PLAY_CHANGED", pginfo);
1127 
1129  {
1130  // Restore original ringbuffer
1131  auto *ic = dynamic_cast<MythInteractiveBuffer*>(m_playerCtx->m_buffer);
1132  if (ic)
1133  m_playerCtx->m_buffer = ic->TakeBuffer();
1134  delete ic;
1135  }
1136 
1138  if (!m_playerCtx->m_buffer->IsOpen())
1139  {
1140  LOG(VB_GENERAL, LOG_ERR, LOC + QString("JumpToProgram's OpenFile failed (input type: %1)")
1141  .arg(m_playerCtx->m_tvchain->GetInputType(newid)));
1142  LOG(VB_GENERAL, LOG_ERR, m_playerCtx->m_tvchain->toString());
1144  SetErrored(tr("Error opening jump program file buffer"));
1145  delete pginfo;
1146  m_inJumpToProgramPause = false;
1147  return;
1148  }
1149 
1151 
1152  bool wasDummy = m_isDummy;
1153  if (newtype || wasDummy)
1154  {
1155  if (OpenFile() < 0)
1156  SetErrored(tr("Error opening jump program file"));
1157  }
1158  else
1159  ResetPlaying();
1160 
1161  if (IsErrored() || !m_decoder)
1162  {
1163  LOG(VB_GENERAL, LOG_ERR, LOC + "JumpToProgram failed.");
1164  if (!IsErrored())
1165  SetErrored(tr("Error reopening video decoder"));
1166  delete pginfo;
1167  m_inJumpToProgramPause = false;
1168  return;
1169  }
1170 
1172 
1173  // the bitrate is reset by m_playerCtx->m_buffer->OpenFile()...
1176 
1177  m_decoder->SetProgramInfo(*pginfo);
1178  delete pginfo;
1179 
1180  CheckTVChain();
1181  m_forcePositionMapSync = true;
1182  m_inJumpToProgramPause = false;
1183  Play();
1184  ChangeSpeed();
1185 
1186  // check that we aren't too close to the end of program.
1187  // and if so set it to 10s from the end if completed recordings
1188  // or 3s if live
1189  std::chrono::seconds duration = m_playerCtx->m_tvchain->GetLengthAtCurPos();
1190  std::chrono::seconds maxpos = m_playerCtx->m_tvchain->HasNext() ? 10s : 3s;
1191 
1192  if (nextpos > (duration - maxpos))
1193  {
1194  nextpos = duration - maxpos;
1195  if (nextpos < 0s)
1196  nextpos = 0s;
1197  }
1198  else if (nextpos < 0s)
1199  {
1200  // it's a relative position to the end
1201  nextpos += duration;
1202  }
1203 
1204  // nextpos is the new position to use in seconds
1205  uint64_t nextframe = TranslatePositionMsToFrame(nextpos, true);
1206 
1207  if (nextpos > 10s)
1208  DoJumpToFrame(nextframe, kInaccuracyNone);
1209 
1211  LOG(VB_PLAYBACK, LOG_INFO, LOC + "JumpToProgram - end");
1212 }
MythPlayer::IsNearEnd
bool IsNearEnd(void)
Returns true iff near end of recording.
Definition: mythplayer.cpp:1532
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:206
MythPlayerUI::SetBookmark
virtual void SetBookmark(bool Clear=false)
Definition: mythplayerui.cpp:758
OSD_WIN_INTERACT
#define OSD_WIN_INTERACT
Definition: mythcaptionsoverlay.h:9
MythPlayerUI::VideoStart
virtual void VideoStart()
Definition: mythplayerui.cpp:397
PlayerContext::IsRecorderErrored
bool IsRecorderErrored(void) const
Definition: playercontext.cpp:140
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:333
MythPlayer::m_enableForcedSubtitles
bool m_enableForcedSubtitles
Definition: mythplayer.h:470
MythCoreContext::SendMessage
void SendMessage(const QString &message)
Definition: mythcorecontext.cpp:1543
hardwareprofile.smolt.timeout
float timeout
Definition: smolt.py:103
MythPlayer::m_videoPaused
bool m_videoPaused
Definition: mythplayer.h:400
PlayerContext::UnlockPlayingInfo
void UnlockPlayingInfo(const char *file, int line) const
Definition: playercontext.cpp:245
MythPlayer::m_watchingRecording
bool m_watchingRecording
Definition: mythplayer.h:411
MythPlayerUI::InitialiseState
void InitialiseState() override
Definition: mythplayerui.cpp:53
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:616
MythPlayer::SetEof
void SetEof(EofState eof)
Definition: mythplayer.cpp:1063
MythPlayer::m_inJumpToProgramPause
bool m_inJumpToProgramPause
Definition: mythplayer.h:393
MythCaptionsOverlay::EnableSubtitles
void EnableSubtitles(int Type, bool ForcedOnly=false)
Definition: mythcaptionsoverlay.cpp:187
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:2681
kScan_Detect
@ kScan_Detect
Definition: videoouttypes.h:97
mythplayerui.h
MythPlayer::m_commBreakMap
CommBreakMap m_commBreakMap
Definition: mythplayer.h:482
CommBreakMap::DoSkipCommercials
bool DoSkipCommercials(uint64_t &jumpToFrame, uint64_t framesPlayed, double video_frame_rate, uint64_t totalFrames, QString &comm_msg)
Definition: commbreakmap.cpp:248
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:1363
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:405
Jitterometer::SetNumCycles
void SetNumCycles(int cycles)
Definition: jitterometer.cpp:65
MythPlayerVisualiserUI::PrepareVisualiser
void PrepareVisualiser()
Definition: mythplayervisualiserui.cpp:131
MythPlayer::SeekingSlow
void SeekingSlow(int Count)
MythPlayer::m_avSync
MythPlayerAVSync m_avSync
Definition: mythplayer.h:437
MythPlayerUI::EnableFrameRateMonitor
void EnableFrameRateMonitor(bool Enable=false)
Definition: mythplayerui.cpp:891
MythPlayer::m_playSpeed
float m_playSpeed
Definition: mythplayer.h:495
MythVideoOutput::FreeVideoFrames
int FreeVideoFrames()
Returns number of frames available for decoding onto.
Definition: mythvideoout.cpp:283
MythPlayer::m_frameInterval
std::chrono::microseconds m_frameInterval
always adjusted for play_speed
Definition: mythplayer.h:497
kMusicChoice
@ kMusicChoice
Definition: mythplayer.h:77
MythPlayer::CheckTVChain
void CheckTVChain()
Definition: mythplayer.cpp:913
MythPlayer::OpenFile
virtual int OpenFile(int Retries=4)
Definition: mythplayer.cpp:415
MythPlayerUI::EventStart
virtual void EventStart()
Definition: mythplayerui.cpp:456
MythVideoBounds::GetDisplayVisibleRect
QRect GetDisplayVisibleRect(void) const
Definition: mythvideobounds.h:73
MythPlayerUI::GetCodecDescription
void GetCodecDescription(InfoMap &Map)
Definition: mythplayerui.cpp:818
MythPlayerUI::DisplayNormalFrame
virtual void DisplayNormalFrame(bool CheckPrebuffer=true)
Definition: mythplayerui.cpp:638
MythMediaBuffer::EnableBitrateMonitor
void EnableBitrateMonitor(bool Enable)
Definition: mythmediabuffer.cpp:313
MythPlayerCaptionsUI::m_itvVisible
bool m_itvVisible
Definition: mythplayercaptionsui.h:77
MythPlayer::PrebufferEnoughFrames
virtual bool PrebufferEnoughFrames(int min_buffers=0)
Definition: mythplayer.cpp:702
MythPlayer::m_totalDuration
std::chrono::seconds m_totalDuration
Definition: mythplayer.h:434
Frame
Definition: zmdefines.h:93
PlayerContext::SetPlayerChangingBuffers
void SetPlayerChangingBuffers(bool val)
Definition: playercontext.h:92
MythPlayer::m_forcePositionMapSync
bool m_forcePositionMapSync
Definition: mythplayer.h:483
MythMediaBuffer::GetDecoderRate
QString GetDecoderRate(void)
Definition: mythmediabuffer.cpp:1533
MythMediaBuffer::kLiveTVOpenTimeout
static constexpr std::chrono::milliseconds kLiveTVOpenTimeout
Definition: mythmediabuffer.h:63
MythPlayer::HasReachedEof
virtual bool HasReachedEof(void) const
Definition: mythplayer.cpp:638
MythPlayerUI::MythPlayerUI
MythPlayerUI(MythMainWindow *MainWindow, TV *Tv, PlayerContext *Context, PlayerFlags Flags)
Definition: mythplayerui.cpp:18
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:630
MythPlayer::m_ffrewSkip
int m_ffrewSkip
Definition: mythplayer.h:499
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:355
MythPlayer::IsErrored
bool IsErrored(void) const
Definition: mythplayer.cpp:1975
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:697
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:1747
MythPlayer::GetCurrentFrameCount
uint64_t GetCurrentFrameCount(void) const
Definition: mythplayer.cpp:1765
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:244
MythPlayer::CalcRWTime
long long CalcRWTime(long long rw) const
CalcRWTime(rw): rewind rw frames back.
Definition: mythplayer.cpp:1421
PlayerFlags
PlayerFlags
Definition: mythplayer.h:65
mythinteractivebuffer.h
mythsystemevent.h
MythPlayerVisualiserUI::RenderVisualiser
void RenderVisualiser()
Definition: mythplayervisualiserui.cpp:142
MythPlayer::GetEof
EofState GetEof(void) const
Definition: mythplayer.cpp:1050
MythPlayer::Pause
bool Pause(void)
Definition: mythplayer.cpp:154
kOSDTimeout_None
@ kOSDTimeout_None
Definition: osd.h:59
MythMediaBuffer::SetAdjustFilesize
long long SetAdjustFilesize(void)
Definition: mythmediabuffer.cpp:1152
MythPlayerUI::m_osdDebugTimer
QTimer m_osdDebugTimer
Definition: mythplayerui.h:67
MythPlayerUI::EnableBitrateMonitor
void EnableBitrateMonitor(bool Enable=false)
Definition: mythplayerui.cpp:897
MythPlayerAVSync::DisplayTimecode
std::chrono::milliseconds & DisplayTimecode()
Definition: mythplayeravsync.cpp:35
MythPlayer::m_nextPlaySpeed
float m_nextPlaySpeed
Definition: mythplayer.h:494
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:474
MythMediaBuffer::UpdateRawBitrate
void UpdateRawBitrate(uint RawBitrate)
Set the raw bit rate, to allow RingBuffer adjust effective bitrate.
Definition: mythmediabuffer.cpp:277
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:391
DecoderBase::SetWaitForChange
void SetWaitForChange(void)
Definition: decoderbase.cpp:899
MythPlayer::SeekingComplete
void SeekingComplete()
MythPlayerUI::ReinitVideo
void ReinitVideo(bool ForceUpdate) override
Definition: mythplayerui.cpp:382
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:1500
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:10
LiveTVChain::GetJumpPos
std::chrono::seconds GetJumpPos(void)
Returns the jump position in seconds and clears it.
Definition: livetvchain.cpp:672
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:1951
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:1735
MythPlayer::DiscardVideoFrames
void DiscardVideoFrames(bool KeyFrame, bool Flushed)
Places frames in the available frames queue.
Definition: mythplayer.cpp:632
MythPlayer::m_needNewPauseFrame
bool m_needNewPauseFrame
Definition: mythplayer.h:398
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:244
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:1553
MythPlayerUI::DoDisplayVideoFrame
void DoDisplayVideoFrame(MythVideoFrame *Frame, std::chrono::microseconds Due)
Definition: mythplayerui.cpp:570
InfoMap
QHash< QString, QString > InfoMap
Definition: mythtypes.h:15
AudioPlayer::IsPaused
bool IsPaused(void)
Definition: audioplayer.cpp:188
MythPlayerUI::OSDDebugVisibilityChanged
void OSDDebugVisibilityChanged(bool Visible)
Definition: mythplayerui.cpp:849
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:479
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:461
MythPlayer::m_decoder
DecoderBase * m_decoder
Definition: mythplayer.h:366
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:431
MythPlayer::m_rewindTime
long long m_rewindTime
Definition: mythplayer.h:435
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:277
MythPlayer::m_ffTime
long long m_ffTime
If m_ffTime>0, number of frames to seek forward.
Definition: mythplayer.h:426
LOC
#define LOC
Definition: mythplayerui.cpp:16
AudioPlayer::DeleteOutput
void DeleteOutput(void)
Definition: audioplayer.cpp:92
kScan_Progressive
@ kScan_Progressive
Definition: videoouttypes.h:100
PlayerContext::m_playingInfo
ProgramInfo * m_playingInfo
Currently playing info.
Definition: playercontext.h:120
MythPlayerUI::SwitchToProgram
void SwitchToProgram()
Definition: mythplayerui.cpp:977
MythPlayer::SetPlayingInfo
void SetPlayingInfo(const ProgramInfo &pginfo)
Definition: mythplayer.cpp:232
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:469
PlayerContext::LockPlayingInfo
void LockPlayingInfo(const char *file, int line) const
Definition: playercontext.cpp:233
MythPlayer::m_bookmarkSeek
uint64_t m_bookmarkSeek
Definition: mythplayer.h:420
DecoderBase::GetfpsMultiplier
int GetfpsMultiplier(void) const
Definition: decoderbase.h:262
MythPlayer::DoJumpChapter
virtual bool DoJumpChapter(int chapter)
Definition: mythplayer.cpp:1861
MythPlayer::m_videoOutput
MythVideoOutput * m_videoOutput
Definition: mythplayer.h:372
MythPlayer::m_hasFullPositionMap
bool m_hasFullPositionMap
Definition: mythplayer.h:413
MythPlayerCaptionsUI::m_captionsOverlay
MythCaptionsOverlay m_captionsOverlay
Definition: mythplayercaptionsui.h:69
PlayerContext::m_buffer
MythMediaBuffer * m_buffer
Definition: playercontext.h:119
MythPlayerUIBase::m_painter
MythPainter * m_painter
Definition: mythplayeruibase.h:20
MythMediaBuffer::ResetCommsError
void ResetCommsError(void)
Definition: mythmediabuffer.cpp:1773
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:428
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:790
CommBreakMap::LoadMap
void LoadMap(PlayerContext *player_ctx, uint64_t framesPlayed)
Definition: commbreakmap.cpp:49
MythMediaBuffer::GetCommsError
bool GetCommsError(void) const
Definition: mythmediabuffer.cpp:1768
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:687
MythPlayer::ClearAfterSeek
void ClearAfterSeek(bool clearvideobuffers=true)
This is to support seeking...
Definition: mythplayer.cpp:1675
Jitterometer::GetLastSD
float GetLastSD(void) const
Definition: jitterometer.h:54
kOSDTimeout_Short
@ kOSDTimeout_Short
Definition: osd.h:60
FrameRate
Definition: recorderbase.h:36
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
MythPlayer::SetBuffering
void SetBuffering(bool new_buffering)
Definition: mythplayer.cpp:682
MythPlayer::m_totalFrames
uint64_t m_totalFrames
Definition: mythplayer.h:432
MythPlayer::ResetPlaying
virtual void ResetPlaying(bool resetframes=true)
Definition: mythplayer.cpp:899
MythPlayer::m_videoFrameRate
double m_videoFrameRate
Video (input) Frame Rate (often inaccurate)
Definition: mythplayer.h:442
MythPlayer::UpdateFFRewSkip
bool UpdateFFRewSkip(float ffrewScale=1.0F)
Definition: mythplayer.cpp:1324
DecoderBase::GetRawEncodingType
virtual QString GetRawEncodingType(void)
Definition: decoderbase.h:208
MythVideoOutput::GetFramesPlayed
virtual long long GetFramesPlayed()
Definition: mythvideoout.cpp:249
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:374
DecoderBase::GetFPS
virtual double GetFPS(void) const
Definition: decoderbase.h:198
MythPlayerAVSync::WaitForFrame
void WaitForFrame(std::chrono::microseconds FrameDue)
Definition: mythplayeravsync.cpp:27
MythPlayer::m_videoDispDim
QSize m_videoDispDim
Video (input) width & height.
Definition: mythplayer.h:445
MythPlayerUI::DisplayPauseFrame
virtual void DisplayPauseFrame()
Definition: mythplayerui.cpp:616
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:501
MythPlayerUI::JumpToProgram
void JumpToProgram()
Definition: mythplayerui.cpp:1090
AvFormatDecoder
A decoder for media files.
Definition: avformatdecoder.h:82
MythPlayer::m_latestVideoTimecode
std::chrono::milliseconds m_latestVideoTimecode
Definition: mythplayer.h:436
MythPlayer::m_disableForcedSubtitles
bool m_disableForcedSubtitles
Definition: mythplayer.h:471
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:452
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:498
MythDisplay::GetRefreshInterval
std::chrono::microseconds GetRefreshInterval(std::chrono::microseconds Fallback) const
Definition: mythdisplay.cpp:804
uint
unsigned int uint
Definition: compat.h:144
MythPlayer::m_endExitPrompt
int m_endExitPrompt
Definition: mythplayer.h:421
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:61
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:972
MythPlayerAVSync::GetAVSyncData
void GetAVSyncData(InfoMap &Map) const
Definition: mythplayeravsync.cpp:70
interactivescreen.h
MythPlayer::GetAllowForcedSubtitles
bool GetAllowForcedSubtitles(void) const
Definition: mythplayer.h:211
CommBreakMap::GetSkipCommercials
int GetSkipCommercials(void) const
Definition: commbreakmap.h:33
MythPlayer::m_deleteMap
DeleteMap m_deleteMap
Definition: mythplayer.h:485
PlayerContext::m_tvchain
LiveTVChain * m_tvchain
Definition: playercontext.h:118
MythMediaOverlay::SetPlayer
void SetPlayer(MythPlayerUI *Player)
Definition: mythmediaoverlay.cpp:40
MythPlayer::DoFastForward
bool DoFastForward(uint64_t frames, double inaccuracy)
Definition: mythplayer.cpp:1581
MythPlayer::m_playerThread
QThread * m_playerThread
Definition: mythplayer.h:376
OSD::Init
bool Init(QRect Rect, float FontAspect) override
Definition: osd.cpp:50
MythPlayerEditorUI::InitialiseState
void InitialiseState() override
Definition: mythplayereditorui.cpp:24
MythPlayer::ReinitVideo
virtual void ReinitVideo(bool ForceUpdate)
Definition: mythplayer.cpp:295
MythMediaBuffer::IgnoreLiveEOF
void IgnoreLiveEOF(bool Ignore)
Tells RingBuffer whether to ignore the end-of-file.
Definition: mythmediabuffer.cpp:1818
MythPlayer::DoJumpToFrame
void DoJumpToFrame(uint64_t frame, double inaccuracy)
Definition: mythplayer.cpp:1606
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:322
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:409
MythVideoOutput::IsErrored
bool IsErrored() const
Definition: mythvideoout.cpp:254
CommBreakMap::GetAutoCommercialSkip
CommSkipMode GetAutoCommercialSkip(void) const
Definition: commbreakmap.cpp:20
MythPlayerCaptionsUI::DoEnableForcedSubtitles
void DoEnableForcedSubtitles()
Definition: mythplayercaptionsui.cpp:357
MythPlayer::m_jumpChapter
int m_jumpChapter
Definition: mythplayer.h:417
MythPlayer::InitFrameInterval
virtual void InitFrameInterval()
Definition: mythplayer.cpp:676
MythPlayerUI::SetLastPlayPosition
virtual void SetLastPlayPosition(uint64_t frame=0)
Definition: mythplayerui.cpp:766
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:695
MythPlayer::CalcMaxFFTime
virtual long long CalcMaxFFTime(long long ff, bool setjump=true) const
CalcMaxFFTime(ffframes): forward ffframes forward.
Definition: mythplayer.cpp:1441
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:521
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:95
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:1521
MythPlayerVideoUI::CheckAspectRatio
void CheckAspectRatio(MythVideoFrame *Frame)
Definition: mythplayervideoui.cpp:222
MythPlayer::IsWatchingInprogress
bool IsWatchingInprogress(void) const
Definition: mythplayer.cpp:128
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:360
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:143
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:206
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:2550
MythCaptionsOverlay::GetWindow
MythScreenType * GetWindow(const QString &Window) override
Definition: mythcaptionsoverlay.cpp:57
MythPlayerVideoUI::ReinitOSD
void ReinitOSD()
Definition: mythplayervideoui.cpp:181
MythPlayer::TranslatePositionMsToFrame
uint64_t TranslatePositionMsToFrame(std::chrono::milliseconds position, bool use_cutlist) const
Definition: mythplayer.h:261
MythPlayer::m_decodeOneFrame
bool m_decodeOneFrame
Definition: mythplayer.h:397
MythPlayer::SetPlaying
void SetPlaying(bool is_playing)
Definition: mythplayer.cpp:243
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:738
MythPlayerVisualiserUI::AutoVisualise
void AutoVisualise(bool HaveVideo)
Enable visualisation if possible, there is no video and user has requested.
Definition: mythplayervisualiserui.cpp:111
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:34
MythMediaBuffer::GetAvailableBuffer
QString GetAvailableBuffer(void)
Definition: mythmediabuffer.cpp:1543
StreamInfo::m_forced
bool m_forced
Definition: decoderbase.h:103
OSD_WIN_MESSAGE
#define OSD_WIN_MESSAGE
Definition: osd.h:30
MythPlayer::m_totalLength
std::chrono::seconds m_totalLength
Definition: mythplayer.h:433
MythPlayer::SetFrameInterval
void SetFrameInterval(FrameScanType scan, double frame_period)
Definition: mythplayer.cpp:666
OSD::HideWindow
void HideWindow(const QString &Window) override
Definition: osd.cpp:669
MythInteractiveBuffer
Definition: mythinteractivebuffer.h:9
PlayerContext
Definition: playercontext.h:52
MythPlayer::m_isDummy
bool m_isDummy
Definition: mythplayer.h:511
MythPlayer::m_videoDim
QSize m_videoDim
Video (input) buffer width & height.
Definition: mythplayer.h:446
AudioPlayer::GetStretchFactor
float GetStretchFactor(void) const
Definition: audioplayer.h:68
MythPlayerUI::InitFrameInterval
void InitFrameInterval() override
Definition: mythplayerui.cpp:492
MythPlayerUI::SetWatched
void SetWatched(bool ForceWatched=false)
Determines if the recording should be considered watched.
Definition: mythplayerui.cpp:715
LiveTVChain::SetProgram
void SetProgram(const ProgramInfo &pginfo)
Definition: livetvchain.cpp:392
MythPlayerUI::m_osdDebug
bool m_osdDebug
Definition: mythplayerui.h:66
interactivetv.h
kTrackTypeRawText
@ kTrackTypeRawText
Definition: decoderbase.h:36
MythPlayer::m_videoAspect
float m_videoAspect
Video (input) Apect Ratio.
Definition: mythplayer.h:448
MythPlayerUI::RefreshPauseFrame
void RefreshPauseFrame()
Definition: mythplayerui.cpp:547
MythPlayer::m_allPaused
bool m_allPaused
Definition: mythplayer.h:401
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:375
LiveTVChain::GetLengthAtCurPos
std::chrono::seconds GetLengthAtCurPos(void)
Definition: livetvchain.cpp:360
MythPlayerCaptionsUI::m_captionsState
MythCaptionsState m_captionsState
Definition: mythplayercaptionsui.h:70
MythCaptionsOverlay::Draw
void Draw(QRect Rect)
Definition: mythcaptionsoverlay.cpp:29
Jitterometer::GetLastCPUStats
QString GetLastCPUStats(void) const
Definition: jitterometer.h:55
MythPlayerUI::JumpToStream
void JumpToStream(const QString &stream)
Definition: mythplayerui.cpp:908
PRIO_PROCESS
#define PRIO_PROCESS
Definition: compat.h:205
kCommSkipOff
@ kCommSkipOff
Definition: tv.h:132
MythVideoScanTracker
Definition: mythvideoscantracker.h:12
MythPlayerUI::UpdateOSDDebug
void UpdateOSDDebug()
Definition: mythplayerui.cpp:867
MythVideoFrame
Definition: mythframe.h:88
MythVideoScanTracker::ResetTracker
void ResetTracker()
Definition: mythvideoscantracker.cpp:39
MythPlayer::OpenDummy
void OpenDummy(void)
Definition: mythplayer.cpp:393
MythPlayerUI::ChangeOSDDebug
void ChangeOSDDebug()
Definition: mythplayerui.cpp:877
MythVideoScanTracker::GetScanType
FrameScanType GetScanType() const
Definition: mythvideoscantracker.cpp:99
MythVideoScanTracker::UnlockScan
void UnlockScan()
Definition: mythvideoscantracker.cpp:33
MythPlayerVideoUI::ProcessCallbacks
void ProcessCallbacks()
Definition: mythplayervideoui.cpp:151
MythPlayerAVSync::AVSync
std::chrono::microseconds AVSync(AudioPlayer *Audio, MythVideoFrame *Frame, std::chrono::microseconds FrameInterval, float PlaySpeed, bool HaveVideo, bool Force)
Definition: mythplayeravsync.cpp:76
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:315
TVPlaybackState::ChangeOSDDebug
void ChangeOSDDebug()
MythVideoOutput::RenderEnd
virtual void RenderEnd()=0
CommBreakMap::HasMap
bool HasMap(void) const
Definition: commbreakmap.h:28
MythPlayerUI::CanSupportDoubleRate
bool CanSupportDoubleRate()
Definition: mythplayerui.cpp:774
mythmainwindow.h
FlagIsSet
#define FlagIsSet(arg)
Definition: mythplayer.h:80
MythMediaBuffer::GetStorageRate
QString GetStorageRate(void)
Definition: mythmediabuffer.cpp:1538
is_interlaced
bool is_interlaced(FrameScanType Scan)
Definition: videoouttypes.h:188
MythPlayer::DoRewind
bool DoRewind(uint64_t frames, double inaccuracy)
Definition: mythplayer.cpp:1394
kOSDTimeout_Med
@ kOSDTimeout_Med
Definition: osd.h:61
MythPlayerUI::EventLoop
virtual void EventLoop()
Definition: mythplayerui.cpp:102
MythPlayer::kInaccuracyDefault
static const double kInaccuracyDefault
Definition: mythplayer.h:245
MythPlayerUI::StartPlaying
bool StartPlaying()
Definition: mythplayerui.cpp:59
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:30
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:187
kScan_Ignore
@ kScan_Ignore
Definition: videoouttypes.h:96
ProgramInfo::SaveLastPlayPos
void SaveLastPlayPos(uint64_t frame)
TODO Move to RecordingInfo.
Definition: programinfo.cpp:2718
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:236
MythPlayer::m_killDecoder
bool volatile m_killDecoder
Definition: mythplayer.h:396
CommBreakMap::SkipCommercials
void SkipCommercials(int direction)
Definition: commbreakmap.cpp:40
MythMediaBuffer::IsOpen
virtual bool IsOpen(void) const =0
MythMediaBuffer::GetType
MythBufferType GetType() const
Definition: mythmediabuffer.cpp:202
tv_play.h
MythPlayer::DecoderStart
virtual void DecoderStart(bool start_paused)
Definition: mythplayer.cpp:999
MythVideoOutput::DoneDisplayingFrame
virtual void DoneDisplayingFrame(MythVideoFrame *Frame)
Releases frame returned from GetLastShownFrame() onto the queue of frames ready for decoding onto.
Definition: mythvideoout.cpp:416
MythPlayerUIBase::m_display
MythDisplay * m_display
Definition: mythplayeruibase.h:21
TV
Control TV playback.
Definition: tv_play.h:153