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