MythTV  master
tv.h
Go to the documentation of this file.
1 #ifndef TV_H
2 #define TV_H
3 
4 #include <cstdint>
5 #include <QString>
6 
7 class VBIMode
8 {
9  public:
10  enum vbimode_t : std::uint8_t
11  {
12  None = 0,
13  PAL_TT = 1,
14  NTSC_CC = 2,
15  };
16 
17  static uint Parse(const QString& vbiformat)
18  {
19  QString fmt = vbiformat.toLower().left(3);
20  if (fmt == "pal")
21  return PAL_TT;
22  if (fmt == "nts")
23  return NTSC_CC;
24  return None;
25  }
26 };
27 
31 enum ChannelChangeDirection : std::uint8_t
32 {
37 };
38 
40 enum BrowseDirection : std::int8_t
41 {
44  BROWSE_UP = 1,
49 };
50 
53 enum TVState : std::int8_t
54 {
93 };
94 inline TVState myth_deque_init(const TVState */*state*/) { return (TVState)(0); }
95 
96 QString StateToString(TVState state);
97 
100 enum SleepStatus : std::uint8_t {
121 };
122 
123 enum PictureAdjustType : std::uint8_t
124 {
129 };
132 
133 enum CommSkipMode : std::uint8_t
134 {
140 };
141 QString toString(CommSkipMode type);
142 #endif
BrowseDirection
BrowseDirection
Used to request ProgramInfo for channel browsing.
Definition: tv.h:40
kState_WatchingBD
@ kState_WatchingBD
Watching BD is the state when we are watching a BD.
Definition: tv.h:78
BROWSE_SAME
@ BROWSE_SAME
Fetch browse information on current channel and time.
Definition: tv.h:43
BROWSE_INVALID
@ BROWSE_INVALID
Definition: tv.h:42
kState_None
@ kState_None
None State, this is the initial state in both TV and TVRec, it indicates that we are ready to change ...
Definition: tv.h:61
VBIMode::None
@ None
Definition: tv.h:12
sStatus_Waking
@ sStatus_Waking
A slave is marked as waking when the master runs the slave's wakeup command.
Definition: tv.h:115
myth_deque_init
TVState myth_deque_init(const TVState *)
Definition: tv.h:94
sStatus_Undefined
@ sStatus_Undefined
A slave's sleep status is undefined when it has never connected to the master backend or is not able ...
Definition: tv.h:120
ChannelChangeDirection
ChannelChangeDirection
ChannelChangeDirection is an enumeration of possible channel changing directions.
Definition: tv.h:31
SleepStatus
SleepStatus
SleepStatus is an enumeration of the awake/sleep status of a slave.
Definition: tv.h:100
VBIMode
Definition: tv.h:7
VBIMode::NTSC_CC
@ NTSC_CC
Definition: tv.h:14
BROWSE_UP
@ BROWSE_UP
Fetch information on previous channel.
Definition: tv.h:44
CHANNEL_DIRECTION_FAVORITE
@ CHANNEL_DIRECTION_FAVORITE
Definition: tv.h:35
VBIMode::Parse
static uint Parse(const QString &vbiformat)
Definition: tv.h:17
kCommSkipCount
@ kCommSkipCount
Definition: tv.h:138
CHANNEL_DIRECTION_SAME
@ CHANNEL_DIRECTION_SAME
Definition: tv.h:36
CommSkipMode
CommSkipMode
Definition: tv.h:133
kCommSkipOff
@ kCommSkipOff
Definition: tv.h:135
VBIMode::PAL_TT
@ PAL_TT
Definition: tv.h:13
sStatus_FallingAsleep
@ sStatus_FallingAsleep
A slave is marked as falling asleep when told to shutdown by the master.
Definition: tv.h:111
toTitleString
QString toTitleString(PictureAdjustType type)
Definition: tv.cpp:62
sStatus_Awake
@ sStatus_Awake
A slave is awake when it is connected to the master.
Definition: tv.h:103
BROWSE_RIGHT
@ BROWSE_RIGHT
Fetch information on current channel in the future.
Definition: tv.h:47
CHANNEL_DIRECTION_DOWN
@ CHANNEL_DIRECTION_DOWN
Definition: tv.h:34
kCommSkipIncr
@ kCommSkipIncr
Definition: tv.h:139
VBIMode::vbimode_t
vbimode_t
Definition: tv.h:10
kAdjustingPicture_Channel
@ kAdjustingPicture_Channel
Definition: tv.h:127
sStatus_Asleep
@ sStatus_Asleep
A slave is considered asleep when it is not awake and not undefined.
Definition: tv.h:107
kState_Error
@ kState_Error
Error State, if we ever try to enter this state errored is set.
Definition: tv.h:57
kState_WatchingLiveTV
@ kState_WatchingLiveTV
Watching LiveTV is the state for when we are watching a recording and the user has control over the c...
Definition: tv.h:66
kState_ChangingState
@ kState_ChangingState
This is a placeholder state which we never actually enter, but is returned by GetState() when we are ...
Definition: tv.h:92
StateToString
QString StateToString(TVState state)
Returns a human readable QString representing a TVState.
Definition: tv.cpp:11
toTypeString
QString toTypeString(PictureAdjustType type)
Definition: tv.cpp:49
kAdjustingPicture_Recording
@ kAdjustingPicture_Recording
Definition: tv.h:128
kState_WatchingRecording
@ kState_WatchingRecording
Watching Recording is the state for when we are watching an in progress recording,...
Definition: tv.h:83
kState_WatchingPreRecorded
@ kState_WatchingPreRecorded
Watching Pre-recorded is a TV only state for when we are watching a pre-existing recording.
Definition: tv.h:70
kAdjustingPicture_None
@ kAdjustingPicture_None
Definition: tv.h:125
kState_WatchingVideo
@ kState_WatchingVideo
Watching Video is the state when we are watching a video and is not a dvd or BD.
Definition: tv.h:74
CHANNEL_DIRECTION_UP
@ CHANNEL_DIRECTION_UP
Definition: tv.h:33
TVState
TVState
TVState is an enumeration of the states used by TV and TVRec.
Definition: tv.h:53
kState_RecordingOnly
@ kState_RecordingOnly
Recording Only is a TVRec only state for when we are recording a program, but there is no one current...
Definition: tv.h:87
toString
QString toString(CommSkipMode type)
Definition: tv.cpp:75
kCommSkipNotify
@ kCommSkipNotify
Definition: tv.h:137
BROWSE_DOWN
@ BROWSE_DOWN
Fetch information on next channel.
Definition: tv.h:45
BROWSE_FAVORITE
@ BROWSE_FAVORITE
Fetch information on the next favorite channel.
Definition: tv.h:48
kCommSkipOn
@ kCommSkipOn
Definition: tv.h:136
kState_WatchingDVD
@ kState_WatchingDVD
Watching DVD is the state when we are watching a DVD.
Definition: tv.h:76
uint
unsigned int uint
Definition: freesurround.h:24
BROWSE_LEFT
@ BROWSE_LEFT
Fetch information on current channel in the past.
Definition: tv.h:46
kAdjustingPicture_Playback
@ kAdjustingPicture_Playback
Definition: tv.h:126
PictureAdjustType
PictureAdjustType
Definition: tv.h:123