MythTV  master
mythplayerstate.h
Go to the documentation of this file.
1 #ifndef MYTHPLAYERSTATE_H
2 #define MYTHPLAYERSTATE_H
3 
4 // MythTV
5 #include "mythtvexp.h"
6 #include "mythchrono.h"
7 #include "volumebase.h"
8 #include "videoouttypes.h"
9 #include "audiooutputsettings.h"
10 
11 // FFmpeg
12 extern "C" {
13 #include "libavcodec/avcodec.h"
14 }
15 
16 class OSD;
17 class AudioPlayer;
18 
20 {
21  public:
22  MythOverlayState() = default;
23  MythOverlayState(bool Browsing, bool Editing);
24 
25  bool m_browsing { false };
26  bool m_editing { false };
27 };
28 
30 
32 {
33  public:
34  MythAudioPlayerState() = default;
35 
36  int m_channels { -1 };
37  int m_origChannels { -1 };
38  AVCodecID m_codec { AV_CODEC_ID_NONE };
39  AudioFormat m_format { FORMAT_NONE };
40  int m_sampleRate { 44100 };
41  int m_codecProfile { 0 };
42  bool m_passthru { false };
43 };
44 
46 
48 {
49  public:
50  MythAudioState() = default;
51  MythAudioState(AudioPlayer* Player, std::chrono::milliseconds Offset);
52 
53  bool m_hasAudioOut { true };
54  bool m_volumeControl { true };
55  uint m_volume { 0 };
56  MuteState m_muteState { kMuteOff };
57  bool m_canUpmix { false };
58  bool m_isUpmixing { false };
59  bool m_paused { false };
60  std::chrono::milliseconds m_audioOffset { 0ms };
61 };
62 
64 
66 {
67  public:
68  MythCaptionsState() = default;
69 
70  uint m_textDisplayMode { kDisplayNone };
71  bool m_externalTextSubs { false };
72  bool m_haveITV { false };
73 };
74 
76 
78 {
79  public:
80  MythNavigationState() = default;
81  MythNavigationState(int CurrentChapter, std::vector<int64_t> ChapterTimes,
82  int CurrentTitle, std::vector<int64_t> TitleDurations, std::vector<QString> TitleNames,
83  int CurrentAngle, std::vector<QString> AngleNames);
84 
85  int m_currentChapter { 0 };
86  std::vector<int64_t> m_chapterTimes { };
87  int m_currentTitle { 0 };
88  std::vector<int64_t> m_titleDurations { };
89  std::vector<QString> m_titleNames { };
90  int m_currentAngle { 0 };
91  std::vector<QString> m_angleNames { };
92 };
93 
95 
97 {
98  public:
99  MythVideoBoundsState() = default;
101  float HorizScale, float VertScale, QPoint Move,
102  StereoscopicMode StereoOverride);
103 
104  AdjustFillMode m_adjustFillMode { kAdjustFill_Off };
105  AspectOverrideMode m_aspectOverrideMode { kAspect_Off };
106  float m_manualHorizScale { 1.0F };
107  float m_manualVertScale { 1.0F };
108  QPoint m_manualMove { 0, 0 };
110 };
111 
113 
115 {
116  public:
117  MythVideoColourState() = default;
119  std::map<PictureAttribute,int> AttributeValues);
120  int GetValue(PictureAttribute Attribute);
121 
123  std::map<PictureAttribute,int> m_attributeValues;
124 };
125 
127 
129 {
130  public:
131  MythVisualiserState() = default;
132  MythVisualiserState(bool Embedding, bool Visualising,
133  QString Name, QStringList Visualisers);
134 
135  bool m_canVisualise { false };
136  bool m_embedding { false };
137  bool m_visualising { false };
138  QString m_visualiserName { };
139  QStringList m_visualiserList { };
140 };
141 
143 
145 {
146  public:
147  MythEditorState() = default;
148  MythEditorState(uint64_t Current, uint64_t Previous, uint64_t Next, uint64_t Total,
149  bool InDelete, bool IsTemp, bool HasTemp,
150  bool HasUndo, QString Undo, bool HasRedo, QString Redo,
151  bool Saved);
152 
153  uint64_t m_currentFrame { 0 };
154  uint64_t m_previousCut { 0 };
155  uint64_t m_nextCut { 0 };
156  uint64_t m_totalFrames { 0 };
157  bool m_frameInDelete { false };
158  bool m_isTempMark { false };
159  bool m_hasTempMark { false };
160  bool m_hasUndo { false };
161  QString m_undoMessage;
162  bool m_hasRedo { false };
163  QString m_redoMessage;
164  bool m_saved { false };
165 };
166 
168 
169 #endif
FORMAT_NONE
@ FORMAT_NONE
Definition: audiooutputsettings.h:26
PictureAttributeSupported
PictureAttributeSupported
Definition: videoouttypes.h:116
MythVideoColourState::m_attributeValues
std::map< PictureAttribute, int > m_attributeValues
Definition: mythplayerstate.h:123
AudioPlayer
Definition: audioplayer.h:28
kDisplayNone
@ kDisplayNone
Definition: videoouttypes.h:12
AdjustFill
static HostComboBoxSetting * AdjustFill()
Definition: globalsettings.cpp:2220
MythEditorState
Definition: mythplayerstate.h:144
kAdjustFill_Off
@ kAdjustFill_Off
Definition: videoouttypes.h:74
mythtvexp.h
kAspect_Off
@ kAspect_Off
Definition: videoouttypes.h:63
MythEditorState::m_redoMessage
QString m_redoMessage
Definition: mythplayerstate.h:163
kPictureAttributeSupported_None
@ kPictureAttributeSupported_None
Definition: videoouttypes.h:118
MuteState
MuteState
Definition: volumebase.h:6
MythVideoColourState
Definition: mythplayerstate.h:114
videoouttypes.h
AspectOverrideMode
AspectOverrideMode
Definition: videoouttypes.h:60
MythNavigationState
Definition: mythplayerstate.h:77
kMuteOff
@ kMuteOff
Definition: volumebase.h:7
uint
unsigned int uint
Definition: compat.h:140
kStereoscopicModeAuto
@ kStereoscopicModeAuto
Definition: videoouttypes.h:136
PictureAttribute
PictureAttribute
Definition: videoouttypes.h:103
volumebase.h
StereoscopicMode
StereoscopicMode
Definition: videoouttypes.h:134
MTV_PUBLIC
#define MTV_PUBLIC
Definition: mythtvexp.h:15
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(MythEditorState)
AspectOverride
static HostComboBoxSetting * AspectOverride()
Definition: globalsettings.cpp:2205
Name
Definition: channelsettings.cpp:46
AdjustFillMode
AdjustFillMode
Definition: videoouttypes.h:71
mythchrono.h
MythAudioState
A simple wrapper around audio state used to signal changes in the current state.
Definition: mythplayerstate.h:47
MythEditorState::m_undoMessage
QString m_undoMessage
Definition: mythplayerstate.h:161
MythOverlayState
A simpler than simple wrapper around OSD state.
Definition: mythplayerstate.h:19
Player
Definition: zmliveplayer.h:34
AudioFormat
AudioFormat
Definition: audiooutputsettings.h:25
MythVisualiserState
Definition: mythplayerstate.h:128
MythCaptionsState
Definition: mythplayerstate.h:65
audiooutputsettings.h
OSD
Definition: osd.h:94
MythVideoBoundsState
Definition: mythplayerstate.h:96
MythAudioPlayerState
Definition: mythplayerstate.h:31