MythTV  master
mythplayervideoui.h
Go to the documentation of this file.
1 #ifndef MYTHPLAYERVIDEOUI_H
2 #define MYTHPLAYERVIDEOUI_H
3 
4 // MythTV
5 #include "DetectLetterbox.h"
6 #include "mythinteropgpu.h"
7 #include "mythplayercaptionsui.h"
8 
10 {
11  public:
12  using Callback = void (*)(void*, void*, void*);
13  DecoderCallback() = default;
14  DecoderCallback(QString Debug, Callback Function, QAtomicInt *Ready,
15  void *Opaque1, void *Opaque2, void *Opaque3)
16  : m_debug(std::move(Debug)),
17  m_function(Function),
18  m_ready(Ready),
19  m_opaque1(Opaque1),
20  m_opaque2(Opaque2),
21  m_opaque3(Opaque3)
22  {
23  }
24 
25  QString m_debug;
26  Callback m_function { nullptr };
27  QAtomicInt *m_ready { nullptr };
28  void* m_opaque1 { nullptr };
29  void* m_opaque2 { nullptr };
30  void* m_opaque3 { nullptr };
31 };
32 
34 {
35  Q_OBJECT
36 
37  signals:
38  void RefreshVideoState();
39  void VideoColourStateChanged(const MythVideoColourState& ColourState);
40 
41  public:
42  MythPlayerVideoUI(MythMainWindow* MainWindow, TV* Tv, PlayerContext* Context, PlayerFlags Flags);
43  ~MythPlayerVideoUI() override = default;
44 
45  const MythInteropGPU::InteropMap& GetInteropTypes() const;
46  void HandleDecoderCallback(const QString& Debug, DecoderCallback::Callback Function,
47  void* Opaque1, void* Opaque2);
48 
49  void CheckAspectRatio(MythVideoFrame* Frame);
50 
51  public slots:
52  void ProcessCallbacks();
53  void SupportedAttributesChanged(PictureAttributeSupported Supported);
54  void PictureAttributeChanged(PictureAttribute Attribute, int Value);
55  void PictureAttributesUpdated(const std::map<PictureAttribute,int>& Values);
56 
57  protected slots:
58  void ReinitOSD();
59  void ToggleAdjustFill(AdjustFillMode Mode = kAdjustFill_Toggle);
60 
61  protected:
62  bool InitVideo() override;
63 
64  DetectLetterbox m_detectLetterBox { };
65 
66  private:
67  Q_DISABLE_COPY(MythPlayerVideoUI)
68 
69  QMutex m_decoderCallbackLock;
70  QVector<DecoderCallback> m_decoderCallbacks;
71  MythVideoColourState m_colourState;
72  MythInteropGPU::InteropMap m_interopTypes;
73 };
74 
75 #endif
kAdjustFill_Toggle
@ kAdjustFill_Toggle
Definition: videoouttypes.h:73
DecoderCallback::DecoderCallback
DecoderCallback()=default
PictureAttributeSupported
PictureAttributeSupported
Definition: videoouttypes.h:116
DecoderCallback::m_function
Callback m_function
Definition: mythplayervideoui.h:26
DetectLetterbox.h
Frame
Definition: zmdefines.h:93
MythPlayerCaptionsUI
Definition: mythplayercaptionsui.h:8
PlayerFlags
PlayerFlags
Definition: mythplayer.h:62
DecoderCallback::m_ready
QAtomicInt * m_ready
Definition: mythplayervideoui.h:27
DecoderCallback::m_opaque3
void * m_opaque3
Definition: mythplayervideoui.h:30
MythInteropGPU::InteropMap
std::map< VideoFrameType, InteropTypes > InteropMap
Definition: mythinteropgpu.h:45
DecoderCallback::m_debug
QString m_debug
Definition: mythplayervideoui.h:25
mythinteropgpu.h
DetectLetterbox
Definition: DetectLetterbox.h:11
MythVideoColourState
Definition: mythplayerstate.h:113
DecoderCallback::m_opaque1
void * m_opaque1
Definition: mythplayervideoui.h:28
MythPlayer::InitVideo
virtual bool InitVideo(void)
Definition: mythplayer.cpp:276
DecoderCallback
Definition: mythplayervideoui.h:9
DecoderCallback::m_opaque2
void * m_opaque2
Definition: mythplayervideoui.h:29
PictureAttribute
PictureAttribute
Definition: videoouttypes.h:103
MTV_PUBLIC
#define MTV_PUBLIC
Definition: mythtvexp.h:15
AdjustFillMode
AdjustFillMode
Definition: videoouttypes.h:71
DecoderCallback::Callback
void(*)(void *, void *, void *) Callback
Definition: mythplayervideoui.h:12
PlayerContext
Definition: playercontext.h:48
MythVideoFrame
Definition: mythframe.h:85
DecoderCallback::DecoderCallback
DecoderCallback(QString Debug, Callback Function, QAtomicInt *Ready, void *Opaque1, void *Opaque2, void *Opaque3)
Definition: mythplayervideoui.h:14
MythPlayerVideoUI
Definition: mythplayervideoui.h:33
MythMainWindow
Definition: mythmainwindow.h:34
mythplayercaptionsui.h
MythInteropGPU
Definition: mythinteropgpu.h:21
TV
Control TV playback.
Definition: tv_play.h:152