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; remove slow seek user feedback window
36  connect(this, &MythPlayerUI::SeekingComplete, [&]()
37  {
38  m_osdLock.lock();
40  m_osdLock.unlock();
41  });
42 
43  // Seeking has finished; update position on OSD
44  connect(this, &MythPlayerUI::SeekingDone, [&]()
45  {
47  });
48 
49  // Setup OSD debug
50  m_osdDebugTimer.setInterval(1s);
53 
54  // Other connections
58 
59  // Setup refresh interval.
62 }
63 
65 {
66  LOG(VB_GENERAL, LOG_INFO, LOC + "Initialising player state");
68 }
69 
71 {
72  if (OpenFile() < 0)
73  {
74  LOG(VB_GENERAL, LOG_ERR, LOC + "Unable to open video file.");
75  return false;
76  }
77 
78  m_framesPlayed = 0;
79  m_rewindTime = m_ffTime = 0;
81  m_jumpChapter = 0;
84 
85  if (!InitVideo())
86  {
87  LOG(VB_GENERAL, LOG_ERR, LOC + "Unable to initialize video.");
89  return false;
90  }
91 
92  EventStart();
93  DecoderStart(true);
94  InitialSeek();
95  VideoStart();
96 
97  m_playerThread->setPriority(QThread::TimeCriticalPriority);
98 #ifdef Q_OS_ANDROID
99  setpriority(PRIO_PROCESS, m_playerThreadId, -20);
100 #endif
102  UnpauseDecoder();
103  return !IsErrored();
104 }
105 
107 {
108  // TODO handle initial commskip and/or cutlist skip as well
109  if (m_bookmarkSeek > 30)
111 }
112 
114 {
115  // Handle decoder callbacks
117 
118  // Live TV program change
119  if (m_fileChanged)
120  FileChanged();
121 
122  // Check if visualiser is wanted on first start and after video change
124  AutoVisualise(!m_videoDim.isEmpty());
125 
126  // recreate the osd if a reinit was triggered by another thread
127  if (m_reinitOsd)
128  ReinitOSD();
129 
130  // enable/disable forced subtitles if signalled by the decoder
135 
136  // reset the scan (and hence deinterlacers) if triggered by the decoder
138 
139  // refresh the position map for an in-progress recording while editing
141  {
142  if (m_editUpdateTimer.hasExpired(2000))
143  {
144  // N.B. the positionmap update and osd refresh are asynchronous
145  m_forcePositionMapSync = true;
146  m_osdLock.lock();
148  m_osdLock.unlock();
149  m_editUpdateTimer.start();
150  }
151  }
152 
153  // Refresh the programinfo in use status
154  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
157  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
158 
159  // Disable timestretch if we are too close to the end of the buffer
160  if (m_ffrewSkip == 1 && (m_playSpeed > 1.0F) && IsNearEnd())
161  {
162  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Near end, Slowing down playback.");
163  Play(1.0F, true, true);
164  }
165 
167  {
168  // Switch from the dummy recorder to the tuned program in livetv
169  m_playerCtx->m_tvchain->JumpToNext(true, 0s);
170  JumpToProgram();
171  }
172  else if ((!m_allPaused || GetEof() != kEofStateNone) &&
175  {
176  // Switch to the next program in livetv
178  SwitchToProgram();
179  }
180 
181  // Jump to the next program in livetv
183  {
184  JumpToProgram();
185  }
186 
187  // Change interactive stream if requested
188  if (!m_newStream.isEmpty())
189  {
191  m_newStream = QString();
192  }
193 
194  // Disable fastforward if we are too close to the end of the buffer
195  if (m_ffrewSkip > 1 && (CalcMaxFFTime(100, false) < 100))
196  {
197  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Near end, stopping fastforward.");
198  Play(1.0F, true, true);
199  }
200 
201  // Disable rewind if we are too close to the beginning of the buffer
202  if (m_ffrewSkip < 0 && CalcRWTime(-m_ffrewSkip) >= 0 &&
204  {
205  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Near start, stopping rewind.");
206  float stretch = (m_ffrewSkip > 0) ? 1.0F : m_audio.GetStretchFactor();
207  Play(stretch, true, true);
208  }
209 
210  // Check for error
212  {
213  LOG(VB_GENERAL, LOG_ERR, LOC + "Unknown recorder error, exiting decoder");
214  if (!IsErrored())
215  SetErrored(tr("Irrecoverable recorder error"));
216  m_killDecoder = true;
217  return;
218  }
219 
220  // Handle speed change
221  if (!qFuzzyCompare(m_playSpeed + 1.0F, m_nextPlaySpeed + 1.0F) &&
223  {
224  ChangeSpeed();
225  return;
226  }
227 
228  // Check if we got a communication error, and if so pause playback
230  {
231  Pause();
233  }
234 
235  // Handle end of file
236  EofState eof = GetEof();
237  if (HasReachedEof())
238  {
239 #ifdef USING_MHEG
241  {
242  Pause();
243  return;
244  }
245 #endif
247  {
248  LOG(VB_GENERAL, LOG_NOTICE, LOC + "LiveTV forcing JumpTo 1");
249  m_playerCtx->m_tvchain->JumpToNext(true, 0s);
250  return;
251  }
252 
253  bool drained = false;
255  {
256  // We have audio only or mostly audio content. Exit when
257  // the audio is drained.
258  drained =
259  !m_audio.GetAudioOutput() ||
260  m_audio.IsPaused() ||
262  }
263  else
264  {
265  // We have normal or video only content. Exit when the
266  // video is drained.
268  }
269  if (eof != kEofStateDelayed || drained)
270  {
271  if (eof == kEofStateDelayed)
272  {
273  LOG(VB_PLAYBACK, LOG_INFO,
274  QString("waiting for no video frames %1")
276  }
277  LOG(VB_PLAYBACK, LOG_INFO,
278  QString("HasReachedEof() at framesPlayed=%1 totalFrames=%2")
279  .arg(m_framesPlayed).arg(GetCurrentFrameCount()));
280  Pause();
281  SetPlaying(false);
282  return;
283  }
284  }
285 
286  // Handle rewind
287  if (m_rewindTime > 0 && (m_ffrewSkip == 1 || m_ffrewSkip == 0))
288  {
290  if (m_rewindTime > 0)
291  DoRewind(static_cast<uint64_t>(m_rewindTime), kInaccuracyDefault);
292  }
293 
294  // Handle fast forward
295  if (m_ffTime > 0 && (m_ffrewSkip == 1 || m_ffrewSkip == 0))
296  {
298  if (m_ffTime > 0)
299  {
300  DoFastForward(static_cast<uint64_t>(m_ffTime), kInaccuracyDefault);
301  if (GetEof() != kEofStateNone)
302  return;
303  }
304  }
305 
306  // Handle chapter jump
307  if (m_jumpChapter != 0)
309 
310  // Handle commercial skipping
311  if (m_commBreakMap.GetSkipCommercials() != 0 && (m_ffrewSkip == 1))
312  {
313  if (!m_commBreakMap.HasMap())
314  {
315  //: The commercials/adverts have not been flagged
316  SetOSDStatus(tr("Not Flagged"), kOSDTimeout_Med);
317  QString message = "COMMFLAG_REQUEST ";
318  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
319  message += QString("%1").arg(m_playerCtx->m_playingInfo->GetChanID()) +
321  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
322  gCoreContext->SendMessage(message);
323  }
324  else
325  {
326  QString msg;
327  uint64_t jumpto = 0;
328  uint64_t frameCount = GetCurrentFrameCount();
329  // XXX CommBreakMap should use duration map not m_videoFrameRate
330  bool jump = m_commBreakMap.DoSkipCommercials(jumpto, m_framesPlayed,
332  frameCount, msg);
333  if (!msg.isEmpty())
335  if (jump)
337  }
339  return;
340  }
341 
342  // Handle automatic commercial skipping
343  uint64_t jumpto = 0;
344  if (m_deleteMap.IsEmpty() && (m_ffrewSkip == 1) &&
347  {
348  QString msg;
349  uint64_t frameCount = GetCurrentFrameCount();
350  // XXX CommBreakMap should use duration map not m_videoFrameRate
353  frameCount, msg);
354  if (!msg.isEmpty())
356  if (jump)
358  }
359 
360  // Handle cutlist skipping
361  if (!m_allPaused && (m_ffrewSkip == 1) &&
363  {
364  if (jumpto == m_totalFrames)
365  {
368  }
369  else
370  {
372  }
373  }
374 }
375 
377 {
378 #ifdef USING_MHEG
379  // handle Interactive TV
380  if (GetInteractiveTV())
381  {
382  m_osdLock.lock();
383  m_itvLock.lock();
384  auto *window = qobject_cast<InteractiveScreen *>(m_captionsOverlay.GetWindow(OSD_WIN_INTERACT));
385  if ((m_interactiveTV->ImageHasChanged() || !m_itvVisible) && window)
386  {
388  m_itvVisible = true;
389  }
390  m_itvLock.unlock();
391  m_osdLock.unlock();
392  }
393 #endif // USING_MHEG
394 }
395 
397 {
399  // ensure we re-check double rate support following a speed change
400  UnlockScan();
401 }
402 
403 void MythPlayerUI::ReinitVideo(bool ForceUpdate)
404 {
405  MythPlayer::ReinitVideo(ForceUpdate);
406 
407  // Signal to the main thread to reinit OSD
408  m_reinitOsd = true;
409 
410  // Signal to main thread to reinit subtitles
412  emit EnableSubtitles(true);
413 
414  // Signal to the main thread to check auto visualise
415  m_checkAutoVisualise = true;
416 }
417 
419 {
420  QRect visible;
421  QRect total;
422  float aspect = NAN;
423  float scaling = NAN;
424 
425  m_osdLock.lock();
426  m_videoOutput->GetOSDBounds(total, visible, aspect, scaling, 1.0F);
427  m_osd.Init(visible, aspect);
428  m_captionsOverlay.Init(visible, aspect);
430 
431 #ifdef USING_MHEG
432  if (GetInteractiveTV())
433  {
434  QMutexLocker locker(&m_itvLock);
435  m_interactiveTV->Reinit(total, visible, aspect);
436  }
437 #endif // USING_MHEG
438 
439  // If there is a forced text subtitle track (which is possible
440  // in e.g. a .mkv container), and forced subtitles are
441  // allowed, then start playback with that subtitle track
442  // selected. Otherwise, use the frontend settings to decide
443  // which captions/subtitles (if any) to enable at startup.
444  // TODO: modify the fix to #10735 to use this approach
445  // instead.
446  bool hasForcedTextTrack = false;
447  uint forcedTrackNumber = 0;
449  {
450  uint numTextTracks = m_decoder->GetTrackCount(kTrackTypeRawText);
451  for (uint i = 0; !hasForcedTextTrack && i < numTextTracks; ++i)
452  {
454  {
455  hasForcedTextTrack = true;
456  forcedTrackNumber = i;
457  }
458  }
459  }
460  if (hasForcedTextTrack)
461  SetTrack(kTrackTypeRawText, static_cast<uint>(forcedTrackNumber));
462  else
464 
465  m_osdLock.unlock();
466 
467  SetPlaying(true);
468  ClearAfterSeek(false);
471 
474  AutoVisualise(!m_videoDim.isEmpty());
475 }
476 
478 {
479  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
480  {
482  {
483  // When initial playback gets underway, we override the ProgramInfo
484  // flags such that future calls to GetBookmark() will consider only
485  // an actual bookmark and not progstart or lastplaypos information.
489  }
490  }
491  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
493 }
494 
496 {
498 
499  if (m_videoPaused || m_isDummy)
501  else if (DisplayNormalFrame())
502  {
505  else if (m_decoder && m_decoder->GetEof() != kEofStateNone)
506  ++m_framesPlayed;
507  else
508  m_framesPlayed = static_cast<uint64_t>(
510  }
511 
512  return !IsErrored();
513 }
514 
516 {
517  SetFrameInterval(GetScanType(), 1.0 / (m_videoFrameRate * static_cast<double>(m_playSpeed)));
519  LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("Display Refresh Rate: %1 Video Frame Rate: %2")
520  .arg(1000000.0 / m_refreshInterval.count(), 0, 'f', 3)
521  .arg(1000000.0 / m_frameInterval.count(), 0, 'f', 3));
522 }
523 
524 void MythPlayerUI::RenderVideoFrame(MythVideoFrame *Frame, FrameScanType Scan, bool Prepare, std::chrono::microseconds Wait)
525 {
526  if (!m_videoOutput)
527  return;
528 
529  if (Prepare)
533  if (m_renderOneFrame)
534  LOG(VB_PLAYBACK, LOG_DEBUG, QString("Clearing render one"));
535  m_renderOneFrame = false;
538  m_osd.Draw();
540 
541  if (Wait > 0us)
542  m_avSync.WaitForFrame(Wait);
543 
545 }
546 
548 {
549  m_fileChanged = false;
550  LOG(VB_PLAYBACK, LOG_INFO, LOC + "FileChanged");
551 
552  Pause();
553  ChangeSpeed();
554  if (dynamic_cast<AvFormatDecoder *>(m_decoder))
555  m_playerCtx->m_buffer->Reset(false, true);
556  else
557  m_playerCtx->m_buffer->Reset(false, true, true);
559  Play();
560 
562 
563  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
565  if (m_decoder)
567  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
568 
569  CheckTVChain();
570  m_forcePositionMapSync = true;
571 }
572 
574 {
576  {
578  {
580  m_needNewPauseFrame = false;
581 
582  if (m_deleteMap.IsEditing())
583  {
584  m_osdLock.lock();
586  m_osdLock.unlock();
587  }
588  }
589  else
590  {
591  m_decodeOneFrame = true;
592  }
593  }
594 }
595 
596 void MythPlayerUI::DoDisplayVideoFrame(MythVideoFrame* Frame, std::chrono::microseconds Due)
597 {
598  if (Due < 0us)
599  {
600  m_videoOutput->SetFramesPlayed(static_cast<long long>(++m_framesPlayed));
601  if (m_renderOneFrame)
602  LOG(VB_PLAYBACK, LOG_DEBUG, QString("Clearing render one"));
603  m_renderOneFrame = false;
604  }
605  else if (!FlagIsSet(kVideoIsNull) && Frame)
606  {
607 
608  // Check scan type
609  bool showsecondfield = false;
610  FrameScanType ps = GetScanForDisplay(Frame, showsecondfield);
611 
612  // if we get here, we're actually going to do video output
613  RenderVideoFrame(Frame, ps, true, Due);
614 
615  // Only double rate CPU deinterlacers require an extra call to PrepareFrame
616  bool secondprepare = Frame->GetDoubleRateOption(DEINT_CPU) && !Frame->GetDoubleRateOption(DEINT_SHADER);
617  // and the first deinterlacing pass will have marked the frame as already deinterlaced
618  // which will break GetScanForDisplay below and subsequent deinterlacing
619  bool olddeinterlaced = Frame->m_alreadyDeinterlaced;
620  if (secondprepare)
621  Frame->m_alreadyDeinterlaced = false;
622  // Update scan settings now that deinterlacer has been set and we know
623  // whether we need a second field
624  ps = GetScanForDisplay(Frame, showsecondfield);
625 
626  // Reset olddeinterlaced if necessary (pause frame etc)
627  if (!showsecondfield && secondprepare)
628  {
629  Frame->m_alreadyDeinterlaced = olddeinterlaced;
630  }
631  else if (showsecondfield)
632  {
633  // Second field
634  if (kScan_Interlaced == ps)
635  ps = kScan_Intr2ndField;
636  RenderVideoFrame(Frame, ps, secondprepare, Due + m_frameInterval / 2);
637  }
638  }
639  else
640  {
641  m_avSync.WaitForFrame(Due);
642  }
643 }
644 
646 {
647  if (!m_videoOutput)
648  return;
649 
650  if (m_videoOutput->IsErrored())
651  {
652  SetErrored(tr("Serious error detected in Video Output"));
653  return;
654  }
655 
656  // clear the buffering state
657  SetBuffering(false);
658 
660  PreProcessNormalFrame(); // Allow interactiveTV to draw on pause frame
661 
664  RenderVideoFrame(nullptr, scan, true, 0ms);
665 }
666 
667 bool MythPlayerUI::DisplayNormalFrame(bool CheckPrebuffer)
668 {
669  if (m_allPaused)
670  return false;
671 
672  if (CheckPrebuffer && !PrebufferEnoughFrames())
673  return false;
674 
675  // clear the buffering state
676  SetBuffering(false);
677 
678  // retrieve the next frame
681 
682  // Check aspect ratio
683  CheckAspectRatio(frame);
684 
686  UpdateFFRewSkip();
687 
688  // Player specific processing (dvd, bd, mheg etc)
690 
691  // handle scan type changes
693 
694  // Detect letter boxing
695  // FIXME this is temporarily moved entirely into the main thread as there are
696  // too many threading issues and the decoder thread is not yet ready to handle
697  // QObject signals and slots.
698  // When refactoring is complete, move it into the decoder thread and
699  // signal switches via a new field in MythVideoFrame
702  {
704  ReinitOSD();
705  }
706 
707  // When is the next frame due
708  std::chrono::microseconds due = m_avSync.AVSync(&m_audio, frame, m_frameInterval, m_playSpeed, !m_videoDim.isEmpty(),
710  // Display it
711  DoDisplayVideoFrame(frame, due);
714 
715  return true;
716 }
717 
718 void MythPlayerUI::SetVideoParams(int Width, int Height, double FrameRate, float Aspect,
719  bool ForceUpdate, int ReferenceFrames,
720  FrameScanType Scan, const QString &CodecName)
721 {
722  MythPlayer::SetVideoParams(Width, Height, FrameRate, Aspect, ForceUpdate, ReferenceFrames,
723  Scan, CodecName);
724 
725  // ensure deinterlacers are correctly reset after a change
726  UnlockScan();
727  FrameScanType newscan = DetectInterlace(Scan, static_cast<float>(m_videoFrameRate), m_videoDispDim.height());
729  ResetTracker();
730 }
731 
746 void MythPlayerUI::SetWatched(bool ForceWatched)
747 {
748  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
750  {
751  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
752  return;
753  }
754 
755  uint64_t numFrames = GetCurrentFrameCount();
756 
757  // For recordings we want to ignore the post-roll and account for
758  // in-progress recordings where totalFrames doesn't represent
759  // the full length of the recording. For videos we can only rely on
760  // totalFrames as duration metadata can be wrong
763  {
764 
765  // If the recording is stopped early we need to use the recording end
766  // time, not the programme end time
768  qint64 starttime = pi->GetRecordingStartTime().toSecsSinceEpoch();
769  qint64 endactual = pi->GetRecordingEndTime().toSecsSinceEpoch();
770  qint64 endsched = pi->GetScheduledEndTime().toSecsSinceEpoch();
771  qint64 endtime = std::min(endactual, endsched);
772  numFrames = static_cast<uint64_t>((endtime - starttime) * m_videoFrameRate);
773  }
774 
775  // 4 minutes min, 12 minutes max
776  auto offset = std::chrono::seconds(lround(0.14 * (numFrames / m_videoFrameRate)));
777  offset = std::clamp(offset, 240s, 720s);
778 
779  if (ForceWatched || (m_framesPlayed > (numFrames - (offset.count() * m_videoFrameRate))))
780  {
782  LOG(VB_GENERAL, LOG_INFO, LOC + QString("Marking recording as watched using offset %1 minutes")
783  .arg(offset.count()/60));
784  }
785 
786  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
787 }
788 
790 {
791  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
794  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
795 }
796 
798 {
799  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
802  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
803 }
804 
806 {
807  // At this point we may not have the correct frame rate.
808  // Since interlaced is always at 25 or 30 fps, if the interval
809  // is less than 30000 (33fps) it must be representing one
810  // field and not one frame, so multiply by 2.
811  std::chrono::microseconds realfi = m_frameInterval;
812  if (m_frameInterval < 30ms)
813  realfi = m_frameInterval * 2;
814  return (duration_cast<floatusecs>(realfi) / 2.0) > (duration_cast<floatusecs>(m_refreshInterval) * 0.995);
815 }
816 
818 {
819  QString samplerate = MythMediaBuffer::BitrateToString(static_cast<uint64_t>(m_audio.GetSampleRate()), true);
820  Map.insert("samplerate", samplerate);
821  Map.insert("filename", m_playerCtx->m_buffer->GetSafeFilename());
822  Map.insert("decoderrate", m_playerCtx->m_buffer->GetDecoderRate());
823  Map.insert("storagerate", m_playerCtx->m_buffer->GetStorageRate());
824  Map.insert("bufferavail", m_playerCtx->m_buffer->GetAvailableBuffer());
825  Map.insert("buffersize", QString::number(m_playerCtx->m_buffer->GetBufferSize() >> 20));
826  m_avSync.GetAVSyncData(Map);
827 
828  if (m_videoOutput)
829  {
830  QString frames = QString("%1/%2").arg(m_videoOutput->ValidVideoFrames())
832  Map.insert("videoframes", frames);
833  }
834  if (m_decoder)
835  Map["videodecoder"] = m_decoder->GetCodecDecoderName();
836 
837  Map["framerate"] = QString("%1%2%3")
838  .arg(static_cast<double>(m_outputJmeter.GetLastFPS()), 0, 'f', 2).arg(QChar(0xB1, 0))
839  .arg(static_cast<double>(m_outputJmeter.GetLastSD()), 0, 'f', 2);
840  Map["load"] = m_outputJmeter.GetLastCPUStats();
841 
842  GetCodecDescription(Map);
843 }
844 
846 {
847  Map["audiocodec"] = avcodec_get_name(m_audio.GetCodec());
848  Map["audiochannels"] = QString::number(m_audio.GetOrigChannels());
849 
850  int width = m_videoDispDim.width();
851  int height = m_videoDispDim.height();
852  Map["videocodec"] = GetEncodingType();
853  if (m_decoder)
854  Map["videocodecdesc"] = m_decoder->GetRawEncodingType();
855  Map["videowidth"] = QString::number(width);
856  Map["videoheight"] = QString::number(height);
857  Map["videoframerate"] = QString::number(m_videoFrameRate, 'f', 2);
858  Map["deinterlacer"] = GetDeinterlacerName();
859 
860  if (width < 640)
861  return;
862 
863  bool interlaced = is_interlaced(GetScanType());
864  if (height > 2100)
865  Map["videodescrip"] = interlaced ? "UHD_4K_I" : "UHD_4K_P";
866  else if (width == 1920 || height == 1080 || height == 1088)
867  Map["videodescrip"] = interlaced ? "HD_1080_I" : "HD_1080_P";
868  else if ((width == 1280 || height == 720) && !interlaced)
869  Map["videodescrip"] = "HD_720_P";
870  else if (height >= 720)
871  Map["videodescrip"] = "HD";
872  else
873  Map["videodescrip"] = "SD";
874 }
875 
877 {
879  if (Visible)
880  {
881  // This should already have enabled the required monitors
882  m_osdDebugTimer.start();
883  }
884  else
885  {
886  // If we have cleared/escaped the debug OSD screen, then ChangeOSDDebug
887  // is not called, so we need to ensure we turn off the monitors
888  m_osdDebugTimer.stop();
891  }
892 }
893 
895 {
896  m_osdLock.lock();
897  InfoMap infoMap;
898  GetPlaybackData(infoMap);
901  m_osdLock.unlock();
902 }
903 
905 {
906  m_osdLock.lock();
907  bool enable = !m_osdDebug;
908  EnableBitrateMonitor(enable);
909  EnableFrameRateMonitor(enable);
910  if (enable)
911  UpdateOSDDebug();
912  else
914  m_osdDebug = enable;
915  m_osdLock.unlock();
916 }
917 
919 {
920  bool enable = VERBOSE_LEVEL_CHECK(VB_PLAYBACK, LOG_ANY) || Enable;
921  m_outputJmeter.SetNumCycles(enable ? static_cast<int>(m_videoFrameRate) : 0);
922 }
923 
925 {
926  if (m_playerCtx->m_buffer)
928 }
929 
930 /* JumpToStream, JumpToProgram and SwitchToProgram all need to be moved into the
931  * parent object and hopefully simplified. The fairly involved logic does not
932  * sit well with the new design objectives for the player classes and are better
933  * suited to the high level logic in TV.
934  */
935 void MythPlayerUI::JumpToStream(const QString &stream)
936 {
937  LOG(VB_PLAYBACK, LOG_INFO, LOC + "JumpToStream - begin");
938 
939  // Shouldn't happen
940  if (stream.isEmpty())
941  return;
942 
943  Pause();
944  ResetCaptions();
945 
946  ProgramInfo pginfo(stream);
947  SetPlayingInfo(pginfo);
948 
951  else
952  m_playerCtx->m_buffer->OpenFile(stream);
953 
954  if (!m_playerCtx->m_buffer->IsOpen())
955  {
956  LOG(VB_GENERAL, LOG_ERR, LOC + "JumpToStream buffer OpenFile failed");
958  SetErrored(tr("Error opening remote stream buffer"));
959  return;
960  }
961 
962  m_watchingRecording = false;
963  m_totalLength = 0s;
964  m_totalFrames = 0;
965  m_totalDuration = 0s;
966 
967  // 120 retries ~= 60 seconds
968  if (OpenFile(120) < 0)
969  {
970  LOG(VB_GENERAL, LOG_ERR, LOC + "JumpToStream OpenFile failed.");
972  SetErrored(tr("Error opening remote stream"));
973  return;
974  }
975 
976  if (m_totalLength == 0s)
977  {
978  long long len = m_playerCtx->m_buffer->GetRealFileSize();
979  m_totalLength = std::chrono::seconds(len / ((m_decoder->GetRawBitrate() * 1000) / 8));
980  m_totalFrames = static_cast<uint64_t>(m_totalLength.count() * SafeFPS());
981  }
982 
983  LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("JumpToStream length %1 bytes @ %2 Kbps = %3 Secs, %4 frames @ %5 fps")
985  .arg(m_totalLength.count()).arg(m_totalFrames).arg(m_decoder->GetFPS()) );
986 
988 
989  // the bitrate is reset by m_playerCtx->m_buffer->OpenFile()...
991  m_decoder->SetProgramInfo(pginfo);
992 
993  Play();
994  ChangeSpeed();
995 
997 #ifdef USING_MHEG
999 #endif
1000 
1001  LOG(VB_PLAYBACK, LOG_INFO, LOC + "JumpToStream - end");
1002 }
1003 
1005 {
1006  if (!IsReallyNearEnd())
1007  return;
1008 
1009  LOG(VB_PLAYBACK, LOG_INFO, LOC + "SwitchToProgram - start");
1010  bool discontinuity = false;
1011  bool newtype = false;
1012  int newid = -1;
1013  ProgramInfo *pginfo = m_playerCtx->m_tvchain->GetSwitchProgram(discontinuity, newtype, newid);
1014  if (!pginfo)
1015  return;
1016 
1017  bool newIsDummy = m_playerCtx->m_tvchain->GetInputType(newid) == "DUMMY";
1018 
1019  SetPlayingInfo(*pginfo);
1020  Pause();
1021  ChangeSpeed();
1022 
1023  // Release all frames to ensure the current decoder resources are released
1024  DiscardVideoFrames(true, true);
1025 
1026  if (newIsDummy)
1027  {
1028  OpenDummy();
1029  ResetPlaying();
1031  delete pginfo;
1032  return;
1033  }
1034 
1036  {
1037  // Restore original ringbuffer
1038  auto *ic = dynamic_cast<MythInteractiveBuffer*>(m_playerCtx->m_buffer);
1039  if (ic)
1040  m_playerCtx->m_buffer = ic->TakeBuffer();
1041  delete ic;
1042  }
1043 
1045 
1046  if (!m_playerCtx->m_buffer->IsOpen())
1047  {
1048  LOG(VB_GENERAL, LOG_ERR, LOC + QString("SwitchToProgram's OpenFile failed (input type: %1)")
1049  .arg(m_playerCtx->m_tvchain->GetInputType(newid)));
1050  LOG(VB_GENERAL, LOG_ERR, m_playerCtx->m_tvchain->toString());
1052  SetErrored(tr("Error opening switch program buffer"));
1053  delete pginfo;
1054  return;
1055  }
1056 
1057  if (GetEof() != kEofStateNone)
1058  {
1059  discontinuity = true;
1060  ResetCaptions();
1061  }
1062 
1063  LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("SwitchToProgram(void) "
1064  "discont: %1 newtype: %2 newid: %3 decoderEof: %4")
1065  .arg(discontinuity).arg(newtype).arg(newid).arg(GetEof()));
1066 
1067  if (discontinuity || newtype)
1068  {
1069  m_playerCtx->m_tvchain->SetProgram(*pginfo);
1070  if (m_decoder)
1071  m_decoder->SetProgramInfo(*pginfo);
1072 
1073  m_playerCtx->m_buffer->Reset(true);
1074  if (newtype)
1075  {
1076  if (OpenFile() < 0)
1077  SetErrored(tr("Error opening switch program file"));
1078  }
1079  else
1080  ResetPlaying();
1081  }
1082  else
1083  {
1085  if (m_decoder)
1086  {
1089  }
1090  }
1091  delete pginfo;
1092 
1093  if (IsErrored())
1094  {
1095  LOG(VB_GENERAL, LOG_ERR, LOC + "SwitchToProgram failed.");
1097  return;
1098  }
1099 
1101 
1102  // the bitrate is reset by m_playerCtx->m_buffer->OpenFile()...
1103  if (m_decoder)
1106 
1107  if (discontinuity || newtype)
1108  {
1109  CheckTVChain();
1110  m_forcePositionMapSync = true;
1111  }
1112 
1113  Play();
1114  LOG(VB_PLAYBACK, LOG_INFO, LOC + "SwitchToProgram - end");
1115 }
1116 
1118 {
1119  LOG(VB_PLAYBACK, LOG_INFO, LOC + "JumpToProgram - start");
1120  bool discontinuity = false;
1121  bool newtype = false;
1122  int newid = -1;
1123  std::chrono::seconds nextpos = m_playerCtx->m_tvchain->GetJumpPos();
1124  ProgramInfo *pginfo = m_playerCtx->m_tvchain->GetSwitchProgram(discontinuity, newtype, newid);
1125  if (!pginfo)
1126  return;
1127 
1128  m_inJumpToProgramPause = true;
1129 
1130  bool newIsDummy = m_playerCtx->m_tvchain->GetInputType(newid) == "DUMMY";
1131  SetPlayingInfo(*pginfo);
1132 
1133  Pause();
1134  ChangeSpeed();
1135  ResetCaptions();
1136 
1137  // Release all frames to ensure the current decoder resources are released
1138  DiscardVideoFrames(true, true);
1139 
1140  m_playerCtx->m_tvchain->SetProgram(*pginfo);
1141  m_playerCtx->m_buffer->Reset(true);
1142 
1143  if (newIsDummy)
1144  {
1145  OpenDummy();
1146  ResetPlaying();
1148  delete pginfo;
1149  m_inJumpToProgramPause = false;
1150  return;
1151  }
1152 
1153  SendMythSystemPlayEvent("PLAY_CHANGED", pginfo);
1154 
1156  {
1157  // Restore original ringbuffer
1158  auto *ic = dynamic_cast<MythInteractiveBuffer*>(m_playerCtx->m_buffer);
1159  if (ic)
1160  m_playerCtx->m_buffer = ic->TakeBuffer();
1161  delete ic;
1162  }
1163 
1165  if (!m_playerCtx->m_buffer->IsOpen())
1166  {
1167  LOG(VB_GENERAL, LOG_ERR, LOC + QString("JumpToProgram's OpenFile failed (input type: %1)")
1168  .arg(m_playerCtx->m_tvchain->GetInputType(newid)));
1169  LOG(VB_GENERAL, LOG_ERR, m_playerCtx->m_tvchain->toString());
1171  SetErrored(tr("Error opening jump program file buffer"));
1172  delete pginfo;
1173  m_inJumpToProgramPause = false;
1174  return;
1175  }
1176 
1178 
1179  bool wasDummy = m_isDummy;
1180  if (newtype || wasDummy)
1181  {
1182  if (OpenFile() < 0)
1183  SetErrored(tr("Error opening jump program file"));
1184  }
1185  else
1186  ResetPlaying();
1187 
1188  if (IsErrored() || !m_decoder)
1189  {
1190  LOG(VB_GENERAL, LOG_ERR, LOC + "JumpToProgram failed.");
1191  if (!IsErrored())
1192  SetErrored(tr("Error reopening video decoder"));
1193  delete pginfo;
1194  m_inJumpToProgramPause = false;
1195  return;
1196  }
1197 
1199 
1200  // the bitrate is reset by m_playerCtx->m_buffer->OpenFile()...
1203 
1204  m_decoder->SetProgramInfo(*pginfo);
1205  delete pginfo;
1206 
1207  CheckTVChain();
1208  m_forcePositionMapSync = true;
1209  m_inJumpToProgramPause = false;
1210  Play();
1211  ChangeSpeed();
1212 
1213  // check that we aren't too close to the end of program.
1214  // and if so set it to 10s from the end if completed recordings
1215  // or 3s if live
1216  std::chrono::seconds duration = m_playerCtx->m_tvchain->GetLengthAtCurPos();
1217  std::chrono::seconds maxpos = m_playerCtx->m_tvchain->HasNext() ? 10s : 3s;
1218 
1219  if (nextpos > (duration - maxpos))
1220  {
1221  nextpos = duration - maxpos;
1222  if (nextpos < 0s)
1223  nextpos = 0s;
1224  }
1225  else if (nextpos < 0s)
1226  {
1227  // it's a relative position to the end
1228  nextpos += duration;
1229  }
1230 
1231  // nextpos is the new position to use in seconds
1232  uint64_t nextframe = TranslatePositionMsToFrame(nextpos, true);
1233 
1234  if (nextpos > 10s)
1235  DoJumpToFrame(nextframe, kInaccuracyNone);
1236 
1238  LOG(VB_PLAYBACK, LOG_INFO, LOC + "JumpToProgram - end");
1239 }
MythPlayer::IsNearEnd
bool IsNearEnd(void)
Returns true iff near end of recording.
Definition: mythplayer.cpp:1541
MythPlayerCaptionsUI::GetInteractiveTV
InteractiveTV * GetInteractiveTV() override
Definition: mythplayercaptionsui.cpp:523
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:789
MythPlayerUI::VideoStart
virtual void VideoStart()
Definition: mythplayerui.cpp:418
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:471
MythCoreContext::SendMessage
void SendMessage(const QString &message)
Definition: mythcorecontext.cpp:1515
hardwareprofile.smolt.timeout
float timeout
Definition: smolt.py:103
MythPlayer::m_videoPaused
bool m_videoPaused
Definition: mythplayer.h:401
PlayerContext::UnlockPlayingInfo
void UnlockPlayingInfo(const char *file, int line) const
Definition: playercontext.cpp:245
MythPlayer::m_watchingRecording
bool m_watchingRecording
Definition: mythplayer.h:412
MythPlayerUI::InitialiseState
void InitialiseState() override
Definition: mythplayerui.cpp:64
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:1086
MythPlayer::m_inJumpToProgramPause
bool m_inJumpToProgramPause
Definition: mythplayer.h:393
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:2677
kScan_Detect
@ kScan_Detect
Definition: videoouttypes.h:97
mythplayerui.h
MythPlayer::m_commBreakMap
CommBreakMap m_commBreakMap
Definition: mythplayer.h:483
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:667
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:1376
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:516
LiveTVChain::HasNext
bool HasNext(void) const
Definition: livetvchain.cpp:406
Jitterometer::SetNumCycles
void SetNumCycles(int cycles)
Definition: jitterometer.cpp:69
MythPlayerVisualiserUI::PrepareVisualiser
void PrepareVisualiser()
Definition: mythplayervisualiserui.cpp:132
MythPlayer::SeekingSlow
void SeekingSlow(int Count)
MythPlayer::m_avSync
MythPlayerAVSync m_avSync
Definition: mythplayer.h:438
MythPlayerUI::EnableFrameRateMonitor
void EnableFrameRateMonitor(bool Enable=false)
Definition: mythplayerui.cpp:918
MythPlayer::m_playSpeed
float m_playSpeed
Definition: mythplayer.h:496
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:498
kMusicChoice
@ kMusicChoice
Definition: mythplayer.h:77
MythPlayer::CheckTVChain
void CheckTVChain()
Definition: mythplayer.cpp:936
MythPlayer::OpenFile
virtual int OpenFile(int Retries=4)
Definition: mythplayer.cpp:426
MythPlayerUI::EventStart
virtual void EventStart()
Definition: mythplayerui.cpp:477
MythVideoBounds::GetDisplayVisibleRect
QRect GetDisplayVisibleRect(void) const
Definition: mythvideobounds.h:73
MythPlayerUI::GetCodecDescription
void GetCodecDescription(InfoMap &Map)
Definition: mythplayerui.cpp:845
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:729
MythPlayer::m_totalDuration
std::chrono::seconds m_totalDuration
Definition: mythplayer.h:435
Frame
Definition: zmdefines.h:93
OSD_WIN_INTERACT
static constexpr const char * OSD_WIN_INTERACT
Definition: mythcaptionsoverlay.h:9
PlayerContext::SetPlayerChangingBuffers
void SetPlayerChangingBuffers(bool val)
Definition: playercontext.h:93
MythPlayer::m_forcePositionMapSync
bool m_forcePositionMapSync
Definition: mythplayer.h:484
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:665
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
VERBOSE_LEVEL_CHECK
static bool VERBOSE_LEVEL_CHECK(uint64_t mask, LogLevel_t level)
Definition: mythlogging.h:29
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:500
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:376
MythPlayer::IsErrored
bool IsErrored(void) const
Definition: mythplayer.cpp:1958
MythPlayer::m_normalSpeed
bool m_normalSpeed
Definition: mythplayer.h:506
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:39
MythMediaBuffer::GetSafeFilename
QString GetSafeFilename(void)
Definition: mythmediabuffer.cpp:1748
MythPlayer::GetCurrentFrameCount
uint64_t GetCurrentFrameCount(void) const
Definition: mythplayer.cpp:1748
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:4882
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:1433
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:1073
MythPlayer::Pause
bool Pause(void)
Definition: mythplayer.cpp:157
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:924
MythPlayer::m_nextPlaySpeed
float m_nextPlaySpeed
Definition: mythplayer.h:495
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:495
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
OSD_WIN_MESSAGE
static constexpr const char * OSD_WIN_MESSAGE
Definition: osd.h:29
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:416
DecoderBase::SetWaitForChange
void SetWaitForChange(void)
Definition: decoderbase.cpp:899
MythPlayer::SeekingComplete
void SeekingComplete()
MythPlayerUI::ReinitVideo
void ReinitVideo(bool ForceUpdate) override
Definition: mythplayerui.cpp:403
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:1934
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:1718
MythPlayer::DiscardVideoFrames
void DiscardVideoFrames(bool KeyFrame, bool Flushed)
Places frames in the available frames queue.
Definition: mythplayer.cpp:654
MythPlayer::m_needNewPauseFrame
bool m_needNewPauseFrame
Definition: mythplayer.h:399
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:243
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:596
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:876
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:480
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: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:432
MythPlayer::m_rewindTime
long long m_rewindTime
Definition: mythplayer.h:436
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:427
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:1004
MythPlayer::SetPlayingInfo
void SetPlayingInfo(const ProgramInfo &pginfo)
Definition: mythplayer.cpp:235
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:470
PlayerContext::LockPlayingInfo
void LockPlayingInfo(const char *file, int line) const
Definition: playercontext.cpp:233
MythPlayer::m_bookmarkSeek
uint64_t m_bookmarkSeek
Definition: mythplayer.h:421
DecoderBase::GetfpsMultiplier
int GetfpsMultiplier(void) const
Definition: decoderbase.h:262
MythPlayer::DoJumpChapter
virtual bool DoJumpChapter(int chapter)
Definition: mythplayer.cpp:1844
MythPlayer::m_videoOutput
MythVideoOutput * m_videoOutput
Definition: mythplayer.h:372
MythPlayer::m_hasFullPositionMap
bool m_hasFullPositionMap
Definition: mythplayer.h:414
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
OSD_WIN_DEBUG
static constexpr const char * OSD_WIN_DEBUG
Definition: osd.h:33
MythMediaBuffer::ResetCommsError
void ResetCommsError(void)
Definition: mythmediabuffer.cpp:1774
MythPlayerOverlayUI::UpdateOSDPosition
void UpdateOSDPosition()
Update the OSD status/position window.
Definition: mythplayeroverlayui.cpp:59
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:573
MythPlayerUI::GetPlaybackData
void GetPlaybackData(InfoMap &Map)
Definition: mythplayerui.cpp:817
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:718
MythPlayer::ClearAfterSeek
void ClearAfterSeek(bool clearvideobuffers=true)
This is to support seeking...
Definition: mythplayer.cpp:1685
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:3298
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:709
MythPlayer::m_totalFrames
uint64_t m_totalFrames
Definition: mythplayer.h:433
MythPlayer::ResetPlaying
virtual void ResetPlaying(bool resetframes=true)
Definition: mythplayer.cpp:922
MythPlayer::m_videoFrameRate
double m_videoFrameRate
Video (input) Frame Rate (often inaccurate)
Definition: mythplayer.h:443
MythPlayer::UpdateFFRewSkip
bool UpdateFFRewSkip(float ffrewScale=1.0F)
Definition: mythplayer.cpp:1336
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:374
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:446
MythPlayerUI::DisplayPauseFrame
virtual void DisplayPauseFrame()
Definition: mythplayerui.cpp:645
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:524
MythPlayerUI::JumpToProgram
void JumpToProgram()
Definition: mythplayerui.cpp:1117
AvFormatDecoder
A decoder for media files.
Definition: avformatdecoder.h:82
MythPlayer::m_latestVideoTimecode
std::chrono::milliseconds m_latestVideoTimecode
Definition: mythplayer.h:437
MythPlayer::m_disableForcedSubtitles
bool m_disableForcedSubtitles
Definition: mythplayer.h:472
MythPlayerCaptionsUI::SafeFPS
double SafeFPS()
Definition: mythplayercaptionsui.cpp:611
MythPlayer::m_keyframeDist
uint m_keyframeDist
Video (input) Number of frames between key frames (often inaccurate)
Definition: mythplayer.h:453
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:566
MythPlayer::m_fpsMultiplier
int m_fpsMultiplier
used to detect changes
Definition: mythplayer.h:499
MythDisplay::GetRefreshInterval
std::chrono::microseconds GetRefreshInterval(std::chrono::microseconds Fallback) const
Definition: mythdisplay.cpp:812
uint
unsigned int uint
Definition: compat.h:81
MythPlayer::m_endExitPrompt
int m_endExitPrompt
Definition: mythplayer.h:422
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:54
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:995
MythPlayerAVSync::GetAVSyncData
void GetAVSyncData(InfoMap &Map) const
Definition: mythplayeravsync.cpp:49
interactivescreen.h
MythPlayer::GetAllowForcedSubtitles
bool GetAllowForcedSubtitles(void) const
Definition: mythplayer.h:210
CommBreakMap::GetSkipCommercials
int GetSkipCommercials(void) const
Definition: commbreakmap.h:34
MythPlayer::m_deleteMap
DeleteMap m_deleteMap
Definition: mythplayer.h:486
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:42
MythPlayer::DoFastForward
bool DoFastForward(uint64_t frames, double inaccuracy)
Definition: mythplayer.cpp:1590
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:26
MythPlayer::ReinitVideo
virtual void ReinitVideo(bool ForceUpdate)
Definition: mythplayer.cpp:298
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:1614
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:325
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:418
MythPlayer::InitFrameInterval
virtual void InitFrameInterval()
Definition: mythplayer.cpp:703
MythPlayerUI::SetLastPlayPosition
virtual void SetLastPlayPosition(uint64_t frame=0)
Definition: mythplayerui.cpp:797
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:1453
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:547
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
MythPlayerAVSync::DisplayTimecode
std::chrono::milliseconds & DisplayTimecode()
Definition: mythplayeravsync.h:31
MythPlayerCaptionsUI::LoadExternalSubtitles
void LoadExternalSubtitles()
Definition: mythplayercaptionsui.cpp:69
ProgramInfo
Holds information on recordings and videos.
Definition: programinfo.h:67
MythPlayerUI::InitialSeek
virtual void InitialSeek()
Definition: mythplayerui.cpp:106
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:1530
MythPlayerVideoUI::CheckAspectRatio
void CheckAspectRatio(MythVideoFrame *Frame)
Definition: mythplayervideoui.cpp:223
MythPlayer::IsWatchingInprogress
bool IsWatchingInprogress(void) const
Definition: mythplayer.cpp:131
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:504
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:76
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:558
avformatdecoder.h
AdjustFillMode
AdjustFillMode
Definition: videoouttypes.h:71
setpriority
#define setpriority(x, y, z)
Definition: compat.h:130
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:2546
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:261
MythPlayer::m_decodeOneFrame
bool m_decodeOneFrame
Definition: mythplayer.h:397
MythPlayer::SetPlaying
void SetPlaying(bool is_playing)
Definition: mythplayer.cpp:246
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:3052
MythVideoScanTracker::GetDeinterlacerName
QString GetDeinterlacerName()
Definition: mythvideoscantracker.cpp:117
MythMediaBuffer::GetAvailableBuffer
QString GetAvailableBuffer(void)
Definition: mythmediabuffer.cpp:1544
StreamInfo::m_forced
bool m_forced
Definition: decoderbase.h:103
MythPlayer::m_totalLength
std::chrono::seconds m_totalLength
Definition: mythplayer.h:434
MythPlayer::SetFrameInterval
void SetFrameInterval(FrameScanType scan, double frame_period)
Definition: mythplayer.cpp:693
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:513
MythPlayer::m_videoDim
QSize m_videoDim
Video (input) buffer width & height.
Definition: mythplayer.h:447
AudioPlayer::GetStretchFactor
float GetStretchFactor(void) const
Definition: audioplayer.h:68
MythPlayerUI::InitFrameInterval
void InitFrameInterval() override
Definition: mythplayerui.cpp:515
MythPlayerUI::SetWatched
void SetWatched(bool ForceWatched=false)
Determines if the recording should be considered watched.
Definition: mythplayerui.cpp:746
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:322
kTrackTypeRawText
@ kTrackTypeRawText
Definition: decoderbase.h:36
MythPlayer::m_videoAspect
float m_videoAspect
Video (input) Apect Ratio.
Definition: mythplayer.h:449
MythPlayerUI::RefreshPauseFrame
void RefreshPauseFrame()
Definition: mythplayerui.cpp:573
MythPlayer::m_allPaused
bool m_allPaused
Definition: mythplayer.h:402
ProgramInfo::SetIgnoreProgStart
void SetIgnoreProgStart(bool ignore)
If "ignore" is true QueryProgStart() will return 0, otherwise QueryProgStart() will return the progst...
Definition: programinfo.h:565
MythPlayerUI::ChangeSpeed
void ChangeSpeed() override
Definition: mythplayerui.cpp:396
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:935
PRIO_PROCESS
#define PRIO_PROCESS
Definition: compat.h:129
kCommSkipOff
@ kCommSkipOff
Definition: tv.h:132
MythVideoScanTracker
Definition: mythvideoscantracker.h:12
MythPlayerUI::UpdateOSDDebug
void UpdateOSDDebug()
Definition: mythplayerui.cpp:894
MythVideoFrame
Definition: mythframe.h:88
MythVideoScanTracker::ResetTracker
void ResetTracker()
Definition: mythvideoscantracker.cpp:39
MythPlayer::OpenDummy
void OpenDummy(void)
Definition: mythplayer.cpp:404
MythPlayerUI::ChangeOSDDebug
void ChangeOSDDebug()
Definition: mythplayerui.cpp:904
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:55
ProgramInfo::IsRecording
bool IsRecording(void) const
Definition: programinfo.h:486
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:805
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:1407
kOSDTimeout_Med
@ kOSDTimeout_Med
Definition: osd.h:60
MythPlayerUI::EventLoop
virtual void EventLoop()
Definition: mythplayerui.cpp:113
MythPlayer::kInaccuracyDefault
static const double kInaccuracyDefault
Definition: mythplayer.h:244
MythPlayerUI::StartPlaying
bool StartPlaying()
Definition: mythplayerui.cpp:70
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
MythPlayer::SeekingDone
void SeekingDone()
MythPlayerVideoUI::InitVideo
bool InitVideo() override
Definition: mythplayervideoui.cpp:31
DeleteMap::IsEditing
bool IsEditing(void) const
Definition: deletemap.h:40
MythMainWindow
Definition: mythmainwindow.h:28
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:190
kScan_Ignore
@ kScan_Ignore
Definition: videoouttypes.h:96
ProgramInfo::SaveLastPlayPos
void SaveLastPlayPos(uint64_t frame)
TODO Move to RecordingInfo.
Definition: programinfo.cpp:2714
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:396
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:398
tv_play.h
MythPlayer::DecoderStart
virtual void DecoderStart(bool start_paused)
Definition: mythplayer.cpp:1022
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