MythTV  master
mythplayer.h
Go to the documentation of this file.
1 #ifndef MYTHPLAYER_H
2 #define MYTHPLAYER_H
3 
4 // Std
5 #include <cstdint>
6 #include <utility>
7 #include <thread>
8 
9 // Qt
10 #include <QCoreApplication>
11 #include <QList>
12 #include <QMutex>
13 #if QT_VERSION >= QT_VERSION_CHECK(5,14,0)
14 #include <QRecursiveMutex>
15 #endif
16 #include <QTime>
17 #include <QString>
18 #include <QRect>
19 #include <QSize>
20 #include <QStringList>
21 #include <QWaitCondition>
22 
23 // MythTV
25 #include "libmythbase/mthread.h"
27 #include "libmythbase/mythtypes.h"
29 #include "libmythtv/audioplayer.h"
34 #include "libmythtv/commbreakmap.h"
36 #include "libmythtv/deletemap.h"
37 #include "libmythtv/mythavutil.h"
39 #include "libmythtv/mythtvexp.h"
40 #include "libmythtv/mythvideoout.h"
41 #include "libmythtv/osd.h"
43 #include "libmythtv/tv.h"
45 
46 class ProgramInfo;
47 class InteractiveTV;
48 class QThread;
49 class MythMediaBuffer;
50 class MythDecoderThread;
51 
52 using StatusCallback = void (*)(int, void*);
53 
55 enum TCTypes
56 {
57  TC_VIDEO = 0,
61 };
62 static constexpr size_t TCTYPESMAX { 4 };
63 using tctype_arr = std::array<std::chrono::milliseconds,TCTYPESMAX>;
64 
66 {
67  kNoFlags = 0x000000,
68  kDecodeLowRes = 0x000001,
70  kDecodeFewBlocks = 0x000004,
71  kDecodeNoLoopFilter = 0x000008,
72  kDecodeNoDecode = 0x000010,
73  kDecodeAllowGPU = 0x000020,
74  kVideoIsNull = 0x000040,
75  kAudioMuted = 0x010000,
76  kNoITV = 0x020000,
77  kMusicChoice = 0x040000,
78 };
79 
80 // Padding between class members reduced from 113 to 73 bytes, but its
81 // still higher than the default warning threshhold of 24 bytes.
82 //
83 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
84 class MTV_PUBLIC MythPlayer : public QObject
85 {
86  Q_OBJECT
87 
88  // Do NOT add a decoder class to this list
89  friend class PlayerContext;
90  friend class CC708Reader;
91  friend class CC608Reader;
92  friend class MythDecoderThread;
93  friend class VideoPerformanceTest;
94  // TODO remove these
95  friend class TV;
96  friend class Transcode;
97 
98  signals:
99  void CheckCallbacks();
100  void SeekingSlow(int Count);
101  void SeekingComplete();
102  void SeekingDone();
103  void PauseChanged(bool Paused);
104  void RequestResetCaptions();
105  void SignalTracksChanged(uint Type);
106 
107  public:
108  explicit MythPlayer(PlayerContext* Context, PlayerFlags Flags = kNoFlags);
109  ~MythPlayer() override;
110 
111  // Initialisation
112  virtual int OpenFile(int Retries = 4);
113  virtual bool InitVideo(void);
114  virtual void ReinitVideo(bool ForceUpdate);
115  virtual void InitFrameInterval();
116 
117  // Public Sets
118  void SetLength(std::chrono::seconds len) { m_totalLength = len; }
119  void SetFramesPlayed(uint64_t played);
120  void SetEof(EofState eof);
121  void SetWatchingRecording(bool mode);
122  void SetKeyframeDistance(int keyframedistance);
123  virtual void SetVideoParams(int w, int h, double fps, float aspect,
124  bool ForceUpdate, int ReferenceFrames,
125  FrameScanType /*scan*/ = kScan_Ignore,
126  const QString& codecName = QString());
127  void SetFileLength(std::chrono::seconds total, int frames);
128  void SetDuration(std::chrono::seconds duration);
129  void SetFrameRate(double fps);
130 
131  // Gets
132  QSize GetVideoBufferSize(void) const { return m_videoDim; }
133  QSize GetVideoSize(void) const { return m_videoDispDim; }
134  float GetVideoAspect(void) const { return m_videoAspect; }
135  float GetFrameRate(void) const { return m_videoFrameRate; }
136  bool IsAudioNeeded(void) { return !FlagIsSet(kVideoIsNull); }
137  int GetFreeVideoFrames(void) const;
138 
139  int GetFFRewSkip(void) const { return m_ffrewSkip; }
140  float GetPlaySpeed(void) const { return m_playSpeed; }
141  AudioPlayer* GetAudio(void) { return &m_audio; }
142  float GetNextPlaySpeed(void) const { return m_nextPlaySpeed; }
143  std::chrono::seconds GetLength(void) const { return m_totalLength; }
144  uint64_t GetTotalFrameCount(void) const { return m_totalFrames; }
145  uint64_t GetCurrentFrameCount(void) const;
146  uint64_t GetFramesPlayed(void) const { return m_framesPlayed; }
147  virtual uint64_t GetBookmark(void);
148  QString GetError(void) const;
149  QString GetEncodingType(void) const;
150  QString GetXDS(const QString &key) const;
151 
152  // Bool Gets
153  bool IsPaused(void) const { return m_allPaused; }
154  bool GetRawAudioState(void) const;
155  bool GetLimitKeyRepeat(void) const { return m_limitKeyRepeat; }
156  EofState GetEof(void) const;
157  bool IsErrored(void) const;
158  bool IsPlaying(std::chrono::milliseconds wait_in_msec = 0ms,
159  bool wait_for = true) const;
160  bool AtNormalSpeed(void) const { return m_nextNormalSpeed; }
161  bool IsReallyNearEnd(void) const;
162  bool IsNearEnd(void);
163  bool HasTVChainNext(void) const;
164  bool IsWatchingInprogress(void) const;
165 
166  virtual InteractiveTV *GetInteractiveTV() { return nullptr; }
167  MythVideoOutput *GetVideoOutput(void) { return m_videoOutput; }
168 
169  // Title stuff
170  virtual bool SwitchTitle(int /*title*/) { return false; }
171  virtual bool NextTitle(void) { return false; }
172  virtual bool PrevTitle(void) { return false; }
173 
174  // Angle stuff
175  virtual bool SwitchAngle(int /*title*/) { return false; }
176  virtual bool NextAngle(void) { return false; }
177  virtual bool PrevAngle(void) { return false; }
178 
179  // Decoder stuff..
180  MythVideoFrame *GetNextVideoFrame(void);
181  void DeLimboFrame(MythVideoFrame *frame);
182  virtual void ReleaseNextVideoFrame(MythVideoFrame *buffer, std::chrono::milliseconds timecode,
183  bool wrap = true);
184  void DiscardVideoFrame(MythVideoFrame *buffer);
185  void DiscardVideoFrames(bool KeyFrame, bool Flushed);
187  DecoderBase *GetDecoder(void) { return m_decoder; }
188  virtual bool HasReachedEof(void) const;
189  void SetDisablePassThrough(bool disabled);
190  void ForceSetupAudioStream(void);
191 
192  // Add data
193  virtual bool PrepareAudioSample(std::chrono::milliseconds &timecode);
194 
195  // Public Closed caption and teletext stuff
196  virtual CC708Reader *GetCC708Reader(uint /*id*/=0) { return &m_cc708; }
197  virtual CC608Reader *GetCC608Reader(uint /*id*/=0) { return &m_cc608; }
198  virtual SubtitleReader *GetSubReader(uint /*id*/=0) { return &m_subReader; }
199  virtual TeletextReader *GetTeletextReader(uint /*id*/=0) { return &m_ttxReader; }
200 
201  // Public Audio/Subtitle/EIA-608/EIA-708 stream selection - thread safe
202  void EnableForcedSubtitles(bool enable);
203  bool ForcedSubtitlesFavored(void) const {
204  return m_allowForcedSubtitles && !m_captionsEnabledbyDefault;
205  }
206  // How to handle forced Subtitles (i.e. when in a movie someone speaks
207  // in a different language than the rest of the movie, subtitles are
208  // forced on even if the user doesn't have them turned on.)
209  // These two functions are not thread-safe (UI thread use only).
210  bool GetAllowForcedSubtitles(void) const { return m_allowForcedSubtitles; }
211 
212  // LiveTV public stuff
213  void CheckTVChain();
214  void FileChangedCallback();
215 
216  // Chapter public stuff
217  virtual int GetNumChapters(void);
218  virtual int GetCurrentChapter(void);
219  virtual void GetChapterTimes(QList<std::chrono::seconds> &times);
220 
221  // Title public stuff
222  virtual int GetNumTitles(void) const { return 0; }
223  virtual int GetCurrentTitle(void) const { return 0; }
224  virtual std::chrono::seconds GetTitleDuration(int /*title*/) const { return 0s; }
225  virtual QString GetTitleName(int /*title*/) const { return {}; }
226 
227  // Angle public stuff
228  virtual int GetNumAngles(void) const { return 0; }
229  virtual int GetCurrentAngle(void) const { return 0; }
230  virtual QString GetAngleName(int /*title*/) const { return {}; }
231 
232  // DVD public stuff
233  virtual bool IsInStillFrame() const { return false; }
234 
235  // Position Map Stuff
236  bool PosMapFromEnc(uint64_t start, frm_pos_map_t &posMap, frm_pos_map_t &durMap);
237 
238  void SaveTotalDuration(void);
239  void ResetTotalDuration(void);
240 
243  static const double kInaccuracyNone;
244  static const double kInaccuracyDefault;
245  static const double kInaccuracyEditor;
246  static const double kInaccuracyFull;
247  static const double kSeekToEndOffset;
248 
249  void SaveTotalFrames(void);
250  void SetErrored(const QString &reason);
251 
252  protected:
253  // Initialization
254  void OpenDummy(void);
255 
256  // Complicated gets
257  virtual long long CalcMaxFFTime(long long ff, bool setjump = true) const;
258  long long CalcRWTime(long long rw) const;
259  std::chrono::milliseconds TranslatePositionFrameToMs(uint64_t position,
260  bool use_cutlist) const;
261  uint64_t TranslatePositionMsToFrame(std::chrono::milliseconds position,
262  bool use_cutlist) const {
263  return m_deleteMap.TranslatePositionMsToFrame(position,
264  GetFrameRate(),
265  use_cutlist);
266  }
267  // TranslatePositionAbsToRel and TranslatePositionRelToAbs are
268  // used for frame calculations when seeking relative to a number
269  // of frames rather than by time.
270  uint64_t TranslatePositionAbsToRel(uint64_t position) const {
271  return m_deleteMap.TranslatePositionAbsToRel(position);
272  }
273  uint64_t TranslatePositionRelToAbs(uint64_t position) const {
274  return m_deleteMap.TranslatePositionRelToAbs(position);
275  }
276  float ComputeSecs(uint64_t position, bool use_cutlist) const {
277  return TranslatePositionFrameToMs(position, use_cutlist).count() / 1000.0;
278  }
279  uint64_t FindFrame(float offset, bool use_cutlist) const;
280 
281  // Commercial stuff
283  { m_commBreakMap.SetAutoCommercialSkip(autoskip, m_framesPlayed); }
284  void SkipCommercials(int direction)
285  { m_commBreakMap.SkipCommercials(direction); }
286  void SetCommBreakMap(const frm_dir_map_t& NewMap);
288  { return m_commBreakMap.GetAutoCommercialSkip(); }
289 
290  // Start/Reset/Stop playing
291  virtual void ResetPlaying(bool resetframes = true);
292  virtual void StopPlaying(void);
293 
294  // Pause stuff
295  bool PauseDecoder(void);
296  void UnpauseDecoder(void);
297  bool Pause(void);
298  bool Play(float speed = 1.0, bool normal = true, bool unpauseaudio = true);
299 
300  // Seek stuff
301  virtual bool FastForward(float seconds);
302  virtual bool Rewind(float seconds);
303  virtual bool JumpToFrame(uint64_t frame);
304 
305  // Chapter stuff
306  void JumpChapter(int chapter);
307 
308  // Playback
309  virtual bool PrebufferEnoughFrames(int min_buffers = 0);
310  void SetBuffering(bool new_buffering);
311  virtual void VideoEnd(void);
312  virtual void DecoderStart(bool start_paused);
313  virtual void DecoderLoop(bool pause);
314  virtual void DecoderEnd(void);
315  virtual void DecoderPauseCheck(void);
316  virtual void AudioEnd(void);
317 
318  // Edit mode stuff
319  bool GetEditMode(void) const { return m_deleteMap.IsEditing(); }
320  bool IsInDelete(uint64_t frame);
321 
322  bool FlagIsSet(PlayerFlags arg) { return (m_playerFlags & arg) != 0; }
323 
324  protected:
325  // Private Sets
326  void SetPlayingInfo(const ProgramInfo &pginfo);
327  void SetPlaying(bool is_playing);
328  void ResetErrored(void);
329 
330  // Private pausing stuff
331  void PauseVideo(void);
332  void UnpauseVideo(void);
333  void PauseBuffer(void);
334  void UnpauseBuffer(void);
335 
336  // Private decoder stuff
337  virtual void CreateDecoder(TestBufferVec & TestBuffer);
338  void SetDecoder(DecoderBase *dec);
340  const DecoderBase *GetDecoder(void) const { return m_decoder; }
341  virtual void DoFFRewSkip(void);
342  bool DecoderGetFrame(DecodeType decodetype, bool unsafe = false);
343  bool DoGetFrame(DecodeType DecodeType);
344 
345  // These actually execute commands requested by public members
346  bool UpdateFFRewSkip(float ffrewScale = 1.0F);
347  virtual void ChangeSpeed(void);
348  // The "inaccuracy" argument is generally one of the kInaccuracy* values.
349  bool DoFastForward(uint64_t frames, double inaccuracy);
350  bool DoRewind(uint64_t frames, double inaccuracy);
351  void DoJumpToFrame(uint64_t frame, double inaccuracy);
352 
353  // Private seeking stuff
354  void WaitForSeek(uint64_t frame, uint64_t seeksnap_wanted);
355  void ClearAfterSeek(bool clearvideobuffers = true);
356 
357  // Private chapter stuff
358  virtual bool DoJumpChapter(int chapter);
359  virtual int64_t GetChapter(int chapter);
360 
361  // Private A/V Sync Stuff
362  void WrapTimecode(std::chrono::milliseconds &timecode, TCTypes tc_type);
363  void SetFrameInterval(FrameScanType scan, double frame_period);
364 
365  protected:
366  DecoderBase *m_decoder {nullptr};
367 #if QT_VERSION < QT_VERSION_CHECK(5,14,0)
368  mutable QMutex m_decoderChangeLock {QMutex::Recursive};
369 #else
370  mutable QRecursiveMutex m_decoderChangeLock;
371 #endif
372  MythVideoOutput *m_videoOutput {nullptr};
374  PlayerContext *m_playerCtx {nullptr};
375  MythDecoderThread* m_decoderThread {nullptr};
376  QThread *m_playerThread {nullptr};
377 #ifdef Q_OS_ANDROID
378  int m_playerThreadId {0};
379 #endif
381 
382  // State
383  QWaitCondition m_decoderThreadPause;
384  QWaitCondition m_decoderThreadUnpause;
385  mutable QMutex m_decoderPauseLock;
386  mutable QMutex m_decoderSeekLock;
387  mutable QMutex m_bufferPauseLock;
388  mutable QMutex m_videoPauseLock;
389  mutable QMutex m_pauseLock;
390  int64_t m_decoderSeek {-1};
391  bool m_totalDecoderPause {false};
392  bool m_decoderPaused {false};
393  bool m_inJumpToProgramPause {false};
394  bool m_pauseDecoder {false};
395  bool m_unpauseDecoder {false};
396  bool volatile m_killDecoder {false};
397  bool m_decodeOneFrame {false};
398  bool m_renderOneFrame {false};
399  bool m_needNewPauseFrame {false};
400  bool m_bufferPaused {false};
401  bool m_videoPaused {false};
402  bool m_allPaused {false};
403  bool m_playing {false};
404 
405  mutable QWaitCondition m_playingWaitCond;
406  mutable QMutex m_vidExitLock;
407  mutable QMutex m_playingLock;
408  mutable QMutex m_errorLock;
409  QString m_errorMsg;
410  int m_errorType {kError_None};
411  bool m_liveTV {false};
412  bool m_watchingRecording {false};
413  bool m_transcoding {false};
414  bool m_hasFullPositionMap {false};
415  mutable bool m_limitKeyRepeat {false};
416 
417  // Chapter stuff
418  int m_jumpChapter {0};
419 
420  // Bookmark stuff
421  uint64_t m_bookmarkSeek {0};
423 
424  // Seek
427  long long m_ffTime {0};
428 
429  // Playback misc.
431  int m_videobufRetries {0};
432  uint64_t m_framesPlayed {0};
433  uint64_t m_totalFrames {0};
434  std::chrono::seconds m_totalLength {0s};
435  std::chrono::seconds m_totalDuration {0s};
436  long long m_rewindTime {0};
437  std::chrono::milliseconds m_latestVideoTimecode {-1ms};
439 
440  // -- end state stuff --
441 
442  // Input Video Attributes
443  double m_videoFrameRate {29.97};
444  QString m_codecName;
446  QSize m_videoDispDim {0,0};
447  QSize m_videoDim {0,0};
448  int m_maxReferenceFrames {0};
449  float m_videoAspect {4.0F / 3.0F};
450  float m_forcedVideoAspect {-1};
451 
454 
455  // Buffering
456  bool m_buffering {false};
459 
460  // Support for analog captions and teletext
461  // (i.e. Vertical Blanking Interval (VBI) encoded data.)
462  uint m_vbiMode {VBIMode::None};
463  int m_ttPageNum {0x888};
464 
465  // Support for captions, teletext, etc. decoded by libav
470  bool m_captionsEnabledbyDefault {false};
471  bool m_enableForcedSubtitles {false};
472  bool m_disableForcedSubtitles {false};
473  bool m_allowForcedSubtitles {true};
474 
475  // CC608/708
478 
479  // Audio stuff
481 
482  // Commercial filtering
484  bool m_forcePositionMapSync {false};
485  // Manual editing
487 
488  // Playback (output) speed control
490 #if QT_VERSION < QT_VERSION_CHECK(5,14,0)
491  QMutex m_decoderLock {QMutex::Recursive};
492 #else
493  QRecursiveMutex m_decoderLock;
494 #endif
495  float m_nextPlaySpeed {1.0F};
496  float m_playSpeed {1.0F};
497  std::chrono::microseconds m_frameInterval
498  {microsecondsFromFloat(1000000.0F / 30)};
499  int m_fpsMultiplier {1};
500  int m_ffrewSkip {1};
501  bool m_ffrewUseRenderOne {false}; // mediacode work around
502  int m_ffrewAdjust {0};
503  float m_ffrewScale {1.0F};
504  bool m_fileChanged {false};
505  bool m_nextNormalSpeed {true};
506  bool m_normalSpeed {true};
507 
508  // Time Code stuff
509  tctype_arr m_tcWrap {};
510  std::chrono::milliseconds m_savedAudioTimecodeOffset {0ms};
511 
512  // LiveTV
513  bool m_isDummy {false};
514 
515  // Counter for buffering messages
516  int m_bufferingCounter {0};
517 
518  private:
519  Q_DISABLE_COPY(MythPlayer)
520  void syncWithAudioStretch();
521  bool m_disablePassthrough {false};
522 };
523 
524 #endif
MythPlayer::GetTeletextReader
virtual TeletextReader * GetTeletextReader(uint=0)
Definition: mythplayer.h:199
MythPlayer::SetLength
void SetLength(std::chrono::seconds len)
Definition: mythplayer.h:118
CommSkipMode
CommSkipMode
Definition: tv.h:130
StatusCallback
void(*)(int, void *) StatusCallback
Definition: mythplayer.h:52
MythPlayer::PrevTitle
virtual bool PrevTitle(void)
Definition: mythplayer.h:172
tv.h
MythPlayer::m_errorLock
QMutex m_errorLock
Definition: mythplayer.h:408
MythPlayer::AtNormalSpeed
bool AtNormalSpeed(void) const
Definition: mythplayer.h:160
MythPlayer::m_decoderChangeLock
QRecursiveMutex m_decoderChangeLock
Definition: mythplayer.h:370
MythPlayer::TranslatePositionAbsToRel
uint64_t TranslatePositionAbsToRel(uint64_t position) const
Definition: mythplayer.h:270
MythPlayer::GetVideoOutput
MythVideoOutput * GetVideoOutput(void)
Definition: mythplayer.h:167
commbreakmap.h
MythPlayer::GetTotalFrameCount
uint64_t GetTotalFrameCount(void) const
Definition: mythplayer.h:144
MythVideoOutput
Definition: mythvideoout.h:35
deletemap.h
mythvideoout.h
MythPlayerAVSync
Definition: mythplayeravsync.h:20
MythPlayer::m_commBreakMap
CommBreakMap m_commBreakMap
Definition: mythplayer.h:483
MythPlayer::m_subReader
SubtitleReader m_subReader
Definition: mythplayer.h:466
AudioPlayer
Definition: audioplayer.h:26
MythPlayer::m_cc608
CC608Reader m_cc608
Definition: mythplayer.h:476
MythPlayer::kNightModeContrastAdjustment
static const int kNightModeContrastAdjustment
Definition: mythplayer.h:242
MythPlayer::m_decoderThreadUnpause
QWaitCondition m_decoderThreadUnpause
Definition: mythplayer.h:384
MythPlayer::m_avSync
MythPlayerAVSync m_avSync
Definition: mythplayer.h:438
MythPlayer::GetNumAngles
virtual int GetNumAngles(void) const
Definition: mythplayer.h:228
kMusicChoice
@ kMusicChoice
Definition: mythplayer.h:77
MythPlayer::PrevAngle
virtual bool PrevAngle(void)
Definition: mythplayer.h:177
kError_None
@ kError_None
Definition: videoouttypes.h:184
MythPlayer::GetInteractiveTV
virtual InteractiveTV * GetInteractiveTV()
Definition: mythplayer.h:166
Transcode::m_keyframeDist
int m_keyframeDist
Definition: transcode.h:55
mythtvexp.h
MythPlayer::IsPaused
bool IsPaused(void) const
Definition: mythplayer.h:153
MythPlayer::m_decoderSeekLock
QMutex m_decoderSeekLock
Definition: mythplayer.h:386
MythPlayer::GetNumTitles
virtual int GetNumTitles(void) const
Definition: mythplayer.h:222
TC_VIDEO
@ TC_VIDEO
Definition: mythplayer.h:57
microsecondsFromFloat
std::enable_if_t< std::is_floating_point_v< T >, std::chrono::microseconds > microsecondsFromFloat(T value)
Helper function for convert a floating point number to a duration.
Definition: mythchrono.h:102
MythPlayer::GetAngleName
virtual QString GetAngleName(int) const
Definition: mythplayer.h:230
frm_dir_map_t
QMap< uint64_t, MarkTypes > frm_dir_map_t
Frame # -> Mark map.
Definition: programtypes.h:119
FrameScanType
FrameScanType
Definition: videoouttypes.h:94
MythPlayer::m_errorMsg
QString m_errorMsg
Reason why NVP exited with a error.
Definition: mythplayer.h:409
MythPlayer::m_bufferPauseLock
QMutex m_bufferPauseLock
Definition: mythplayer.h:387
osd.h
SubtitleReader
Definition: subtitlereader.h:42
MythPlayer::m_cc708
CC708Reader m_cc708
Definition: mythplayer.h:477
MythMediaBuffer
Definition: mythmediabuffer.h:50
MythPlayer::GetNextPlaySpeed
float GetNextPlaySpeed(void) const
Definition: mythplayer.h:142
MythPlayer::GetFrameRate
float GetFrameRate(void) const
Definition: mythplayer.h:135
cc608reader.h
teletextreader.h
VBIMode::None
@ None
Definition: tv.h:11
MythPlayer::m_pauseLock
QMutex m_pauseLock
Definition: mythplayer.h:389
MythPlayer::GetCC708Reader
virtual CC708Reader * GetCC708Reader(uint=0)
Definition: mythplayer.h:196
PlayerFlags
PlayerFlags
Definition: mythplayer.h:65
subtitlereader.h
MythPlayer
Definition: mythplayer.h:84
MythPlayer::ForcedSubtitlesFavored
bool ForcedSubtitlesFavored(void) const
Definition: mythplayer.h:203
kDecodeLowRes
@ kDecodeLowRes
Definition: mythplayer.h:68
MythPlayer::SkipCommercials
void SkipCommercials(int direction)
Definition: mythplayer.h:284
MythPlayer::m_bufferingLastMsg
QTime m_bufferingLastMsg
Definition: mythplayer.h:458
TCTYPESMAX
static constexpr size_t TCTYPESMAX
Definition: mythplayer.h:62
MythPlayer::GetLimitKeyRepeat
bool GetLimitKeyRepeat(void) const
Definition: mythplayer.h:155
hardwareprofile.scan.scan
def scan(profile, smoonURL, gate)
Definition: scan.py:57
MythPlayer::m_videoPauseLock
QMutex m_videoPauseLock
Definition: mythplayer.h:388
MythPlayer::kInaccuracyNone
static const double kInaccuracyNone
Definition: mythplayer.h:243
programtypes.h
MythPlayer::SetAutoCommercialSkip
void SetAutoCommercialSkip(CommSkipMode autoskip)
Definition: mythplayer.h:282
MythPlayer::SwitchTitle
virtual bool SwitchTitle(int)
Definition: mythplayer.h:170
MythPlayer::GetPlaySpeed
float GetPlaySpeed(void) const
Definition: mythplayer.h:140
EofState
EofState
Definition: decoderbase.h:67
MythPlayer::m_audio
AudioPlayer m_audio
Definition: mythplayer.h:480
TeletextReader
Definition: teletextreader.h:75
MythPlayer::GetFramesPlayed
uint64_t GetFramesPlayed(void) const
Definition: mythplayer.h:146
MythPlayer::ComputeSecs
float ComputeSecs(uint64_t position, bool use_cutlist) const
Definition: mythplayer.h:276
MythDecoderThread
Definition: mythdecoderthread.h:9
MythPlayer::kNightModeBrightenssAdjustment
static const int kNightModeBrightenssAdjustment
Definition: mythplayer.h:241
MythPlayer::GetVideoBufferSize
QSize GetVideoBufferSize(void) const
Definition: mythplayer.h:132
videoouttypes.h
MythPlayer::m_decoderLock
QRecursiveMutex m_decoderLock
Lock for next_play_speed and next_normal_speed.
Definition: mythplayer.h:493
MythPlayer::GetAutoCommercialSkip
CommSkipMode GetAutoCommercialSkip(void)
Definition: mythplayer.h:287
MythPlayer::GetTitleDuration
virtual std::chrono::seconds GetTitleDuration(int) const
Definition: mythplayer.h:224
VideoFrameTypes
std::vector< VideoFrameType > VideoFrameTypes
Definition: mythframe.h:83
MythPlayer::m_decoderPauseLock
QMutex m_decoderPauseLock
Definition: mythplayer.h:385
DecodeType
DecodeType
Definition: decoderbase.h:47
MythPlayer::GetCC608Reader
virtual CC608Reader * GetCC608Reader(uint=0)
Definition: mythplayer.h:197
MythPlayer::IsAudioNeeded
bool IsAudioNeeded(void)
Definition: mythplayer.h:136
mythtypes.h
kDecodeAllowGPU
@ kDecodeAllowGPU
Definition: mythplayer.h:73
MythPlayer::m_bufferingStart
QTime m_bufferingStart
Definition: mythplayer.h:457
MythPlayer::NextTitle
virtual bool NextTitle(void)
Definition: mythplayer.h:171
TCTypes
TCTypes
Timecode types.
Definition: mythplayer.h:55
TestBufferVec
std::vector< char > TestBufferVec
Definition: decoderbase.h:23
MythPlayer::SwitchAngle
virtual bool SwitchAngle(int)
Definition: mythplayer.h:175
kNoITV
@ kNoITV
Definition: mythplayer.h:76
MythPlayer::GetEditMode
bool GetEditMode(void) const
Definition: mythplayer.h:319
uint
unsigned int uint
Definition: compat.h:81
kDecodeNoDecode
@ kDecodeNoDecode
Definition: mythplayer.h:72
MythPlayer::m_endExitPrompt
int m_endExitPrompt
Definition: mythplayer.h:422
MythPlayer::GetCurrentAngle
virtual int GetCurrentAngle(void) const
Definition: mythplayer.h:229
MythPlayer::m_playerFlags
PlayerFlags m_playerFlags
Definition: mythplayer.h:380
MythPlayer::GetAllowForcedSubtitles
bool GetAllowForcedSubtitles(void) const
Definition: mythplayer.h:210
MythPlayer::m_playingLock
QMutex m_playingLock
Definition: mythplayer.h:407
MythPlayer::m_deleteMap
DeleteMap m_deleteMap
Definition: mythplayer.h:486
MythPlayer::GetDecoder
DecoderBase * GetDecoder(void)
Returns the stream decoder currently in use.
Definition: mythplayer.h:187
MythPlayer::m_ttxReader
TeletextReader m_ttxReader
Definition: mythplayer.h:467
MythPlayer::GetSubReader
virtual SubtitleReader * GetSubReader(uint=0)
Definition: mythplayer.h:198
tctype_arr
std::array< std::chrono::milliseconds, TCTYPESMAX > tctype_arr
Definition: mythplayer.h:63
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:60
kDecodeSingleThreaded
@ kDecodeSingleThreaded
Definition: mythplayer.h:69
volumebase.h
MythPlayer::GetCurrentTitle
virtual int GetCurrentTitle(void) const
Definition: mythplayer.h:223
MTV_PUBLIC
#define MTV_PUBLIC
Definition: mythtvexp.h:15
MythPlayer::GetLength
std::chrono::seconds GetLength(void) const
Definition: mythplayer.h:143
MythPlayer::kSeekToEndOffset
static const double kSeekToEndOffset
Definition: mythplayer.h:247
MythPlayer::GetAudio
AudioPlayer * GetAudio(void)
Definition: mythplayer.h:141
CommBreakMap
Definition: commbreakmap.h:22
kVideoIsNull
@ kVideoIsNull
Definition: mythplayer.h:74
kNoFlags
@ kNoFlags
Definition: mythplayer.h:67
ProgramInfo
Holds information on recordings and videos.
Definition: programinfo.h:67
cc708reader.h
mythmiscutil.h
MythPlayer::m_decoderThreadPause
QWaitCondition m_decoderThreadPause
Definition: mythplayer.h:383
MythVideoFrame::kDefaultRenderFormats
static const VideoFrameTypes kDefaultRenderFormats
Definition: mythframe.h:91
playercontext.h
TC_AUDIO
@ TC_AUDIO
Definition: mythplayer.h:58
MythPlayer::GetTitleName
virtual QString GetTitleName(int) const
Definition: mythplayer.h:225
MythPlayer::GetVideoSize
QSize GetVideoSize(void) const
Definition: mythplayer.h:133
MythPlayer::kInaccuracyEditor
static const double kInaccuracyEditor
Definition: mythplayer.h:245
MythPlayer::TranslatePositionMsToFrame
uint64_t TranslatePositionMsToFrame(std::chrono::milliseconds position, bool use_cutlist) const
Definition: mythplayer.h:261
mythavutil.h
MythPlayer::GetVideoAspect
float GetVideoAspect(void) const
Definition: mythplayer.h:134
kDecodeNoLoopFilter
@ kDecodeNoLoopFilter
Definition: mythplayer.h:71
decoderbase.h
mthread.h
kAudioMuted
@ kAudioMuted
Definition: mythplayer.h:75
PlayerContext
Definition: playercontext.h:53
TC_SUB
@ TC_SUB
Definition: mythplayer.h:59
MythPlayer::m_vidExitLock
QMutex m_vidExitLock
Definition: mythplayer.h:406
audioplayer.h
MythPlayer::FlagIsSet
bool FlagIsSet(PlayerFlags arg)
Definition: mythplayer.h:322
VideoPerformanceTest
Definition: mythavtest.cpp:32
MythPlayer::kInaccuracyFull
static const double kInaccuracyFull
Definition: mythplayer.h:246
MythPlayer::IsInStillFrame
virtual bool IsInStillFrame() const
Definition: mythplayer.h:233
MythVideoFrame
Definition: mythframe.h:88
MythPlayer::GetDecoder
const DecoderBase * GetDecoder(void) const
Returns the stream decoder currently in use.
Definition: mythplayer.h:340
InteractiveTV
This is the interface between an MHEG engine and a MythTV TV object.
Definition: interactivetv.h:15
CC708Reader
Definition: cc708reader.h:16
CC608Reader
Definition: cc608reader.h:78
MythPlayer::kInaccuracyDefault
static const double kInaccuracyDefault
Definition: mythplayer.h:244
MythPlayer::GetFFRewSkip
int GetFFRewSkip(void) const
Definition: mythplayer.h:139
MythPlayer::m_playingWaitCond
QWaitCondition m_playingWaitCond
Definition: mythplayer.h:405
mythplayeravsync.h
DecoderBase
Definition: decoderbase.h:120
kScan_Ignore
@ kScan_Ignore
Definition: videoouttypes.h:96
kDecodeFewBlocks
@ kDecodeFewBlocks
Definition: mythplayer.h:70
MythPlayer::NextAngle
virtual bool NextAngle(void)
Definition: mythplayer.h:176
Transcode
Definition: transcode.h:17
MythPlayer::TranslatePositionRelToAbs
uint64_t TranslatePositionRelToAbs(uint64_t position) const
Definition: mythplayer.h:273
TV
Control TV playback.
Definition: tv_play.h:154
DeleteMap
Definition: deletemap.h:25