MythTV  master
mythplayer.h
Go to the documentation of this file.
1 #ifndef MYTHPLAYER_H
2 #define MYTHPLAYER_H
3 
4 #include <cstdint>
5 #include <utility>
6 
7 #include <QCoreApplication>
8 #include <QList>
9 #include <QMutex> // for QMutex
10 #include <QTime> // for QTime
11 #include <QString> // for QString
12 #include <QRect> // for QRect
13 #include <QSize> // for QSize
14 #include <QStringList> // for QStringList
15 #include <QWaitCondition> // for QWaitCondition
16 
17 #include "playercontext.h"
18 #include "volumebase.h"
19 #include "osd.h"
20 #include "mythvideoout.h"
23 #include "captions/cc608reader.h"
24 #include "captions/cc708reader.h"
25 #include "decoders/decoderbase.h"
26 #include "deletemap.h"
27 #include "commbreakmap.h"
28 #include "audioplayer.h"
29 #include "audiooutputgraph.h"
30 #include "mthread.h" // for MThread
31 #include "mythavutil.h" // for VideoFrame
32 #include "mythtypes.h" // for InfoMap
33 #include "programtypes.h" // for frm_dir_map_t, etc
34 #include "tv.h" // for CommSkipMode
35 #include "videoouttypes.h" // for FrameScanType, PIPLocation, etc
36 #include "mythmiscutil.h"
37 
38 #include "mythtvexp.h"
39 
40 class MythVideoOutput;
41 class RemoteEncoder;
42 class MythSqlDatabase;
43 class ProgramInfo;
44 class DecoderBase;
45 class LiveTVChain;
46 class TV;
47 struct SwsContext;
48 class InteractiveTV;
49 class NSAutoreleasePool;
50 class DetectLetterbox;
51 class MythPlayer;
52 class Jitterometer;
53 class QThread;
54 class QWidget;
55 class MythMediaBuffer;
56 
57 using StatusCallback = void (*)(int, void*);
58 
60 enum TCTypes
61 {
62  TC_VIDEO = 0,
65  TC_CC
66 };
67 #define TCTYPESMAX 4
68 
69 // Caption Display modes
70 enum
71 {
72  kDisplayNone = 0x000,
76  kDisplayCC608 = 0x008,
77  kDisplayCC708 = 0x010,
85 };
86 
88 {
89  kNoFlags = 0x000000,
90  kDecodeLowRes = 0x000001,
92  kDecodeFewBlocks = 0x000004,
93  kDecodeNoLoopFilter = 0x000008,
94  kDecodeNoDecode = 0x000010,
95  kDecodeDisallowCPU = 0x000020, // NB CPU always available by default
96  kDecodeAllowGPU = 0x000040, // VDPAU, VAAPI, DXVA2
97  kDecodeAllowEXT = 0x000080, // VDA, CrystalHD
98  kVideoIsNull = 0x000100,
99  kAudioMuted = 0x010000,
100  kNoITV = 0x020000,
101  kMusicChoice = 0x040000,
102 };
103 
104 #define FlagIsSet(arg) (m_playerFlags & (arg))
105 
106 class DecoderThread : public MThread
107 {
108  public:
109  DecoderThread(MythPlayer *mp, bool start_paused)
110  : MThread("Decoder"), m_mp(mp), m_startPaused(start_paused) { }
111  ~DecoderThread() override { wait(); }
112 
113  protected:
114  void run(void) override; // MThread
115 
116  private:
119 };
120 
122 {
123  public:
124  MythMultiLocker(std::initializer_list<QMutex*> Locks);
125  MythMultiLocker() = delete;
127 
128  void Unlock(void);
129  void Relock(void);
130 
131  private:
132  Q_DISABLE_COPY(MythMultiLocker)
133  QVector<QMutex*> m_locks;
134 };
135 
137 {
138  public:
139  using Callback = void (*)(void*, void*, void*);
140  DecoderCallback() = default;
141  DecoderCallback(QString Debug, Callback Function, QAtomicInt *Ready,
142  void *Opaque1, void *Opaque2, void *Opaque3)
143  : m_debug(std::move(Debug)),
144  m_function(Function),
145  m_ready(Ready),
146  m_opaque1(Opaque1),
147  m_opaque2(Opaque2),
148  m_opaque3(Opaque3)
149  {
150  }
151 
152  QString m_debug;
153  Callback m_function { nullptr };
154  QAtomicInt *m_ready { nullptr };
155  void* m_opaque1 { nullptr };
156  void* m_opaque2 { nullptr };
157  void* m_opaque3 { nullptr };
158 };
159 
160 // Padding between class members reduced from 113 to 73 bytes, but its
161 // still higher than the default warning threshhold of 24 bytes.
162 //
163 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
165 {
166  Q_DECLARE_TR_FUNCTIONS(MythPlayer)
167 
168  // Do NOT add a decoder class to this list
169  friend class PlayerContext;
170  friend class CC708Reader;
171  friend class CC608Reader;
172  friend class DecoderThread;
173  friend class DetectLetterbox;
174  friend class TeletextScreen;
175  friend class SubtitleScreen;
176  friend class InteractiveScreen;
177  friend class BDOverlayScreen;
178  friend class VideoPerformanceTest;
179  // TODO remove these
180  friend class TV;
181  friend class Transcode;
182 
183  public:
184  explicit MythPlayer(PlayerFlags flags = kNoFlags);
185  MythPlayer(const MythPlayer& rhs);
186  virtual ~MythPlayer();
187 
188  // Initialisation
189  virtual int OpenFile(int Retries = 4);
190  bool InitVideo(void);
191 
192  // Public Sets
193  void SetPlayerInfo(TV *tv, QWidget *widget, PlayerContext *ctx);
194  void SetLength(int len) { m_totalLength = len; }
195  void SetFramesPlayed(uint64_t played);
196  void SetEof(EofState eof);
197  void SetPIPActive(bool is_active) { m_pipActive = is_active; }
198  void SetPIPVisible(bool is_visible) { m_pipVisible = is_visible; }
199 
200  void SetTranscoding(bool value);
201  void SetWatchingRecording(bool mode);
202  void SetWatched(bool forceWatched = false);
203  void SetKeyframeDistance(int keyframedistance);
204  void SetVideoParams(int w, int h, double fps, float aspect,
205  bool ForceUpdate, int ReferenceFrames,
207  const QString& codecName = QString());
208  void SetFileLength(int total, int frames);
209  void SetDuration(int duration);
210  void SetVideoResize(const QRect &videoRect);
211  void EnableFrameRateMonitor(bool enable = false);
212  void ForceDeinterlacer(bool DoubleRate, MythDeintType Deinterlacer);
213  void SetFrameRate(double fps);
214 
215  // Gets
216  QSize GetVideoBufferSize(void) const { return m_videoDim; }
217  QSize GetVideoSize(void) const { return m_videoDispDim; }
218  float GetVideoAspect(void) const { return m_videoAspect; }
219  float GetFrameRate(void) const { return m_videoFrameRate; }
220  void GetPlaybackData(InfoMap &infoMap);
221  bool IsAudioNeeded(void)
222  { return ((FlagIsSet(kVideoIsNull)) == 0) && m_playerCtx->IsAudioNeeded(); }
223  uint GetVolume(void) { return m_audio.GetVolume(); }
224  int GetFreeVideoFrames(void) const;
225  AspectOverrideMode GetAspectOverride(void) const;
226  AdjustFillMode GetAdjustFill(void) const;
227  MuteState GetMuteState(void) { return m_audio.GetMuteState(); }
228 
229  int GetFFRewSkip(void) const { return m_ffrewSkip; }
230  float GetPlaySpeed(void) const { return m_playSpeed; }
231  AudioPlayer* GetAudio(void) { return &m_audio; }
232  const AudioOutputGraph& GetAudioGraph() const { return m_audiograph; }
233  float GetAudioStretchFactor(void) { return m_audio.GetStretchFactor(); }
234  float GetNextPlaySpeed(void) const { return m_nextPlaySpeed; }
235  int GetLength(void) const { return m_totalLength; }
236  uint64_t GetTotalFrameCount(void) const { return m_totalFrames; }
237  uint64_t GetCurrentFrameCount(void) const;
238  uint64_t GetFramesPlayed(void) const { return m_framesPlayed; }
239  // GetSecondsPlayed() and GetTotalSeconds() internally calculate
240  // in terms of milliseconds and divide the result by 1000. This
241  // divisor can be passed in as an argument, e.g. pass divisor=1 to
242  // return the time in milliseconds.
243  virtual int64_t GetSecondsPlayed(bool honorCutList,
244  int divisor = 1000);
245  virtual int64_t GetTotalSeconds(bool honorCutList,
246  int divisor = 1000) const;
247  int64_t GetLatestVideoTimecode() const { return m_latestVideoTimecode; }
248  virtual uint64_t GetBookmark(void);
249  QString GetError(void) const;
250  QString GetEncodingType(void) const;
251  void GetCodecDescription(InfoMap &infoMap);
252  QString GetXDS(const QString &key) const;
253  PIPLocation GetNextPIPLocation(void) const;
254 
255  // Bool Gets
256  bool IsPaused(void) const { return m_allPaused; }
257  bool GetRawAudioState(void) const;
258  bool GetLimitKeyRepeat(void) const { return m_limitKeyRepeat; }
259  EofState GetEof(void) const;
260  bool IsErrored(void) const;
261  bool IsPlaying(uint wait_in_msec = 0, bool wait_for = true) const;
262  bool AtNormalSpeed(void) const { return m_nextNormalSpeed; }
263  bool IsReallyNearEnd(void) const;
264  bool IsNearEnd(void);
265  bool HasAudioOut(void) const { return m_audio.HasAudioOut(); }
266  bool IsPIPActive(void) const { return m_pipActive; }
267  bool IsPIPVisible(void) const { return m_pipVisible; }
268  bool IsMuted(void) { return m_audio.IsMuted(); }
269  bool PlayerControlsVolume(void) const { return m_audio.ControlsVolume(); }
270  bool UsingNullVideo(void) const { return FlagIsSet(kVideoIsNull); }
271  bool HasTVChainNext(void) const;
272  bool CanSupportDoubleRate(void);
273  bool IsWatchingInprogress(void) const;
274 
275  // Non-const gets
276  virtual char *GetScreenGrabAtFrame(uint64_t FrameNum, bool Absolute, int &BufferSize,
277  int &FrameWidth, int &FrameHeight, float &AspectRatio);
278  virtual char *GetScreenGrab(int SecondsIn, int &BufferSize, int &FrameWidth,
279  int &FrameHeight, float &AspectRatio);
280  InteractiveTV *GetInteractiveTV(void);
281  MythVideoOutput *GetVideoOutput(void) { return m_videoOutput; }
282  MythCodecContext *GetMythCodecContext(void) { return m_decoder->GetMythCodecContext(); }
283 
284  // Title stuff
285  virtual bool SwitchTitle(int /*title*/) { return false; }
286  virtual bool NextTitle(void) { return false; }
287  virtual bool PrevTitle(void) { return false; }
288 
289  // Angle stuff
290  virtual bool SwitchAngle(int /*title*/) { return false; }
291  virtual bool NextAngle(void) { return false; }
292  virtual bool PrevAngle(void) { return false; }
293 
294  // Transcode stuff
295  void InitForTranscode(bool copyaudio, bool copyvideo);
296  bool TranscodeGetNextFrame(int &did_ff, bool &is_key, bool honorCutList);
297  bool WriteStoredData(MythMediaBuffer *OutBuffer, bool WriteVideo, long TimecodeOffset);
298  long UpdateStoredFrameNum(long curFrameNum);
299  void SetCutList(const frm_dir_map_t &newCutList);
300 
301  // Decoder stuff..
302  VideoFrameType* DirectRenderFormats(void);
303  VideoFrame *GetNextVideoFrame(void);
304  VideoFrame *GetRawVideoFrame(long long frameNumber = -1);
305  VideoFrame *GetCurrentFrame(int &w, int &h);
306  void DeLimboFrame(VideoFrame *frame);
307  virtual void ReleaseNextVideoFrame(VideoFrame *buffer, int64_t timecode,
308  bool wrap = true);
309  void ReleaseCurrentFrame(VideoFrame *frame);
310  void DiscardVideoFrame(VideoFrame *buffer);
311  void DiscardVideoFrames(bool KeyFrame, bool Flushed);
313  DecoderBase *GetDecoder(void) { return m_decoder; }
314  virtual bool HasReachedEof(void) const;
315  void SetDisablePassThrough(bool disabled);
316  void ForceSetupAudioStream(void);
317  void HandleDecoderCallback(const QString &Debug, DecoderCallback::Callback Function,
318  void *Opaque1, void *Opaque2);
319  void ProcessCallbacks(void);
320 
321  // Reinit
322  void ReinitVideo(bool ForceUpdate);
323 
324  // Add data
325  virtual bool PrepareAudioSample(int64_t &timecode);
326 
327  // Public Closed caption and teletext stuff
328  uint GetCaptionMode(void) const { return m_textDisplayMode; }
329  virtual CC708Reader *GetCC708Reader(uint /*id*/=0) { return &m_cc708; }
330  virtual CC608Reader *GetCC608Reader(uint /*id*/=0) { return &m_cc608; }
331  virtual SubtitleReader *GetSubReader(uint /*id*/=0) { return &m_subReader; }
332  virtual TeletextReader *GetTeletextReader(uint /*id*/=0) { return &m_ttxReader; }
333 
334  // Public Audio/Subtitle/EIA-608/EIA-708 stream selection - thread safe
335  void TracksChanged(uint trackType);
336  void EnableSubtitles(bool enable);
337  void EnableForcedSubtitles(bool enable);
338  bool ForcedSubtitlesFavored(void) const {
339  return m_allowForcedSubtitles && !m_captionsEnabledbyDefault;
340  }
341  // How to handle forced Subtitles (i.e. when in a movie someone speaks
342  // in a different language than the rest of the movie, subtitles are
343  // forced on even if the user doesn't have them turned on.)
344  // These two functions are not thread-safe (UI thread use only).
345  void SetAllowForcedSubtitles(bool allow);
346  bool GetAllowForcedSubtitles(void) const { return m_allowForcedSubtitles; }
347 
348  // Public MHEG/MHI stream selection
349  bool SetAudioByComponentTag(int tag);
350  bool SetVideoByComponentTag(int tag);
351  bool SetStream(const QString &stream);
352  long GetStreamPos(); // mS
353  long GetStreamMaxPos(); // mS
354  long SetStreamPos(long ms); // mS
355  void StreamPlay(bool play = true);
356 
357  // LiveTV public stuff
358  void CheckTVChain();
359  void FileChangedCallback();
360 
361  // Chapter public stuff
362  virtual int GetNumChapters(void);
363  virtual int GetCurrentChapter(void);
364  virtual void GetChapterTimes(QList<long long> &times);
365 
366  // Title public stuff
367  virtual int GetNumTitles(void) const { return 0; }
368  virtual int GetCurrentTitle(void) const { return 0; }
369  virtual int GetTitleDuration(int /*title*/) const { return 0; }
370  virtual QString GetTitleName(int /*title*/) const { return QString(); }
371 
372  // Angle public stuff
373  virtual int GetNumAngles(void) const { return 0; }
374  virtual int GetCurrentAngle(void) const { return 0; }
375  virtual QString GetAngleName(int /*title*/) const { return QString(); }
376 
377  // DVD public stuff
378  virtual bool GoToMenu(const QString& /*str*/) { return false; }
379  virtual void GoToDVDProgram(bool direction) { (void) direction; }
380  virtual bool IsInStillFrame() const { return false; }
381 
382  // Position Map Stuff
383  bool PosMapFromEnc(uint64_t start,
384  frm_pos_map_t &posMap,
385  frm_pos_map_t &durMap);
386 
387  // OSD locking for TV class
388  bool TryLockOSD(void) { return m_osdLock.tryLock(50); }
389  void LockOSD(void) { m_osdLock.lock(); }
390  void UnlockOSD(void) { m_osdLock.unlock(); }
391 
392  // Public picture controls
393  void ToggleNightMode(void);
394 
395  // Visualisations
396  bool CanVisualise(void);
397  bool IsVisualising(void);
398  QString GetVisualiserName(void);
399  QStringList GetVisualiserList(void);
400  bool EnableVisualisation(bool enable, const QString &name = QString(""));
401  void AutoVisualise(void);
402 
403  void SaveTotalDuration(void);
404  void ResetTotalDuration(void);
405 
408  static const double kInaccuracyNone;
409  static const double kInaccuracyDefault;
410  static const double kInaccuracyEditor;
411  static const double kInaccuracyFull;
412 
413  void SaveTotalFrames(void);
414  void SetErrored(const QString &reason);
415 
416  protected:
417  // Initialization
418  void OpenDummy(void);
419 
420  // Non-public sets
421  virtual void SetBookmark(bool clear = false);
422  bool AddPIPPlayer(MythPlayer *pip, PIPLocation loc);
423  bool RemovePIPPlayer(MythPlayer *pip);
424 
425  FrameScanType NextScanOverride(void);
426  void SetScanOverride(FrameScanType Scan);
427  void SetScanType(FrameScanType Scan);
428  FrameScanType GetScanType(void) const;
429 
430  void Zoom(ZoomDirection direction);
431  void ToggleMoveBottomLine(void);
432  void SaveBottomLine(void);
433  void FileChanged(void);
434 
435  // Windowing stuff
436  void EmbedInWidget(QRect rect);
437  void StopEmbedding(void);
438  bool IsEmbedding(void);
439  void WindowResized(const QSize &new_size);
440 
441  // Audio Sets
442  uint AdjustVolume(int change) { return m_audio.AdjustVolume(change); }
443  uint SetVolume(int newvolume) { return m_audio.SetVolume(newvolume); }
444  bool SetMuted(bool mute) { return m_audio.SetMuted(mute); }
445  MuteState SetMuteState(MuteState state) { return m_audio.SetMuteState(state); }
446  MuteState IncrMuteState(void) { return m_audio.IncrMuteState(); }
447 
448  // Non-const gets
449  OSD *GetOSD(void) { return m_osd; }
450  virtual void SeekForScreenGrab(uint64_t &number, uint64_t frameNum,
451  bool absolute);
452 
453  // Complicated gets
454  virtual long long CalcMaxFFTime(long long ff, bool setjump = true) const;
455  long long CalcRWTime(long long rw) const;
456  virtual void calcSliderPos(osdInfo &info, bool paddedFields = false);
457  uint64_t TranslatePositionFrameToMs(uint64_t position,
458  bool use_cutlist) const;
459  uint64_t TranslatePositionMsToFrame(uint64_t position,
460  bool use_cutlist) const {
461  return m_deleteMap.TranslatePositionMsToFrame(position,
462  GetFrameRate(),
463  use_cutlist);
464  }
465  // TranslatePositionAbsToRel and TranslatePositionRelToAbs are
466  // used for frame calculations when seeking relative to a number
467  // of frames rather than by time.
468  uint64_t TranslatePositionAbsToRel(uint64_t position) const {
469  return m_deleteMap.TranslatePositionAbsToRel(position);
470  }
471  uint64_t TranslatePositionRelToAbs(uint64_t position) const {
472  return m_deleteMap.TranslatePositionRelToAbs(position);
473  }
474  float ComputeSecs(uint64_t position, bool use_cutlist) const {
475  return TranslatePositionFrameToMs(position, use_cutlist) / 1000.0;
476  }
477  uint64_t FindFrame(float offset, bool use_cutlist) const;
478 
479  // Commercial stuff
481  { m_commBreakMap.SetAutoCommercialSkip(autoskip, m_framesPlayed); }
482  void SkipCommercials(int direction)
483  { m_commBreakMap.SkipCommercials(direction); }
484  void SetCommBreakMap(frm_dir_map_t &newMap);
486  { return m_commBreakMap.GetAutoCommercialSkip(); }
487 
488  // Toggle Sets
489  void ToggleAspectOverride(AspectOverrideMode aspectMode = kAspect_Toggle);
490  void ToggleAdjustFill(AdjustFillMode adjustfillMode = kAdjustFill_Toggle);
491 
492  // Start/Reset/Stop playing
493  virtual bool StartPlaying(void);
494  virtual void ResetPlaying(bool resetframes = true);
495  virtual void EndPlaying(void) { }
496  virtual void StopPlaying(void);
497 
498  // Pause stuff
499  bool PauseDecoder(void);
500  void UnpauseDecoder(void);
501  bool Pause(void);
502  bool Play(float speed = 1.0, bool normal = true, bool unpauseaudio = true);
503 
504  // Seek stuff
505  virtual bool FastForward(float seconds);
506  virtual bool Rewind(float seconds);
507  virtual bool JumpToFrame(uint64_t frame);
508 
509  // Chapter stuff
510  void JumpChapter(int chapter);
511 
512  // Playback
513  virtual bool PrebufferEnoughFrames(int min_buffers = 0);
514  void SetBuffering(bool new_buffering);
515  void RefreshPauseFrame(void);
516  void CheckAspectRatio(VideoFrame* frame);
517  virtual void DisplayPauseFrame(void);
518  virtual void DisplayNormalFrame(bool check_prebuffer = true);
519  virtual void PreProcessNormalFrame(void);
520  virtual void VideoStart(void);
521  virtual bool VideoLoop(void);
522  virtual void VideoEnd(void);
523  virtual void DecoderStart(bool start_paused);
524  virtual void DecoderLoop(bool pause);
525  virtual void DecoderEnd(void);
526  virtual void DecoderPauseCheck(void);
527  virtual void AudioEnd(void);
528  virtual void EventStart(void);
529  virtual void EventLoop(void);
530  virtual void InitialSeek(void);
531 
532  // Protected MHEG/MHI stuff
533  bool ITVHandleAction(const QString &action);
534  void ITVRestart(uint chanid, uint cardid, bool isLiveTV);
535 
536  // Edit mode stuff
537  bool EnableEdit(void);
538  bool HandleProgramEditorActions(QStringList &actions);
539  bool GetEditMode(void) const { return m_deleteMap.IsEditing(); }
540  void DisableEdit(int howToSave);
541  bool IsInDelete(uint64_t frame);
542  uint64_t GetNearestMark(uint64_t frame, bool right);
543  bool IsTemporaryMark(uint64_t frame);
544  bool HasTemporaryMark(void);
545  bool IsCutListSaved(void) { return m_deleteMap.IsSaved(); }
546  bool DeleteMapHasUndo(void) { return m_deleteMap.HasUndo(); }
547  bool DeleteMapHasRedo(void) { return m_deleteMap.HasRedo(); }
548  QString DeleteMapGetUndoMessage(void) { return m_deleteMap.GetUndoMessage(); }
549  QString DeleteMapGetRedoMessage(void) { return m_deleteMap.GetRedoMessage(); }
550 
551  // Reinit
552  void ReinitOSD(void);
553 
554  // OSD conveniences
555  void SetOSDMessage(const QString &msg, OSDTimeout timeout);
556  void SetOSDStatus(const QString &title, OSDTimeout timeout);
557 
558  // Closed caption and teletext stuff
559  void ResetCaptions(void);
560  bool ToggleCaptions(void);
561  bool ToggleCaptions(uint type);
562  bool HasTextSubtitles(void) { return m_subReader.HasTextSubtitles(); }
563  void SetCaptionsEnabled(bool enable, bool osd_msg=true);
564  bool GetCaptionsEnabled(void) const;
565  virtual void DisableCaptions(uint mode, bool osd_msg=true);
566  virtual void EnableCaptions(uint mode, bool osd_msg=true);
567 
568  // Audio/Subtitle/EIA-608/EIA-708 stream selection
569  QStringList GetTracks(uint type);
570  uint GetTrackCount(uint type);
571  virtual int SetTrack(uint type, int trackNo);
572  int GetTrack(uint type);
573  int ChangeTrack(uint type, int dir);
574  void ChangeCaptionTrack(int dir);
575  bool HasCaptionTrack(int mode);
576  int NextCaptionTrack(int mode);
577  void DoDisableForcedSubtitles(void);
578  void DoEnableForcedSubtitles(void);
579 
580  // Teletext Menu and non-NUV teletext decoder
581  void EnableTeletext(int page = 0x100);
582  void DisableTeletext(void);
583  void ResetTeletext(void);
584  bool HandleTeletextAction(const QString &action);
585 
586  // Teletext NUV Captions
587  void SetTeletextPage(uint page);
588 
589  // Time Code adjustment stuff
590  int64_t AdjustAudioTimecodeOffset(int64_t v, int newsync = -9999);
591  int64_t GetAudioTimecodeOffset(void) const
592  { return m_tcWrap[TC_AUDIO]; }
593 
594  // Playback (output) zoom automation
596 
597  protected:
598  // Private initialization stuff
599  FrameScanType detectInterlace(FrameScanType newScan, FrameScanType scan,
600  float fps, int video_height) const;
601  virtual void AutoDeint(VideoFrame* frame, bool allow_lock = true);
602 
603  // Private Sets
604  void SetPlayingInfo(const ProgramInfo &pginfo);
605  void SetPlaying(bool is_playing);
606  void ResetErrored(void);
607 
608  // Private Gets
609  int GetStatusbarPos(void) const;
610 
611  // Private pausing stuff
612  void PauseVideo(void);
613  void UnpauseVideo(void);
614  void PauseBuffer(void);
615  void UnpauseBuffer(void);
616 
617  // Private decoder stuff
618  virtual void CreateDecoder(char *TestBuffer, int TestSize);
619  void SetDecoder(DecoderBase *dec);
621  const DecoderBase *GetDecoder(void) const { return m_decoder; }
622  bool DecodeFrame(struct rtframeheader *frameheader,
623  unsigned char *strm, unsigned char *outbuf);
624 
625  virtual bool DecoderGetFrameFFREW(void);
626  virtual bool DecoderGetFrameREW(void);
627  bool DecoderGetFrame(DecodeType decodetype, bool unsafe = false);
628  bool DoGetFrame(DecodeType DecodeType);
629 
630  // These actually execute commands requested by public members
631  bool UpdateFFRewSkip(void);
632  virtual void ChangeSpeed(void);
633  // The "inaccuracy" argument is generally one of the kInaccuracy* values.
634  bool DoFastForward(uint64_t frames, double inaccuracy);
635  bool DoRewind(uint64_t frames, double inaccuracy);
636  bool DoFastForwardSecs(float secs, double inaccuracy, bool use_cutlist);
637  bool DoRewindSecs(float secs, double inaccuracy, bool use_cutlist);
638  void DoJumpToFrame(uint64_t frame, double inaccuracy);
639 
640  // Private seeking stuff
641  void WaitForSeek(uint64_t frame, uint64_t seeksnap_wanted);
642  void ClearAfterSeek(bool clearvideobuffers = true);
643  void ClearBeforeSeek(uint64_t Frames);
644 
645  // Private chapter stuff
646  virtual bool DoJumpChapter(int chapter);
647  virtual int64_t GetChapter(int chapter);
648 
649  // Private edit stuff
650  void HandleArbSeek(bool right);
651 
652  // Private A/V Sync Stuff
653  void WrapTimecode(int64_t &timecode, TCTypes tc_type);
654  void InitAVSync(void);
655  virtual void AVSync(VideoFrame *buffer);
656  bool PipSync(void);
657  void ResetAVSync(void);
658  void SetFrameInterval(FrameScanType scan, double frame_period);
659  void WaitForTime(int64_t framedue);
660 
661  // Private LiveTV stuff
662  void SwitchToProgram(void);
663  void JumpToProgram(void);
664  void JumpToStream(const QString &stream);
665 
666  protected:
667  DecoderBase *m_decoder {nullptr};
669  QVector<DecoderCallback> m_decoderCallbacks;
670  mutable QMutex m_decoderChangeLock {QMutex::Recursive};
671  MythVideoOutput *m_videoOutput {nullptr};
672  PlayerContext *m_playerCtx {nullptr};
673  DecoderThread *m_decoderThread {nullptr};
674  QThread *m_playerThread {nullptr};
675 #ifdef Q_OS_ANDROID
676  int m_playerThreadId {0};
677 #endif
679 
680  // Window stuff
681  MythDisplay* m_display {nullptr};
682  QWidget *m_parentWidget {nullptr};
683  QRect m_embedRect {0,0,0,0};
684  bool m_embedding {false};
685 
686  // State
687  QWaitCondition m_decoderThreadPause;
688  QWaitCondition m_decoderThreadUnpause;
689  mutable QMutex m_decoderPauseLock;
690  mutable QMutex m_decoderSeekLock;
691  mutable QMutex m_bufferPauseLock;
692  mutable QMutex m_videoPauseLock;
693  mutable QMutex m_pauseLock;
694  int64_t m_decoderSeek {-1};
695  bool m_totalDecoderPause {false};
696  bool m_decoderPaused {false};
697  bool m_inJumpToProgramPause {false};
698  bool m_pauseDecoder {false};
699  bool m_unpauseDecoder {false};
700  bool volatile m_killDecoder {false};
701  bool m_decodeOneFrame {false};
702  bool m_needNewPauseFrame {false};
703  bool m_bufferPaused {false};
704  bool m_videoPaused {false};
705  bool m_allPaused {false};
706  bool m_playing {false};
707 
708  mutable QWaitCondition m_playingWaitCond;
709  mutable QMutex m_vidExitLock;
710  mutable QMutex m_playingLock;
711  mutable QMutex m_errorLock;
712  QString m_errorMsg;
713  int m_errorType {kError_None};
714  bool m_doubleFramerate {false};
715  bool m_liveTV {false};
716  bool m_watchingRecording {false};
717  bool m_transcoding {false};
718  bool m_hasFullPositionMap {false};
719  mutable bool m_limitKeyRepeat {false};
720 
721  // Chapter stuff
722  int m_jumpChapter {0};
723 
724  // Bookmark stuff
725  uint64_t m_bookmarkSeek {0};
726  int m_clearSavedPosition {1};
728 
729  // Seek
732  long long m_ffTime {0};
733 
734  // Playback misc.
736  int m_videobufRetries {0};
737  uint64_t m_framesPlayed {0};
738  uint64_t m_totalFrames {0};
739  long long m_totalLength {0};
740  int64_t m_totalDuration {0};
741  long long m_rewindTime {0};
742  int64_t m_latestVideoTimecode {-1};
743  QElapsedTimer m_avTimer;
744 
745  // Tracks deinterlacer for Debug OSD
746  MythDeintType m_lastDeinterlacer { DEINT_NONE };
747  bool m_lastDeinterlacer2x { false };
748  VideoFrameType m_lastFrameCodec { FMT_NONE };
749 
750  // -- end state stuff --
751 
752  // Input Video Attributes
753  double m_videoFrameRate {29.97};
754  QString m_codecName;
756  QSize m_videoDispDim {0,0};
757  QSize m_videoDim {0,0};
758  int m_maxReferenceFrames {0};
759  float m_videoAspect {4.0F / 3.0F};
760  float m_forcedVideoAspect {-1};
761 
762  long long m_scanTracker { 0 };
763  FrameScanType m_resetScan { kScan_Ignore };
765  FrameScanType m_scanOverride { kScan_Detect };
766  bool m_scanLocked { false };
767  bool m_scanInitialized { false };
768 
770  uint m_keyframeDist {30};
771 
772  // Buffering
773  bool m_buffering {false};
776 
777  // General Caption/Teletext/Subtitle support
778  uint m_textDisplayMode {kDisplayNone};
779  uint m_prevTextDisplayMode {kDisplayNone};
780  uint m_prevNonzeroTextDisplayMode {kDisplayNone};
781 
782  // Support for analog captions and teletext
783  // (i.e. Vertical Blanking Interval (VBI) encoded data.)
784  uint m_vbiMode {VBIMode::None};
785  int m_ttPageNum {0x888};
786 
787  // Support for captions, teletext, etc. decoded by libav
792  bool m_captionsEnabledbyDefault {false};
793  bool m_textDesired {false};
794  bool m_enableCaptions {false};
795  bool m_disableCaptions {false};
796  bool m_enableForcedSubtitles {false};
797  bool m_disableForcedSubtitles {false};
798  bool m_allowForcedSubtitles {true};
799 
800  // CC608/708
803 
804  // Support for MHEG/MHI
805  InteractiveTV *m_interactiveTV {nullptr};
806  QMutex m_itvLock;
807  QMutex m_streamLock;
808  QString m_newStream; // Guarded by streamLock
809  bool m_itvVisible {false};
810  bool m_itvEnabled {false};
811 
812  // OSD stuff
813  OSD *m_osd {nullptr};
814  bool m_reinitOsd {false};
815  QMutex m_osdLock {QMutex::Recursive};
816 
817  // Audio stuff
820 
821  // Picture-in-Picture
824  volatile bool m_pipActive {false};
825  volatile bool m_pipVisible {true};
826 
827  // Commercial filtering
829  bool m_forcePositionMapSync {false};
830  // Manual editing
832  QElapsedTimer m_editUpdateTimer;
833  float m_speedBeforeEdit {1.0F};
834  bool m_pausedBeforeEdit {false};
835 
836  // Playback (output) speed control
838  QMutex m_decoderLock {QMutex::Recursive};
839  float m_nextPlaySpeed {1.0F};
840  float m_playSpeed {1.0F};
841  int m_frameInterval {static_cast<int>((1000000.0F / 30))};
842  int m_frameIntervalPrev {0};
843  int m_fpsMultiplier {1};
844  int m_ffrewSkip {1};
845  int m_ffrewAdjust {0};
846  bool m_fileChanged {false};
847  bool m_nextNormalSpeed {true};
848  bool m_normalSpeed {true};
849 
850  // Audio and video synchronization stuff
851  bool m_avsyncAudioPaused {false};
852  int m_avsyncAvg {0};
853  int64_t m_dispTimecode {0};
854  int64_t m_rtcBase {0}; // real time clock base for presentation time (microsecs)
855  int64_t m_maxTcVal {0}; // maximum to date video tc
856  int64_t m_priorAudioTimecode {0}; // time code from prior frame
857  int64_t m_priorVideoTimecode {0}; // time code from prior frame
858  int64_t m_timeOffsetBase {0};
859  int m_maxTcFrames {0}; // number of frames seen since max to date tc
860  int m_numDroppedFrames {0}; // number of consecutive dropped frames.
861  float m_lastFix {0.0F}; //last sync adjustment to prior frame
862 
863  // Time Code stuff
864  int m_prevTc {0};
865  int m_prevRp {0};
866  int64_t m_tcWrap[TCTYPESMAX] {};
867  int64_t m_tcLastVal[TCTYPESMAX] {};
868  int64_t m_savedAudioTimecodeOffset {0};
869 
870  // LiveTV
871  TV *m_tv {nullptr};
872  bool m_isDummy {false};
873 
874  // Counter for buffering messages
875  int m_bufferingCounter {0};
876 
877  // Debugging variables
878  Jitterometer *m_outputJmeter {nullptr};
879 
880  private:
881  void syncWithAudioStretch();
882  bool m_disablePassthrough {false};
883 };
884 
885 #endif
886 
887 /* vim: set expandtab tabstop=4 shiftwidth=4: */
MythPlayer::GetTeletextReader
virtual TeletextReader * GetTeletextReader(uint=0)
Definition: mythplayer.h:332
rtframeheader
Definition: format.h:31
kAspect_Toggle
@ kAspect_Toggle
Definition: videoouttypes.h:46
MythPlayer::m_streamLock
QMutex m_streamLock
Definition: mythplayer.h:807
DecoderThread::m_startPaused
bool m_startPaused
Definition: mythplayer.h:118
CommSkipMode
CommSkipMode
Definition: tv.h:131
DecoderThread::~DecoderThread
~DecoderThread() override
Definition: mythplayer.h:111
kAdjustFill_Toggle
@ kAdjustFill_Toggle
Definition: videoouttypes.h:57
StatusCallback
void(*)(int, void *) StatusCallback
Definition: mythplayer.h:57
MythPlayer::PrevTitle
virtual bool PrevTitle(void)
Definition: mythplayer.h:287
kDecodeAllowEXT
@ kDecodeAllowEXT
Definition: mythplayer.h:97
tv.h
MythPlayer::m_errorLock
QMutex m_errorLock
Definition: mythplayer.h:711
kDisplayAVSubtitle
@ kDisplayAVSubtitle
Definition: mythplayer.h:75
hardwareprofile.smolt.timeout
float timeout
Definition: smolt.py:103
MythPlayer::AtNormalSpeed
bool AtNormalSpeed(void) const
Definition: mythplayer.h:262
MythPlayer::DecodeFrame
bool DecodeFrame(struct rtframeheader *frameheader, unsigned char *strm, unsigned char *outbuf)
DecoderCallback::DecoderCallback
DecoderCallback()=default
MythPlayer::TranslatePositionAbsToRel
uint64_t TranslatePositionAbsToRel(uint64_t position) const
Definition: mythplayer.h:468
osdInfo
Definition: playercontext.h:34
MythPlayer::GetVideoOutput
MythVideoOutput * GetVideoOutput(void)
Definition: mythplayer.h:281
commbreakmap.h
MythPlayer::GetMythCodecContext
MythCodecContext * GetMythCodecContext(void)
Definition: mythplayer.h:282
MythPlayer::GetTotalFrameCount
uint64_t GetTotalFrameCount(void) const
Definition: mythplayer.h:236
MythVideoOutput
Definition: mythvideoout.h:37
deletemap.h
mythvideoout.h
MythPlayer::m_newStream
QString m_newStream
Definition: mythplayer.h:808
kScan_Detect
@ kScan_Detect
Definition: videoouttypes.h:81
MythPlayer::m_commBreakMap
CommBreakMap m_commBreakMap
Definition: mythplayer.h:828
MythPlayer::m_subReader
SubtitleReader m_subReader
Definition: mythplayer.h:788
MythPlayer::SetMuted
bool SetMuted(bool mute)
Definition: mythplayer.h:444
AudioPlayer
Definition: audioplayer.h:27
MythPlayer::m_cc608
CC608Reader m_cc608
Definition: mythplayer.h:801
MythPlayer::TranslatePositionMsToFrame
uint64_t TranslatePositionMsToFrame(uint64_t position, bool use_cutlist) const
Definition: mythplayer.h:459
MythPlayer::DeleteMapGetRedoMessage
QString DeleteMapGetRedoMessage(void)
Definition: mythplayer.h:549
MythPlayer::kNightModeContrastAdjustment
static const int kNightModeContrastAdjustment
Definition: mythplayer.h:407
MythPlayer::m_decoderThreadUnpause
QWaitCondition m_decoderThreadUnpause
Definition: mythplayer.h:688
kDisplayAllCaptions
@ kDisplayAllCaptions
Definition: mythplayer.h:81
kDisplayTeletextCaptions
@ kDisplayTeletextCaptions
Definition: mythplayer.h:74
MythPlayer::SetPIPVisible
void SetPIPVisible(bool is_visible)
Definition: mythplayer.h:198
MythPlayer::GetNumAngles
virtual int GetNumAngles(void) const
Definition: mythplayer.h:373
AudioOutputGraph
Definition: audiooutputgraph.h:14
MythPlayer::m_decoderCallbackLock
QMutex m_decoderCallbackLock
Definition: mythplayer.h:668
MythPlayer::GetLatestVideoTimecode
int64_t GetLatestVideoTimecode() const
Definition: mythplayer.h:247
MythPlayer::GetCaptionMode
uint GetCaptionMode(void) const
Definition: mythplayer.h:328
kMusicChoice
@ kMusicChoice
Definition: mythplayer.h:101
MythPlayer::GoToMenu
virtual bool GoToMenu(const QString &)
Definition: mythplayer.h:378
title
QString title
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:633
MythPlayer::PrevAngle
virtual bool PrevAngle(void)
Definition: mythplayer.h:292
kError_None
@ kError_None
Definition: videoouttypes.h:170
MythPlayer::GoToDVDProgram
virtual void GoToDVDProgram(bool direction)
Definition: mythplayer.h:379
mythtvexp.h
MythPlayer::IsPaused
bool IsPaused(void) const
Definition: mythplayer.h:256
MythPlayer::m_decoderSeekLock
QMutex m_decoderSeekLock
Definition: mythplayer.h:690
MythPlayer::GetOSD
OSD * GetOSD(void)
Definition: mythplayer.h:449
MythPlayer::GetNumTitles
virtual int GetNumTitles(void) const
Definition: mythplayer.h:367
kDisplayTeletextMenu
@ kDisplayTeletextMenu
Definition: mythplayer.h:82
TC_VIDEO
@ TC_VIDEO
Definition: mythplayer.h:62
DEINT_NONE
@ DEINT_NONE
Definition: mythframe.h:123
MythPlayer::m_pipDefaultLoc
PIPLocation m_pipDefaultLoc
Definition: mythplayer.h:823
MythPlayer::GetAngleName
virtual QString GetAngleName(int) const
Definition: mythplayer.h:375
MythPlayer::HasTextSubtitles
bool HasTextSubtitles(void)
Definition: mythplayer.h:562
MythPlayer::GetTitleDuration
virtual int GetTitleDuration(int) const
Definition: mythplayer.h:369
frm_dir_map_t
QMap< uint64_t, MarkTypes > frm_dir_map_t
Frame # -> Mark map.
Definition: programtypes.h:82
FrameScanType
FrameScanType
Definition: videoouttypes.h:79
MythPlayer::m_errorMsg
QString m_errorMsg
Reason why NVP exited with a error.
Definition: mythplayer.h:712
MythPlayer::m_bufferPauseLock
QMutex m_bufferPauseLock
Definition: mythplayer.h:691
MythPlayer::IsPIPActive
bool IsPIPActive(void) const
Definition: mythplayer.h:266
osd.h
SubtitleReader
Definition: subtitlereader.h:33
MythPlayer::m_cc708
CC708Reader m_cc708
Definition: mythplayer.h:802
MythPlayer::IsMuted
bool IsMuted(void)
Definition: mythplayer.h:268
MythMediaBuffer
Definition: mythmediabuffer.h:50
MythPlayer::GetNextPlaySpeed
float GetNextPlaySpeed(void) const
Definition: mythplayer.h:234
MythPlayer::GetFrameRate
float GetFrameRate(void) const
Definition: mythplayer.h:219
cc608reader.h
teletextreader.h
VBIMode::None
@ None
Definition: tv.h:11
MythPlayer::PlayerControlsVolume
bool PlayerControlsVolume(void) const
Definition: mythplayer.h:269
MythPlayer::m_pauseLock
QMutex m_pauseLock
Definition: mythplayer.h:693
MythPlayer::GetCC708Reader
virtual CC708Reader * GetCC708Reader(uint=0)
Definition: mythplayer.h:329
PlayerFlags
PlayerFlags
Definition: mythplayer.h:88
subtitlereader.h
MythPlayer
Definition: mythplayer.h:165
MythPlayer::ForcedSubtitlesFavored
bool ForcedSubtitlesFavored(void) const
Definition: mythplayer.h:338
MythPlayer::EndPlaying
virtual void EndPlaying(void)
Definition: mythplayer.h:495
VideoFrame
Definition: mythframe.h:138
kDecodeLowRes
@ kDecodeLowRes
Definition: mythplayer.h:90
MythPlayer::SetVolume
uint SetVolume(int newvolume)
Definition: mythplayer.h:443
MythPlayer::SetMuteState
MuteState SetMuteState(MuteState state)
Definition: mythplayer.h:445
MythPlayer::SkipCommercials
void SkipCommercials(int direction)
Definition: mythplayer.h:482
kDisplayTextSubtitle
@ kDisplayTextSubtitle
Definition: mythplayer.h:78
MythPlayer::m_bufferingLastMsg
QTime m_bufferingLastMsg
Definition: mythplayer.h:775
MythPlayer::GetLimitKeyRepeat
bool GetLimitKeyRepeat(void) const
Definition: mythplayer.h:258
hardwareprofile.scan.scan
def scan(profile, smoonURL, gate)
Definition: scan.py:57
MythMultiLocker
Definition: mythplayer.h:122
MythPlayer::m_videoPauseLock
QMutex m_videoPauseLock
Definition: mythplayer.h:692
MythPlayer::IsCutListSaved
bool IsCutListSaved(void)
Definition: mythplayer.h:545
RemoteEncoder
Definition: remoteencoder.h:26
MythPlayer::kInaccuracyNone
static const double kInaccuracyNone
Definition: mythplayer.h:408
programtypes.h
MythPlayer::SetAutoCommercialSkip
void SetAutoCommercialSkip(CommSkipMode autoskip)
Definition: mythplayer.h:480
MuteState
MuteState
Definition: volumebase.h:6
FMT_NONE
@ FMT_NONE
Definition: mythframe.h:26
InfoMap
QHash< QString, QString > InfoMap
Definition: mythtypes.h:15
MythPlayer::SwitchTitle
virtual bool SwitchTitle(int)
Definition: mythplayer.h:285
SubtitleScreen
Definition: subtitlescreen.h:173
DecoderCallback::m_debug
QString m_debug
Definition: mythplayer.h:152
MythPlayer::GetPlaySpeed
float GetPlaySpeed(void) const
Definition: mythplayer.h:230
EofState
EofState
Definition: decoderbase.h:67
TCTYPESMAX
#define TCTYPESMAX
Definition: mythplayer.h:67
MythPlayer::m_audio
AudioPlayer m_audio
Definition: mythplayer.h:818
kDisplayNUVTeletextCaptions
@ kDisplayNUVTeletextCaptions
Definition: mythplayer.h:73
MythPlayer::HasAudioOut
bool HasAudioOut(void) const
Definition: mythplayer.h:265
MythPlayer::GetAudioGraph
const AudioOutputGraph & GetAudioGraph() const
Definition: mythplayer.h:232
MythPlayer::m_decoderCallbacks
QVector< DecoderCallback > m_decoderCallbacks
Definition: mythplayer.h:669
MythPlayer::m_editUpdateTimer
QElapsedTimer m_editUpdateTimer
Definition: mythplayer.h:832
TeletextReader
Definition: teletextreader.h:74
MythPlayer::GetFramesPlayed
uint64_t GetFramesPlayed(void) const
Definition: mythplayer.h:238
MythPlayer::ComputeSecs
float ComputeSecs(uint64_t position, bool use_cutlist) const
Definition: mythplayer.h:474
MythPlayer::kNightModeBrightenssAdjustment
static const int kNightModeBrightenssAdjustment
Definition: mythplayer.h:406
MythPlayer::IncrMuteState
MuteState IncrMuteState(void)
Definition: mythplayer.h:446
MythPlayer::m_detectLetterBox
DetectLetterbox * m_detectLetterBox
Definition: mythplayer.h:595
DetectLetterbox
Definition: DetectLetterbox.h:5
OSDTimeout
OSDTimeout
Definition: osd.h:58
SetLength
static uint8_t * SetLength(uint8_t *Data, int Length)
Definition: dvbci.cpp:117
MythPlayer::GetVideoBufferSize
QSize GetVideoBufferSize(void) const
Definition: mythplayer.h:216
videoouttypes.h
MythMultiLocker::Unlock
void Unlock(void)
Definition: mythplayer.cpp:134
MythPlayer::GetAutoCommercialSkip
CommSkipMode GetAutoCommercialSkip(void)
Definition: mythplayer.h:485
AspectOverrideMode
AspectOverrideMode
Definition: videoouttypes.h:45
MythPlayer::m_decoderPauseLock
QMutex m_decoderPauseLock
Definition: mythplayer.h:689
DecodeType
DecodeType
Definition: decoderbase.h:47
MythPlayer::GetCC608Reader
virtual CC608Reader * GetCC608Reader(uint=0)
Definition: mythplayer.h:330
kDisplayCC708
@ kDisplayCC708
Definition: mythplayer.h:77
MythPlayer::IsAudioNeeded
bool IsAudioNeeded(void)
Definition: mythplayer.h:221
MythPlayer::m_audiograph
AudioOutputGraph m_audiograph
Definition: mythplayer.h:819
MythPlayer::IsPIPVisible
bool IsPIPVisible(void) const
Definition: mythplayer.h:267
MythMultiLocker::Relock
void Relock(void)
Definition: mythplayer.cpp:141
mythtypes.h
kDecodeAllowGPU
@ kDecodeAllowGPU
Definition: mythplayer.h:96
kDisplayRawTextSubtitle
@ kDisplayRawTextSubtitle
Definition: mythplayer.h:80
MythPlayer::m_bufferingStart
QTime m_bufferingStart
Definition: mythplayer.h:774
clear
static void clear(SettingsMap &cache, SettingsMap &overrides, const QString &myKey)
Definition: mythdb.cpp:846
MythPlayer::GetAudioStretchFactor
float GetAudioStretchFactor(void)
Definition: mythplayer.h:233
MythPlayer::NextTitle
virtual bool NextTitle(void)
Definition: mythplayer.h:286
TCTypes
TCTypes
Timecode types.
Definition: mythplayer.h:61
kDisplayCC608
@ kDisplayCC608
Definition: mythplayer.h:76
MythPlayer::DeleteMapGetUndoMessage
QString DeleteMapGetUndoMessage(void)
Definition: mythplayer.h:548
MythPlayer::m_avTimer
QElapsedTimer m_avTimer
Definition: mythplayer.h:743
audiooutputgraph.h
MythPlayer::SwitchAngle
virtual bool SwitchAngle(int)
Definition: mythplayer.h:290
MythPlayer::TryLockOSD
bool TryLockOSD(void)
Definition: mythplayer.h:388
MythPlayer::DeleteMapHasUndo
bool DeleteMapHasUndo(void)
Definition: mythplayer.h:546
MythPlayer::GetMuteState
MuteState GetMuteState(void)
Definition: mythplayer.h:227
kNoITV
@ kNoITV
Definition: mythplayer.h:100
MythPlayer::GetEditMode
bool GetEditMode(void) const
Definition: mythplayer.h:539
DecoderCallback
Definition: mythplayer.h:137
uint
unsigned int uint
Definition: compat.h:140
kDecodeNoDecode
@ kDecodeNoDecode
Definition: mythplayer.h:94
MythPlayer::m_endExitPrompt
int m_endExitPrompt
Definition: mythplayer.h:727
MythPlayer::GetCurrentAngle
virtual int GetCurrentAngle(void) const
Definition: mythplayer.h:374
PIPMap
QMap< MythPlayer *, PIPLocation > PIPMap
Definition: mythvideoout.h:32
MythPlayer::m_playerFlags
PlayerFlags m_playerFlags
Definition: mythplayer.h:678
MythPlayer::GetAllowForcedSubtitles
bool GetAllowForcedSubtitles(void) const
Definition: mythplayer.h:346
MythPlayer::m_playingLock
QMutex m_playingLock
Definition: mythplayer.h:710
MythDisplay
Definition: mythdisplay.h:19
Jitterometer
Definition: jitterometer.h:44
MythPlayer::m_deleteMap
DeleteMap m_deleteMap
Definition: mythplayer.h:831
MythPlayer::m_pipPlayers
PIPMap m_pipPlayers
Definition: mythplayer.h:822
MythPlayer::GetDecoder
DecoderBase * GetDecoder(void)
Returns the stream decoder currently in use.
Definition: mythplayer.h:313
MythPlayer::m_ttxReader
TeletextReader m_ttxReader
Definition: mythplayer.h:789
MythPlayer::GetSubReader
virtual SubtitleReader * GetSubReader(uint=0)
Definition: mythplayer.h:331
frm_pos_map_t
QMap< long long, long long > frm_pos_map_t
Frame # -> File offset map.
Definition: programtypes.h:46
TC_CC
@ TC_CC
Definition: mythplayer.h:65
TeletextScreen
Definition: teletextscreen.h:11
kDecodeSingleThreaded
@ kDecodeSingleThreaded
Definition: mythplayer.h:91
volumebase.h
DecoderThread
Definition: mythplayer.h:107
MythPlayer::SetPIPActive
void SetPIPActive(bool is_active)
Definition: mythplayer.h:197
MythPlayer::GetCurrentTitle
virtual int GetCurrentTitle(void) const
Definition: mythplayer.h:368
MTV_PUBLIC
#define MTV_PUBLIC
Definition: mythtvexp.h:15
MythMultiLocker::~MythMultiLocker
~MythMultiLocker()
Definition: mythplayer.cpp:129
MythPlayer::LockOSD
void LockOSD(void)
Definition: mythplayer.h:389
MythPlayer::GetAudio
AudioPlayer * GetAudio(void)
Definition: mythplayer.h:231
InteractiveScreen
Definition: interactivescreen.h:8
CommBreakMap
Definition: commbreakmap.h:20
MythDeintType
MythDeintType
Definition: mythframe.h:122
kVideoIsNull
@ kVideoIsNull
Definition: mythplayer.h:98
kNoFlags
@ kNoFlags
Definition: mythplayer.h:89
ProgramInfo
Holds information on recordings and videos.
Definition: programinfo.h:68
cc708reader.h
mythmiscutil.h
PIPLocation
PIPLocation
Definition: videoouttypes.h:18
MythPlayer::m_decoderThreadPause
QWaitCondition m_decoderThreadPause
Definition: mythplayer.h:687
MythPlayer::GetVolume
uint GetVolume(void)
Definition: mythplayer.h:223
MythMultiLocker::MythMultiLocker
MythMultiLocker()=delete
kScan_Interlaced
@ kScan_Interlaced
Definition: videoouttypes.h:82
dir
QDir dir
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:1171
playercontext.h
MythPlayer::GetAudioTimecodeOffset
int64_t GetAudioTimecodeOffset(void) const
Definition: mythplayer.h:591
AdjustFillMode
AdjustFillMode
Definition: videoouttypes.h:56
TC_AUDIO
@ TC_AUDIO
Definition: mythplayer.h:63
MythPlayer::GetTitleName
virtual QString GetTitleName(int) const
Definition: mythplayer.h:370
MythPlayer::GetVideoSize
QSize GetVideoSize(void) const
Definition: mythplayer.h:217
DecoderCallback::Callback
void(*)(void *, void *, void *) Callback
Definition: mythplayer.h:139
MythPlayer::kInaccuracyEditor
static const double kInaccuracyEditor
Definition: mythplayer.h:410
kDisplayNone
@ kDisplayNone
Definition: mythplayer.h:72
mythavutil.h
MythPlayer::GetVideoAspect
float GetVideoAspect(void) const
Definition: mythplayer.h:218
MThread
This is a wrapper around QThread that does several additional things.
Definition: mthread.h:49
kDecodeNoLoopFilter
@ kDecodeNoLoopFilter
Definition: mythplayer.h:93
decoderbase.h
SetCutList
static int SetCutList(uint chanid, const QDateTime &starttime, QString newCutList)
Definition: mythtv/programs/mythcommflag/main.cpp:237
mthread.h
kAudioMuted
@ kAudioMuted
Definition: mythplayer.h:99
PlayerContext
Definition: playercontext.h:49
TC_SUB
@ TC_SUB
Definition: mythplayer.h:64
DecoderThread::m_mp
MythPlayer * m_mp
Definition: mythplayer.h:117
MythPlayer::m_vidExitLock
QMutex m_vidExitLock
Definition: mythplayer.h:709
MythPlayer::DeleteMapHasRedo
bool DeleteMapHasRedo(void)
Definition: mythplayer.h:547
build_compdb.action
action
Definition: build_compdb.py:9
kDisplayDVDButton
@ kDisplayDVDButton
Definition: mythplayer.h:79
MythPlayer::UsingNullVideo
bool UsingNullVideo(void) const
Definition: mythplayer.h:270
MythPlayer::UnlockOSD
void UnlockOSD(void)
Definition: mythplayer.h:390
audioplayer.h
MythPlayer::m_itvLock
QMutex m_itvLock
Definition: mythplayer.h:806
VideoPerformanceTest
Definition: mythtv/programs/mythavtest/main.cpp:36
MythPlayer::kInaccuracyFull
static const double kInaccuracyFull
Definition: mythplayer.h:411
MythCodecContext
Definition: mythcodeccontext.h:51
VideoFrameType
VideoFrameType
Definition: mythframe.h:25
DecoderThread::run
void run(void) override
Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.
Definition: mythplayer.cpp:91
kDecodeDisallowCPU
@ kDecodeDisallowCPU
Definition: mythplayer.h:95
MythPlayer::IsInStillFrame
virtual bool IsInStillFrame() const
Definition: mythplayer.h:380
MythPlayer::GetDecoder
const DecoderBase * GetDecoder(void) const
Returns the stream decoder currently in use.
Definition: mythplayer.h:621
SetOSDMessage
#define SetOSDMessage(CTX, MESSAGE)
Definition: tv_play.cpp:104
DecoderCallback::DecoderCallback
DecoderCallback(QString Debug, Callback Function, QAtomicInt *Ready, void *Opaque1, void *Opaque2, void *Opaque3)
Definition: mythplayer.h:141
MThread::wait
bool wait(unsigned long time=ULONG_MAX)
Wait for the MThread to exit, with a maximum timeout.
Definition: mthread.cpp:309
InteractiveTV
This is the interface between an MHEG engine and a MythTV TV object.
Definition: interactivetv.h:13
MythPlayer::AdjustVolume
uint AdjustVolume(int change)
Definition: mythplayer.h:442
MythPlayer::GetLength
int GetLength(void) const
Definition: mythplayer.h:235
CC708Reader
Definition: cc708reader.h:17
kDisplayAllTextCaptions
@ kDisplayAllTextCaptions
Definition: mythplayer.h:83
CC608Reader
Definition: cc608reader.h:78
FlagIsSet
#define FlagIsSet(arg)
Definition: mythplayer.h:104
MythMultiLocker::m_locks
QVector< QMutex * > m_locks
Definition: mythplayer.h:133
MythPlayer::kInaccuracyDefault
static const double kInaccuracyDefault
Definition: mythplayer.h:409
DecoderThread::DecoderThread
DecoderThread(MythPlayer *mp, bool start_paused)
Definition: mythplayer.h:109
OSD
Definition: osd.h:132
MythPlayer::GetFFRewSkip
int GetFFRewSkip(void) const
Definition: mythplayer.h:229
MythPlayer::m_playingWaitCond
QWaitCondition m_playingWaitCond
Definition: mythplayer.h:708
DecoderBase
Definition: decoderbase.h:120
kScan_Ignore
@ kScan_Ignore
Definition: videoouttypes.h:80
kDecodeFewBlocks
@ kDecodeFewBlocks
Definition: mythplayer.h:92
ZoomDirection
ZoomDirection
Definition: videoouttypes.h:27
MythPlayer::NextAngle
virtual bool NextAngle(void)
Definition: mythplayer.h:291
Transcode
Definition: transcode.h:15
MythPlayer::TranslatePositionRelToAbs
uint64_t TranslatePositionRelToAbs(uint64_t position) const
Definition: mythplayer.h:471
LiveTVChain
Keeps track of recordings in a current LiveTV instance.
Definition: livetvchain.h:32
TV
Control TV playback.
Definition: tv_play.h:281
DeleteMap
Definition: deletemap.h:26