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
50 }
51 
53 {
54  LOG(VB_GENERAL, LOG_INFO, LOC + "Initialising player state");
56 }
57 
59 {
60  if (OpenFile() < 0)
61  {
62  LOG(VB_GENERAL, LOG_ERR, LOC + "Unable to open video file.");
63  return false;
64  }
65 
66  m_framesPlayed = 0;
67  m_rewindTime = m_ffTime = 0;
69  m_jumpChapter = 0;
72 
73  if (!InitVideo())
74  {
75  LOG(VB_GENERAL, LOG_ERR, LOC + "Unable to initialize video.");
77  return false;
78  }
79 
80  EventStart();
81  DecoderStart(true);
82  InitialSeek();
83  VideoStart();
84 
85  m_playerThread->setPriority(QThread::TimeCriticalPriority);
86 #ifdef Q_OS_ANDROID
87  setpriority(PRIO_PROCESS, m_playerThreadId, -20);
88 #endif
91  return !IsErrored();
92 }
93 
95 {
96  // TODO handle initial commskip and/or cutlist skip as well
97  if (m_bookmarkSeek > 30)
98  {
101  SetBookmark(true);
102  }
103 }
104 
106 {
107  // Handle decoder callbacks
109 
110  // Live TV program change
111  if (m_fileChanged)
112  FileChanged();
113 
114  // Check if visualiser is wanted on first start and after video change
116  AutoVisualise(!m_videoDim.isEmpty());
117 
118  // recreate the osd if a reinit was triggered by another thread
119  if (m_reinitOsd)
120  ReinitOSD();
121 
122  // enable/disable forced subtitles if signalled by the decoder
127 
128  // reset the scan (and hence deinterlacers) if triggered by the decoder
130 
131  // refresh the position map for an in-progress recording while editing
133  {
134  if (m_editUpdateTimer.hasExpired(2000))
135  {
136  // N.B. the positionmap update and osd refresh are asynchronous
137  m_forcePositionMapSync = true;
138  m_osdLock.lock();
140  m_osdLock.unlock();
141  m_editUpdateTimer.start();
142  }
143  }
144 
145  // Refresh the programinfo in use status
146  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
149  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
150 
151  // Disable timestretch if we are too close to the end of the buffer
152  if (m_ffrewSkip == 1 && (m_playSpeed > 1.0F) && IsNearEnd())
153  {
154  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Near end, Slowing down playback.");
155  Play(1.0F, true, true);
156  }
157 
159  {
160  // Switch from the dummy recorder to the tuned program in livetv
161  m_playerCtx->m_tvchain->JumpToNext(true, 0s);
162  JumpToProgram();
163  }
164  else if ((!m_allPaused || GetEof() != kEofStateNone) &&
167  {
168  // Switch to the next program in livetv
170  SwitchToProgram();
171  }
172 
173  // Jump to the next program in livetv
175  {
176  JumpToProgram();
177  }
178 
179  // Change interactive stream if requested
180  if (!m_newStream.isEmpty())
181  {
183  m_newStream = QString();
184  }
185 
186  // Disable fastforward if we are too close to the end of the buffer
187  if (m_ffrewSkip > 1 && (CalcMaxFFTime(100, false) < 100))
188  {
189  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Near end, stopping fastforward.");
190  Play(1.0F, true, true);
191  }
192 
193  // Disable rewind if we are too close to the beginning of the buffer
194  if (m_ffrewSkip < 0 && CalcRWTime(-m_ffrewSkip) >= 0 &&
196  {
197  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Near start, stopping rewind.");
198  float stretch = (m_ffrewSkip > 0) ? 1.0F : m_audio.GetStretchFactor();
199  Play(stretch, true, true);
200  }
201 
202  // Check for error
204  {
205  LOG(VB_GENERAL, LOG_ERR, LOC + "Unknown recorder error, exiting decoder");
206  if (!IsErrored())
207  SetErrored(tr("Irrecoverable recorder error"));
208  m_killDecoder = true;
209  return;
210  }
211 
212  // Handle speed change
213  if (!qFuzzyCompare(m_playSpeed + 1.0F, m_nextPlaySpeed + 1.0F) &&
215  {
216  ChangeSpeed();
217  return;
218  }
219 
220  // Check if we got a communication error, and if so pause playback
222  {
223  Pause();
225  }
226 
227  // Handle end of file
228  EofState eof = GetEof();
229  if (HasReachedEof())
230  {
231 #ifdef USING_MHEG
233  {
234  Pause();
235  return;
236  }
237 #endif
239  {
240  LOG(VB_GENERAL, LOG_NOTICE, LOC + "LiveTV forcing JumpTo 1");
241  m_playerCtx->m_tvchain->JumpToNext(true, 0s);
242  return;
243  }
244 
245  bool videoDrained =
247  bool audioDrained =
248  !m_audio.GetAudioOutput() ||
249  m_audio.IsPaused() ||
251  if (eof != kEofStateDelayed || (videoDrained && audioDrained))
252  {
253  if (eof == kEofStateDelayed)
254  {
255  LOG(VB_PLAYBACK, LOG_INFO,
256  QString("waiting for no video frames %1")
258  }
259  LOG(VB_PLAYBACK, LOG_INFO,
260  QString("HasReachedEof() at framesPlayed=%1 totalFrames=%2")
261  .arg(m_framesPlayed).arg(GetCurrentFrameCount()));
262  Pause();
263  SetPlaying(false);
264  return;
265  }
266  }
267 
268  // Handle rewind
269  if (m_rewindTime > 0 && (m_ffrewSkip == 1 || m_ffrewSkip == 0))
270  {
272  if (m_rewindTime > 0)
273  DoRewind(static_cast<uint64_t>(m_rewindTime), kInaccuracyDefault);
274  }
275 
276  // Handle fast forward
277  if (m_ffTime > 0 && (m_ffrewSkip == 1 || m_ffrewSkip == 0))
278  {
280  if (m_ffTime > 0)
281  {
282  DoFastForward(static_cast<uint64_t>(m_ffTime), kInaccuracyDefault);
283  if (GetEof() != kEofStateNone)
284  return;
285  }
286  }
287 
288  // Handle chapter jump
289  if (m_jumpChapter != 0)
291 
292  // Handle commercial skipping
293  if (m_commBreakMap.GetSkipCommercials() != 0 && (m_ffrewSkip == 1))
294  {
295  if (!m_commBreakMap.HasMap())
296  {
297  //: The commercials/adverts have not been flagged
298  SetOSDStatus(tr("Not Flagged"), kOSDTimeout_Med);
299  QString message = "COMMFLAG_REQUEST ";
300  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
301  message += QString("%1").arg(m_playerCtx->m_playingInfo->GetChanID()) +
303  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
304  gCoreContext->SendMessage(message);
305  }
306  else
307  {
308  QString msg;
309  uint64_t jumpto = 0;
310  uint64_t frameCount = GetCurrentFrameCount();
311  // XXX CommBreakMap should use duration map not m_videoFrameRate
312  bool jump = m_commBreakMap.DoSkipCommercials(jumpto, m_framesPlayed,
314  frameCount, msg);
315  if (!msg.isEmpty())
317  if (jump)
319  }
321  return;
322  }
323 
324  // Handle automatic commercial skipping
325  uint64_t jumpto = 0;
326  if (m_deleteMap.IsEmpty() && (m_ffrewSkip == 1) &&
329  {
330  QString msg;
331  uint64_t frameCount = GetCurrentFrameCount();
332  // XXX CommBreakMap should use duration map not m_videoFrameRate
335  frameCount, msg);
336  if (!msg.isEmpty())
338  if (jump)
340  }
341 
342  // Handle cutlist skipping
343  if (!m_allPaused && (m_ffrewSkip == 1) &&
345  {
346  if (jumpto == m_totalFrames)
347  {
350  }
351  else
352  {
354  }
355  }
356 }
357 
359 {
360 #ifdef USING_MHEG
361  // handle Interactive TV
362  if (GetInteractiveTV())
363  {
364  m_osdLock.lock();
365  m_itvLock.lock();
366  auto *window = qobject_cast<InteractiveScreen *>(m_captionsOverlay.GetWindow(OSD_WIN_INTERACT));
367  if ((m_interactiveTV->ImageHasChanged() || !m_itvVisible) && window)
368  {
370  m_itvVisible = true;
371  }
372  m_itvLock.unlock();
373  m_osdLock.unlock();
374  }
375 #endif // USING_MHEG
376 }
377 
379 {
381  // ensure we re-check double rate support following a speed change
382  UnlockScan();
383 }
384 
385 void MythPlayerUI::ReinitVideo(bool ForceUpdate)
386 {
387  MythPlayer::ReinitVideo(ForceUpdate);
388 
389  // Signal to the main thread to reinit OSD
390  m_reinitOsd = true;
391 
392  // Signal to main thread to reinit subtitles
394  emit EnableSubtitles(true);
395 
396  // Signal to the main thread to check auto visualise
397  m_checkAutoVisualise = true;
398 }
399 
401 {
402  QRect visible;
403  QRect total;
404  float aspect = NAN;
405  float scaling = NAN;
406 
407  m_osdLock.lock();
408  m_videoOutput->GetOSDBounds(total, visible, aspect, scaling, 1.0F);
409  m_osd.Init(visible, aspect);
410  m_captionsOverlay.Init(visible, aspect);
412 
413 #ifdef USING_MHEG
414  if (GetInteractiveTV())
415  {
416  QMutexLocker locker(&m_itvLock);
417  m_interactiveTV->Reinit(total, visible, aspect);
418  }
419 #endif // USING_MHEG
420 
421  // If there is a forced text subtitle track (which is possible
422  // in e.g. a .mkv container), and forced subtitles are
423  // allowed, then start playback with that subtitle track
424  // selected. Otherwise, use the frontend settings to decide
425  // which captions/subtitles (if any) to enable at startup.
426  // TODO: modify the fix to #10735 to use this approach
427  // instead.
428  bool hasForcedTextTrack = false;
429  uint forcedTrackNumber = 0;
431  {
432  uint numTextTracks = m_decoder->GetTrackCount(kTrackTypeRawText);
433  for (uint i = 0; !hasForcedTextTrack && i < numTextTracks; ++i)
434  {
436  {
437  hasForcedTextTrack = true;
438  forcedTrackNumber = i;
439  }
440  }
441  }
442  if (hasForcedTextTrack)
443  SetTrack(kTrackTypeRawText, static_cast<uint>(forcedTrackNumber));
444  else
446 
447  m_osdLock.unlock();
448 
449  SetPlaying(true);
450  ClearAfterSeek(false);
453 
456  AutoVisualise(!m_videoDim.isEmpty());
457 }
458 
460 {
461  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
462  {
464  {
465  // When initial playback gets underway, we override the ProgramInfo
466  // flags such that future calls to GetBookmark() will consider only
467  // an actual bookmark and not progstart or lastplaypos information.
471  }
472  }
473  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
475 }
476 
478 {
480 
481  if (m_videoPaused || m_isDummy)
483  else
485 
488  else if (m_decoder && m_decoder->GetEof() != kEofStateNone)
489  ++m_framesPlayed;
490  else
491  m_framesPlayed = static_cast<uint64_t>(m_videoOutput->GetFramesPlayed());
492  return !IsErrored();
493 }
494 
496 {
497  SetFrameInterval(GetScanType(), 1.0 / (m_videoFrameRate * static_cast<double>(m_playSpeed)));
499  LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("Display Refresh Rate: %1 Video Frame Rate: %2")
500  .arg(1000000.0 / m_display->GetRefreshInterval(m_frameInterval).count(), 0, 'f', 3)
501  .arg(1000000.0 / m_frameInterval.count(), 0, 'f', 3));
502 }
503 
504 void MythPlayerUI::RenderVideoFrame(MythVideoFrame *Frame, FrameScanType Scan, bool Prepare, std::chrono::microseconds Wait)
505 {
506  if (!m_videoOutput)
507  return;
508 
509  if (Prepare)
515  m_osd.Draw();
517 
518  if (Wait > 0us)
519  m_avSync.WaitForFrame(Wait);
520 
522 }
523 
525 {
526  m_fileChanged = false;
527  LOG(VB_PLAYBACK, LOG_INFO, LOC + "FileChanged");
528 
529  Pause();
530  ChangeSpeed();
531  if (dynamic_cast<AvFormatDecoder *>(m_decoder))
532  m_playerCtx->m_buffer->Reset(false, true);
533  else
534  m_playerCtx->m_buffer->Reset(false, true, true);
536  Play();
537 
539 
540  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
542  if (m_decoder)
544  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
545 
546  CheckTVChain();
547  m_forcePositionMapSync = true;
548 }
549 
551 {
553  {
555  {
557  m_needNewPauseFrame = false;
558 
559  if (m_deleteMap.IsEditing())
560  {
561  m_osdLock.lock();
563  m_osdLock.unlock();
564  }
565  }
566  else
567  {
568  m_decodeOneFrame = true;
569  }
570  }
571 }
572 
573 void MythPlayerUI::DoDisplayVideoFrame(MythVideoFrame* Frame, std::chrono::microseconds Due)
574 {
575  if (Due < 0us)
576  {
577  m_videoOutput->SetFramesPlayed(static_cast<long long>(++m_framesPlayed));
578  }
579  else if (!FlagIsSet(kVideoIsNull) && Frame)
580  {
581 
582  // Check scan type
583  bool showsecondfield = false;
584  FrameScanType ps = GetScanForDisplay(Frame, showsecondfield);
585 
586  // if we get here, we're actually going to do video output
587  RenderVideoFrame(Frame, ps, true, Due);
588 
589  // Only double rate CPU deinterlacers require an extra call to PrepareFrame
590  bool secondprepare = Frame->GetDoubleRateOption(DEINT_CPU) && !Frame->GetDoubleRateOption(DEINT_SHADER);
591  // and the first deinterlacing pass will have marked the frame as already deinterlaced
592  // which will break GetScanForDisplay below and subsequent deinterlacing
593  bool olddeinterlaced = Frame->m_alreadyDeinterlaced;
594  if (secondprepare)
595  Frame->m_alreadyDeinterlaced = false;
596  // Update scan settings now that deinterlacer has been set and we know
597  // whether we need a second field
598  ps = GetScanForDisplay(Frame, showsecondfield);
599 
600  // Reset olddeinterlaced if necessary (pause frame etc)
601  if (!showsecondfield && secondprepare)
602  {
603  Frame->m_alreadyDeinterlaced = olddeinterlaced;
604  }
605  else if (showsecondfield)
606  {
607  // Second field
608  if (kScan_Interlaced == ps)
609  ps = kScan_Intr2ndField;
610  RenderVideoFrame(Frame, ps, secondprepare, Due + m_frameInterval / 2);
611  }
612  }
613  else
614  {
615  m_avSync.WaitForFrame(Due);
616  }
617 }
618 
620 {
621  if (!m_videoOutput)
622  return;
623 
624  if (m_videoOutput->IsErrored())
625  {
626  SetErrored(tr("Serious error detected in Video Output"));
627  return;
628  }
629 
630  // clear the buffering state
631  SetBuffering(false);
632 
634  PreProcessNormalFrame(); // Allow interactiveTV to draw on pause frame
635 
638  RenderVideoFrame(nullptr, scan, true, 0ms);
639 }
640 
641 void MythPlayerUI::DisplayNormalFrame(bool CheckPrebuffer)
642 {
643  if (m_allPaused)
644  return;
645 
646  if (CheckPrebuffer && !PrebufferEnoughFrames())
647  return;
648 
649  // clear the buffering state
650  SetBuffering(false);
651 
652  // retrieve the next frame
655 
656  // Check aspect ratio
657  CheckAspectRatio(frame);
658 
660  UpdateFFRewSkip();
661 
662  // Player specific processing (dvd, bd, mheg etc)
664 
665  // handle scan type changes
667 
668  // Detect letter boxing
669  // FIXME this is temporarily moved entirely into the main thread as there are
670  // too many threading issues and the decoder thread is not yet ready to handle
671  // QObject signals and slots.
672  // When refactoring is complete, move it into the decoder thread and
673  // signal switches via a new field in MythVideoFrame
676  {
678  ReinitOSD();
679  }
680 
681  // When is the next frame due
682  std::chrono::microseconds due = m_avSync.AVSync(&m_audio, frame, m_frameInterval, m_playSpeed, !m_videoDim.isEmpty(),
684  // Display it
685  DoDisplayVideoFrame(frame, due);
688 }
689 
690 void MythPlayerUI::SetVideoParams(int Width, int Height, double FrameRate, float Aspect,
691  bool ForceUpdate, int ReferenceFrames,
692  FrameScanType Scan, const QString &CodecName)
693 {
694  MythPlayer::SetVideoParams(Width, Height, FrameRate, Aspect, ForceUpdate, ReferenceFrames,
695  Scan, CodecName);
696 
697  // ensure deinterlacers are correctly reset after a change
698  UnlockScan();
699  FrameScanType newscan = DetectInterlace(Scan, static_cast<float>(m_videoFrameRate), m_videoDispDim.height());
701  ResetTracker();
702 }
703 
718 void MythPlayerUI::SetWatched(bool ForceWatched)
719 {
720  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
722  {
723  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
724  return;
725  }
726 
727  uint64_t numFrames = GetCurrentFrameCount();
728 
729  // For recordings we want to ignore the post-roll and account for
730  // in-progress recordings where totalFrames doesn't represent
731  // the full length of the recording. For videos we can only rely on
732  // totalFrames as duration metadata can be wrong
735  {
736 
737  // If the recording is stopped early we need to use the recording end
738  // time, not the programme end time
740  qint64 starttime = pi->GetRecordingStartTime().toSecsSinceEpoch();
741  qint64 endactual = pi->GetRecordingEndTime().toSecsSinceEpoch();
742  qint64 endsched = pi->GetScheduledEndTime().toSecsSinceEpoch();
743  qint64 endtime = std::min(endactual, endsched);
744  numFrames = static_cast<uint64_t>((endtime - starttime) * m_videoFrameRate);
745  }
746 
747  // 4 minutes min, 12 minutes max
748  auto offset = std::chrono::seconds(lround(0.14 * (numFrames / m_videoFrameRate)));
749  offset = std::clamp(offset, 240s, 720s);
750 
751  if (ForceWatched || (m_framesPlayed > (numFrames - (offset.count() * m_videoFrameRate))))
752  {
754  LOG(VB_GENERAL, LOG_INFO, LOC + QString("Marking recording as watched using offset %1 minutes")
755  .arg(offset.count()/60));
756  }
757 
758  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
759 }
760 
762 {
763  m_playerCtx->LockPlayingInfo(__FILE__, __LINE__);
766  m_playerCtx->UnlockPlayingInfo(__FILE__, __LINE__);
767 }
768 
770 {
771  std::chrono::microseconds refreshinterval = 1us;
772  if (m_display)
773  refreshinterval = m_display->GetRefreshInterval(m_frameInterval);
774 
775  // At this point we may not have the correct frame rate.
776  // Since interlaced is always at 25 or 30 fps, if the interval
777  // is less than 30000 (33fps) it must be representing one
778  // field and not one frame, so multiply by 2.
779  std::chrono::microseconds realfi = m_frameInterval;
780  if (m_frameInterval < 30ms)
781  realfi = m_frameInterval * 2;
782  return (duration_cast<floatusecs>(realfi) / 2.0) > (duration_cast<floatusecs>(refreshinterval) * 0.995);
783 }
784 
786 {
787  QString samplerate = MythMediaBuffer::BitrateToString(static_cast<uint64_t>(m_audio.GetSampleRate()), true);
788  Map.insert("samplerate", samplerate);
789  Map.insert("filename", m_playerCtx->m_buffer->GetSafeFilename());
790  Map.insert("decoderrate", m_playerCtx->m_buffer->GetDecoderRate());
791  Map.insert("storagerate", m_playerCtx->m_buffer->GetStorageRate());
792  Map.insert("bufferavail", m_playerCtx->m_buffer->GetAvailableBuffer());
793  Map.insert("buffersize", QString::number(m_playerCtx->m_buffer->GetBufferSize() >> 20));
794  m_avSync.GetAVSyncData(Map);
795 
796  if (m_videoOutput)
797  {
798  QString frames = QString("%1/%2").arg(m_videoOutput->ValidVideoFrames())
800  Map.insert("videoframes", frames);
801  }
802  if (m_decoder)
803  Map["videodecoder"] = m_decoder->GetCodecDecoderName();
804 
805  Map["framerate"] = QString("%1%2%3")
806  .arg(static_cast<double>(m_outputJmeter.GetLastFPS()), 0, 'f', 2).arg(QChar(0xB1, 0))
807  .arg(static_cast<double>(m_outputJmeter.GetLastSD()), 0, 'f', 2);
808  Map["load"] = m_outputJmeter.GetLastCPUStats();
809 
810  GetCodecDescription(Map);
811 }
812 
814 {
815  Map["audiocodec"] = ff_codec_id_string(m_audio.GetCodec());
816  Map["audiochannels"] = QString::number(m_audio.GetOrigChannels());
817 
818  int width = m_videoDispDim.width();
819  int height = m_videoDispDim.height();
820  Map["videocodec"] = GetEncodingType();
821  if (m_decoder)
822  Map["videocodecdesc"] = m_decoder->GetRawEncodingType();
823  Map["videowidth"] = QString::number(width);
824  Map["videoheight"] = QString::number(height);
825  Map["videoframerate"] = QString::number(m_videoFrameRate, 'f', 2);
826  Map["deinterlacer"] = GetDeinterlacerName();
827 
828  if (width < 640)
829  return;
830 
831  bool interlaced = is_interlaced(GetScanType());
832  if (height > 2100)
833  Map["videodescrip"] = interlaced ? "UHD_4K_I" : "UHD_4K_P";
834  else if (width == 1920 || height == 1080 || height == 1088)
835  Map["videodescrip"] = interlaced ? "HD_1080_I" : "HD_1080_P";
836  else if ((width == 1280 || height == 720) && !interlaced)
837  Map["videodescrip"] = "HD_720_P";
838  else if (height >= 720)
839  Map["videodescrip"] = "HD";
840  else
841  Map["videodescrip"] = "SD";
842 }
843 
845 {
847  if (Visible)
848  {
849  // This should already have enabled the required monitors
850  m_osdDebugTimer.start();
851  }
852  else
853  {
854  // If we have cleared/escaped the debug OSD screen, then ChangeOSDDebug
855  // is not called, so we need to ensure we turn off the monitors
856  m_osdDebugTimer.stop();
859  }
860 }
861 
863 {
864  m_osdLock.lock();
865  InfoMap infoMap;
866  GetPlaybackData(infoMap);
869  m_osdLock.unlock();
870 }
871 
873 {
874  m_osdLock.lock();
875  bool enable = !m_osdDebug;
876  EnableBitrateMonitor(enable);
877  EnableFrameRateMonitor(enable);
878  if (enable)
879  UpdateOSDDebug();
880  else
882  m_osdDebug = enable;
883  m_osdLock.unlock();
884 }
885 
887 {
888  bool enable = VERBOSE_LEVEL_CHECK(VB_PLAYBACK, LOG_ANY) || Enable;
889  m_outputJmeter.SetNumCycles(enable ? static_cast<int>(m_videoFrameRate) : 0);
890 }
891 
893 {
894  if (m_playerCtx->m_buffer)
896 }
897 
898 /* JumpToStream, JumpToProgram and SwitchToProgram all need to be moved into the
899  * parent object and hopefully simplified. The fairly involved logic does not
900  * sit well with the new design objectives for the player classes and are better
901  * suited to the high level logic in TV.
902  */
903 void MythPlayerUI::JumpToStream(const QString &stream)
904 {
905  LOG(VB_PLAYBACK, LOG_INFO, LOC + "JumpToStream - begin");
906 
907  // Shouldn't happen
908  if (stream.isEmpty())
909  return;
910 
911  Pause();
912  ResetCaptions();
913 
914  ProgramInfo pginfo(stream);
915  SetPlayingInfo(pginfo);
916 
919  else
920  m_playerCtx->m_buffer->OpenFile(stream);
921 
922  if (!m_playerCtx->m_buffer->IsOpen())
923  {
924  LOG(VB_GENERAL, LOG_ERR, LOC + "JumpToStream buffer OpenFile failed");
926  SetErrored(tr("Error opening remote stream buffer"));
927  return;
928  }
929 
930  m_watchingRecording = false;
931  m_totalLength = 0s;
932  m_totalFrames = 0;
933  m_totalDuration = 0s;
934 
935  // 120 retries ~= 60 seconds
936  if (OpenFile(120) < 0)
937  {
938  LOG(VB_GENERAL, LOG_ERR, LOC + "JumpToStream OpenFile failed.");
940  SetErrored(tr("Error opening remote stream"));
941  return;
942  }
943 
944  if (m_totalLength == 0s)
945  {
946  long long len = m_playerCtx->m_buffer->GetRealFileSize();
947  m_totalLength = std::chrono::seconds(len / ((m_decoder->GetRawBitrate() * 1000) / 8));
948  m_totalFrames = static_cast<uint64_t>(m_totalLength.count() * SafeFPS());
949  }
950 
951  LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("JumpToStream length %1 bytes @ %2 Kbps = %3 Secs, %4 frames @ %5 fps")
953  .arg(m_totalLength.count()).arg(m_totalFrames).arg(m_decoder->GetFPS()) );
954 
956 
957  // the bitrate is reset by m_playerCtx->m_buffer->OpenFile()...
959  m_decoder->SetProgramInfo(pginfo);
960 
961  Play();
962  ChangeSpeed();
963 
965 #ifdef USING_MHEG
967 #endif
968 
969  LOG(VB_PLAYBACK, LOG_INFO, LOC + "JumpToStream - end");
970 }
971 
973 {
974  if (!IsReallyNearEnd())
975  return;
976 
977  LOG(VB_PLAYBACK, LOG_INFO, LOC + "SwitchToProgram - start");
978  bool discontinuity = false;
979  bool newtype = false;
980  int newid = -1;
981  ProgramInfo *pginfo = m_playerCtx->m_tvchain->GetSwitchProgram(discontinuity, newtype, newid);
982  if (!pginfo)
983  return;
984 
985  bool newIsDummy = m_playerCtx->m_tvchain->GetInputType(newid) == "DUMMY";
986 
987  SetPlayingInfo(*pginfo);
988  Pause();
989  ChangeSpeed();
990 
991  // Release all frames to ensure the current decoder resources are released
992  DiscardVideoFrames(true, true);
993 
994  if (newIsDummy)
995  {
996  OpenDummy();
997  ResetPlaying();
999  delete pginfo;
1000  return;
1001  }
1002 
1004  {
1005  // Restore original ringbuffer
1006  auto *ic = dynamic_cast<MythInteractiveBuffer*>(m_playerCtx->m_buffer);
1007  if (ic)
1008  m_playerCtx->m_buffer = ic->TakeBuffer();
1009  delete ic;
1010  }
1011 
1013 
1014  if (!m_playerCtx->m_buffer->IsOpen())
1015  {
1016  LOG(VB_GENERAL, LOG_ERR, LOC + QString("SwitchToProgram's OpenFile failed (input type: %1)")
1017  .arg(m_playerCtx->m_tvchain->GetInputType(newid)));
1018  LOG(VB_GENERAL, LOG_ERR, m_playerCtx->m_tvchain->toString());
1020  SetErrored(tr("Error opening switch program buffer"));
1021  delete pginfo;
1022  return;
1023  }
1024 
1025  if (GetEof() != kEofStateNone)
1026  {
1027  discontinuity = true;
1028  ResetCaptions();
1029  }
1030 
1031  LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("SwitchToProgram(void) "
1032  "discont: %1 newtype: %2 newid: %3 decoderEof: %4")
1033  .arg(discontinuity).arg(newtype).arg(newid).arg(GetEof()));
1034 
1035  if (discontinuity || newtype)
1036  {
1037  m_playerCtx->m_tvchain->SetProgram(*pginfo);
1038  if (m_decoder)
1039  m_decoder->SetProgramInfo(*pginfo);
1040 
1041  m_playerCtx->m_buffer->Reset(true);
1042  if (newtype)
1043  {
1044  if (OpenFile() < 0)
1045  SetErrored(tr("Error opening switch program file"));
1046  }
1047  else
1048  ResetPlaying();
1049  }
1050  else
1051  {
1053  if (m_decoder)
1054  {
1057  }
1058  }
1059  delete pginfo;
1060 
1061  if (IsErrored())
1062  {
1063  LOG(VB_GENERAL, LOG_ERR, LOC + "SwitchToProgram failed.");
1065  return;
1066  }
1067 
1069 
1070  // the bitrate is reset by m_playerCtx->m_buffer->OpenFile()...
1071  if (m_decoder)
1074 
1075  if (discontinuity || newtype)
1076  {
1077  CheckTVChain();
1078  m_forcePositionMapSync = true;
1079  }
1080 
1081  Play();
1082  LOG(VB_PLAYBACK, LOG_INFO, LOC + "SwitchToProgram - end");
1083 }
1084 
1086 {
1087  LOG(VB_PLAYBACK, LOG_INFO, LOC + "JumpToProgram - start");
1088  bool discontinuity = false;
1089  bool newtype = false;
1090  int newid = -1;
1091  std::chrono::seconds nextpos = m_playerCtx->m_tvchain->GetJumpPos();
1092  ProgramInfo *pginfo = m_playerCtx->m_tvchain->GetSwitchProgram(discontinuity, newtype, newid);
1093  if (!pginfo)
1094  return;
1095 
1096  m_inJumpToProgramPause = true;
1097 
1098  bool newIsDummy = m_playerCtx->m_tvchain->GetInputType(newid) == "DUMMY";
1099  SetPlayingInfo(*pginfo);
1100 
1101  Pause();
1102  ChangeSpeed();
1103  ResetCaptions();
1104 
1105  // Release all frames to ensure the current decoder resources are released
1106  DiscardVideoFrames(true, true);
1107 
1108  m_playerCtx->m_tvchain->SetProgram(*pginfo);
1109  m_playerCtx->m_buffer->Reset(true);
1110 
1111  if (newIsDummy)
1112  {
1113  OpenDummy();
1114  ResetPlaying();
1116  delete pginfo;
1117  m_inJumpToProgramPause = false;
1118  return;
1119  }
1120 
1121  SendMythSystemPlayEvent("PLAY_CHANGED", pginfo);
1122 
1124  {
1125  // Restore original ringbuffer
1126  auto *ic = dynamic_cast<MythInteractiveBuffer*>(m_playerCtx->m_buffer);
1127  if (ic)
1128  m_playerCtx->m_buffer = ic->TakeBuffer();
1129  delete ic;
1130  }
1131 
1133  if (!m_playerCtx->m_buffer->IsOpen())
1134  {
1135  LOG(VB_GENERAL, LOG_ERR, LOC + QString("JumpToProgram's OpenFile failed (input type: %1)")
1136  .arg(m_playerCtx->m_tvchain->GetInputType(newid)));
1137  LOG(VB_GENERAL, LOG_ERR, m_playerCtx->m_tvchain->toString());
1139  SetErrored(tr("Error opening jump program file buffer"));
1140  delete pginfo;
1141  m_inJumpToProgramPause = false;
1142  return;
1143  }
1144 
1146 
1147  bool wasDummy = m_isDummy;
1148  if (newtype || wasDummy)
1149  {
1150  if (OpenFile() < 0)
1151  SetErrored(tr("Error opening jump program file"));
1152  }
1153  else
1154  ResetPlaying();
1155 
1156  if (IsErrored() || !m_decoder)
1157  {
1158  LOG(VB_GENERAL, LOG_ERR, LOC + "JumpToProgram failed.");
1159  if (!IsErrored())
1160  SetErrored(tr("Error reopening video decoder"));
1161  delete pginfo;
1162  m_inJumpToProgramPause = false;
1163  return;
1164  }
1165 
1167 
1168  // the bitrate is reset by m_playerCtx->m_buffer->OpenFile()...
1171 
1172  m_decoder->SetProgramInfo(*pginfo);
1173  delete pginfo;
1174 
1175  CheckTVChain();
1176  m_forcePositionMapSync = true;
1177  m_inJumpToProgramPause = false;
1178  Play();
1179  ChangeSpeed();
1180 
1181  // check that we aren't too close to the end of program.
1182  // and if so set it to 10s from the end if completed recordings
1183  // or 3s if live
1184  std::chrono::seconds duration = m_playerCtx->m_tvchain->GetLengthAtCurPos();
1185  std::chrono::seconds maxpos = m_playerCtx->m_tvchain->HasNext() ? 10s : 3s;
1186 
1187  if (nextpos > (duration - maxpos))
1188  {
1189  nextpos = duration - maxpos;
1190  if (nextpos < 0s)
1191  nextpos = 0s;
1192  }
1193  else if (nextpos < 0s)
1194  {
1195  // it's a relative position to the end
1196  nextpos += duration;
1197  }
1198 
1199  // nextpos is the new position to use in seconds
1200  uint64_t nextframe = TranslatePositionMsToFrame(nextpos, true);
1201 
1202  if (nextpos > 10s)
1203  DoJumpToFrame(nextframe, kInaccuracyNone);
1204 
1206  LOG(VB_PLAYBACK, LOG_INFO, LOC + "JumpToProgram - end");
1207 }
MythPlayer::IsNearEnd
bool IsNearEnd(void)
Returns true iff near end of recording.
Definition: mythplayer.cpp:1541
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:761
OSD_WIN_INTERACT
#define OSD_WIN_INTERACT
Definition: mythcaptionsoverlay.h:9
MythPlayerUI::VideoStart
virtual void VideoStart()
Definition: mythplayerui.cpp:400
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:338
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:1529
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:52
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:1065
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)
TODO Move to RecordingInfo.
Definition: programinfo.cpp:2675
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: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:1372
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:515
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:438
MythPlayerUI::EnableFrameRateMonitor
void EnableFrameRateMonitor(bool Enable=false)
Definition: mythplayerui.cpp:886
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:283
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:915
MythPlayer::OpenFile
virtual int OpenFile(int Retries=4)
Definition: mythplayer.cpp:420
MythPlayerUI::EventStart
virtual void EventStart()
Definition: mythplayerui.cpp:459
MythVideoBounds::GetDisplayVisibleRect
QRect GetDisplayVisibleRect(void) const
Definition: mythvideobounds.h:73
MythPlayerUI::GetCodecDescription
void GetCodecDescription(InfoMap &Map)
Definition: mythplayerui.cpp:813
MythPlayerUI::DisplayNormalFrame
virtual void DisplayNormalFrame(bool CheckPrebuffer=true)
Definition: mythplayerui.cpp:641
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:707
MythPlayer::m_totalDuration
std::chrono::seconds m_totalDuration
Definition: mythplayer.h:435
Frame
Definition: zmdefines.h:93
PlayerContext::SetPlayerChangingBuffers
void SetPlayerChangingBuffers(bool val)
Definition: playercontext.h:92
MythPlayer::m_forcePositionMapSync
bool m_forcePositionMapSync
Definition: mythplayer.h:484
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:643
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: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:358
MythPlayer::IsErrored
bool IsErrored(void) const
Definition: mythplayer.cpp:1984
MythPlayer::m_normalSpeed
bool m_normalSpeed
Definition: mythplayer.h:505
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:396
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:1774
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:4809
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:1430
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:1052
MythPlayer::Pause
bool Pause(void)
Definition: mythplayer.cpp:159
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:66
MythPlayerUI::EnableBitrateMonitor
void EnableBitrateMonitor(bool Enable=false)
Definition: mythplayerui.cpp:892
MythPlayerAVSync::DisplayTimecode
std::chrono::milliseconds & DisplayTimecode()
Definition: mythplayeravsync.cpp:35
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:411
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:477
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:88
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:385
AudioPlayer::GetOrigChannels
int GetOrigChannels(void) const
Definition: audioplayer.h:65
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:403
MythPlayer::SetErrored
void SetErrored(const QString &reason)
Definition: mythplayer.cpp:1960
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:1744
MythPlayer::DiscardVideoFrames
void DiscardVideoFrames(bool KeyFrame, bool Flushed)
Places frames in the available frames queue.
Definition: mythplayer.cpp:637
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:573
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:844
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:74
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: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:277
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: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:972
MythPlayer::SetPlayingInfo
void SetPlayingInfo(const ProgramInfo &pginfo)
Definition: mythplayer.cpp:237
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:420
DecoderBase::GetfpsMultiplier
int GetfpsMultiplier(void) const
Definition: decoderbase.h:262
MythPlayer::DoJumpChapter
virtual bool DoJumpChapter(int chapter)
Definition: mythplayer.cpp:1870
MythPlayer::m_videoOutput
MythVideoOutput * m_videoOutput
Definition: mythplayer.h:372
MythPlayer::m_hasFullPositionMap
bool m_hasFullPositionMap
Definition: mythplayer.h:413
MythPlayer::m_clearSavedPosition
int m_clearSavedPosition
Definition: mythplayer.h:421
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:56
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
MythPlayerUI::GetPlaybackData
void GetPlaybackData(InfoMap &Map)
Definition: mythplayerui.cpp:785
CommBreakMap::LoadMap
void LoadMap(PlayerContext *player_ctx, uint64_t framesPlayed)
Definition: commbreakmap.cpp:49
clamp
float clamp(float val, float minimum, float maximum)
Definition: mythmiscutil.h:56
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:690
MythPlayer::ClearAfterSeek
void ClearAfterSeek(bool clearvideobuffers=true)
This is to support seeking...
Definition: mythplayer.cpp:1684
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:3225
MythVideoScanTracker::GetScanForDisplay
FrameScanType GetScanForDisplay(MythVideoFrame *Frame, bool &SecondField)
Definition: mythvideoscantracker.cpp:67
MythPlayer::SetBuffering
void SetBuffering(bool new_buffering)
Definition: mythplayer.cpp:687
MythPlayer::m_totalFrames
uint64_t m_totalFrames
Definition: mythplayer.h:433
MythPlayer::ResetPlaying
virtual void ResetPlaying(bool resetframes=true)
Definition: mythplayer.cpp:901
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:1333
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:446
MythPlayerUI::DisplayPauseFrame
virtual void DisplayPauseFrame()
Definition: mythplayerui.cpp:619
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:504
MythPlayerUI::JumpToProgram
void JumpToProgram()
Definition: mythplayerui.cpp:1085
AvFormatDecoder
A decoder for media files.
Definition: avformatdecoder.h:85
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:608
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:565
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:804
uint
unsigned int uint
Definition: compat.h:140
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:60
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:974
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:486
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: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:24
MythPlayer::ReinitVideo
virtual void ReinitVideo(bool ForceUpdate)
Definition: mythplayer.cpp:300
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:1615
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:327
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:681
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:1450
ProgramInfo::GetChanID
uint GetChanID(void) const
This is the unique key used in the database to locate tuning information.
Definition: programinfo.h:371
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:524
AudioPlayer::GetAudioOutput
AudioOutput * GetAudioOutput(void) const
Return internal AudioOutput object.
Definition: audioplayer.h:108
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:94
kEofStateImmediate
@ kEofStateImmediate
Definition: decoderbase.h:71
AudioPlayer::GetCodec
AVCodecID GetCodec(void) const
Definition: audioplayer.h:64
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:222
MythPlayer::IsWatchingInprogress
bool IsWatchingInprogress(void) const
Definition: mythplayer.cpp:133
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:503
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:47
Jitterometer::RecordCycleTime
bool RecordCycleTime()
Definition: jitterometer.cpp:72
AudioPlayer::GetSampleRate
int GetSampleRate(void) const
Definition: audioplayer.h:66
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:558
avformatdecoder.h
AdjustFillMode
AdjustFillMode
Definition: videoouttypes.h:71
setpriority
#define setpriority(x, y, z)
Definition: compat.h:204
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:2544
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:248
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:2979
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:434
MythPlayer::SetFrameInterval
void SetFrameInterval(FrameScanType scan, double frame_period)
Definition: mythplayer.cpp:671
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:512
MythPlayer::m_videoDim
QSize m_videoDim
Video (input) buffer width & height.
Definition: mythplayer.h:447
AudioPlayer::GetStretchFactor
float GetStretchFactor(void) const
Definition: audioplayer.h:70
MythPlayerUI::InitFrameInterval
void InitFrameInterval() override
Definition: mythplayerui.cpp:495
MythPlayerUI::SetWatched
void SetWatched(bool ForceWatched=false)
Determines if the recording should be considered watched.
Definition: mythplayerui.cpp:718
LiveTVChain::SetProgram
void SetProgram(const ProgramInfo &pginfo)
Definition: livetvchain.cpp:392
MythPlayerUI::m_osdDebug
bool m_osdDebug
Definition: mythplayerui.h:65
interactivetv.h
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:550
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:565
MythPlayerUI::ChangeSpeed
void ChangeSpeed() override
Definition: mythplayerui.cpp:378
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:903
PRIO_PROCESS
#define PRIO_PROCESS
Definition: compat.h:203
kCommSkipOff
@ kCommSkipOff
Definition: tv.h:132
MythVideoScanTracker
Definition: mythvideoscantracker.h:12
MythPlayerUI::UpdateOSDDebug
void UpdateOSDDebug()
Definition: mythplayerui.cpp:862
MythVideoFrame
Definition: mythframe.h:88
MythVideoScanTracker::ResetTracker
void ResetTracker()
Definition: mythvideoscantracker.cpp:39
MythPlayer::OpenDummy
void OpenDummy(void)
Definition: mythplayer.cpp:398
MythPlayerUI::ChangeOSDDebug
void ChangeOSDDebug()
Definition: mythplayerui.cpp:872
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: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: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:769
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:1403
kOSDTimeout_Med
@ kOSDTimeout_Med
Definition: osd.h:61
MythPlayerUI::EventLoop
virtual void EventLoop()
Definition: mythplayerui.cpp:105
MythPlayer::kInaccuracyDefault
static const double kInaccuracyDefault
Definition: mythplayer.h:245
MythPlayerUI::StartPlaying
bool StartPlaying()
Definition: mythplayerui.cpp:58
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
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:192
ProgramInfo::SetAllowLastPlayPos
void SetAllowLastPlayPos(bool allow)
If "ignore" is true QueryLastPlayPos() will return 0, otherwise QueryLastPlayPos() will return the la...
Definition: programinfo.h:573
kScan_Ignore
@ kScan_Ignore
Definition: videoouttypes.h:96
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:1001
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:154