MythTV  master
programtypes.h
Go to the documentation of this file.
1 #ifndef _PROGRAM_INFO_TYPES_H_
2 #define _PROGRAM_INFO_TYPES_H_
3 
5 //
6 // WARNING
7 //
8 // The enums in this header are used in libmythservicecontracts,
9 // and for database values: hence when removing something from
10 // these enums leave a gap, and when adding a new value give it
11 // a explicit integer value.
12 //
14 
15 // C++ headers
16 #include <cstdint> // for [u]int[32,64]_t
17 #include <deque>
18 
19 // Qt headers
20 #include <QString>
21 #include <QMap>
22 #include <QHash>
23 #include <QtCore>
24 
25 // MythTV headers
26 #include "mythexp.h" // for MPUBLIC
27 #include "recordingtypes.h" // for RecordingType
28 
29 class QDateTime;
30 class QMutex;
31 
32 MPUBLIC extern const char *kPlayerInUseID;
33 MPUBLIC extern const char *kPIPPlayerInUseID;
34 MPUBLIC extern const char *kPBPPlayerInUseID;
35 MPUBLIC extern const char *kImportRecorderInUseID;
36 MPUBLIC extern const char *kRecorderInUseID;
37 MPUBLIC extern const char *kFileTransferInUseID;
38 MPUBLIC extern const char *kTruncatingDeleteInUseID;
39 MPUBLIC extern const char *kFlaggerInUseID;
40 MPUBLIC extern const char *kTranscoderInUseID;
41 MPUBLIC extern const char *kPreviewGeneratorInUseID;
42 MPUBLIC extern const char *kJobQueueInUseID;
43 MPUBLIC extern const char *kCCExtractorInUseID;
44 
46 typedef QMap<long long, long long> frm_pos_map_t;
47 
48 typedef enum {
49  MARK_ALL = -100,
50  MARK_UNSET = -10,
77 } MarkTypes;
79 
81 typedef QMap<uint64_t, MarkTypes> frm_dir_map_t;
82 
83 typedef enum CommFlagStatuses {
89 
91 typedef enum SkipTypes {
94  COMM_DETECT_OFF = 0x00000000,
95  COMM_DETECT_BLANK = 0x00000001,
97  COMM_DETECT_SCENE = 0x00000002,
98  COMM_DETECT_LOGO = 0x00000004,
103  COMM_DETECT_2 = 0x00000100,
107  /* Scene detection doesn't seem to be too useful (in the USA); there *
108  * are just too many false positives from non-commercial cut scenes. */
110 
115 } SkipType;
116 
117 MPUBLIC QString SkipTypeToString(int);
118 MPUBLIC std::deque<int> GetPreferredSkipTypeCombinations(void);
119 
120 typedef enum TranscodingStatuses {
125 
130 typedef enum FlagMask {
131  FL_NONE = 0x00000000,
132  FL_COMMFLAG = 0x00000001,
133  FL_CUTLIST = 0x00000002,
134  FL_AUTOEXP = 0x00000004,
135  FL_EDITING = 0x00000008,
136  FL_BOOKMARK = 0x00000010,
137  FL_REALLYEDITING = 0x00000020,
138  FL_COMMPROCESSING = 0x00000040,
139  FL_DELETEPENDING = 0x00000080,
140  FL_TRANSCODED = 0x00000100,
141  FL_WATCHED = 0x00000200,
142  FL_PRESERVED = 0x00000400,
143  FL_CHANCOMMFREE = 0x00000800,
144  FL_REPEAT = 0x00001000,
145  FL_DUPLICATE = 0x00002000,
146  FL_REACTIVATE = 0x00004000,
147  FL_IGNOREBOOKMARK = 0x00008000,
148  FL_IGNOREPROGSTART = 0x00010000,
149  FL_ALLOWLASTPLAYPOS = 0x00020000,
150  // if you move the type mask please edit {Set,Get}ProgramInfoType()
151  FL_TYPEMASK = 0x00F00000,
152  FL_INUSERECORDING = 0x01000000,
153  FL_INUSEPLAYING = 0x02000000,
154  FL_INUSEOTHER = 0x04000000,
155 } ProgramFlag;
156 
157 typedef enum ProgramInfoType {
165 
168 typedef enum AudioProps {
169  AUD_UNKNOWN = 0x00, // For backwards compatibility do not change 0 or 1
170  AUD_STEREO = 0x01,
171  AUD_MONO = 0x02,
172  AUD_SURROUND = 0x04,
173  AUD_DOLBY = 0x08,
174  AUD_HARDHEAR = 0x10,
176 } AudioProperty; // has 6 bits in ProgramInfo::properties
177 #define kAudioPropertyBits 6
178 #define kAudioPropertyOffset 0
179 #define kAudioPropertyMask (0x3f<<kAudioPropertyOffset)
180 
183 typedef enum VideoProps {
184  // For backwards compatibility do not change 0 or 1
185  VID_UNKNOWN = 0x00,
186  VID_HDTV = 0x01,
188  VID_AVC = 0x04,
189  VID_720 = 0x08,
190  VID_1080 = 0x10,
191  VID_DAMAGED = 0x20,
192  VID_3DTV = 0x40,
193 } VideoProperty; // has 7 bits in ProgramInfo::properties
194 #define kVideoPropertyBits 7
195 #define kVideoPropertyOffset kAudioPropertyBits
196 #define kVideoPropertyMask (0x7f<<kVideoPropertyOffset)
197 
200 typedef enum SubtitleTypes {
201  // For backwards compatibility do not change 0 or 1
202  SUB_UNKNOWN = 0x00,
203  SUB_HARDHEAR = 0x01,
204  SUB_NORMAL = 0x02,
205  SUB_ONSCREEN = 0x04,
206  SUB_SIGNED = 0x08
207 } SubtitleType; // has 4 bits in ProgramInfo::properties
208 #define kSubtitlePropertyBits 4
209 #define kSubtitlePropertyOffset (kAudioPropertyBits+kVideoPropertyBits)
210 #define kSubtitlePropertyMask (0x0f<<kSubtitlePropertyOffset)
211 
212 
213 typedef enum AvailableStatusTypes {
220 } AvailableStatusType; // note stored in uint8_t in ProgramInfo
222 
224  wlDeleted = -4,
225  wlEarlier = -3,
226  wlWatched = -2,
228 };
229 
230 typedef enum AutoExpireTypes {
236 
237 #endif // _PROGRAM_INFO_TYPES_H_
SkipTypes
This is used as a bitmask.
Definition: programtypes.h:91
AudioProps
if AudioProps changes, the audioprop column in program and recordedprogram has to changed accordingly
Definition: programtypes.h:168
#define MPUBLIC
Definition: mythexp.h:10
SubtitleTypes
if SubtitleTypes changes, the subtitletypes column in program and recordedprogram has to changed acco...
Definition: programtypes.h:200
MPUBLIC const char * kTranscoderInUseID
ProgramInfoType
Definition: programtypes.h:157
MPUBLIC const char * kRecorderInUseID
MPUBLIC const char * kJobQueueInUseID
MPUBLIC const char * kFileTransferInUseID
QMap< uint64_t, MarkTypes > frm_dir_map_t
Frame # -> Mark map.
Definition: programtypes.h:81
MPUBLIC const char * kTruncatingDeleteInUseID
MPUBLIC const char * kCCExtractorInUseID
MPUBLIC const char * kPIPPlayerInUseID
MarkTypes
Definition: programtypes.h:48
MPUBLIC QString SkipTypeToString(int)
CommFlagStatuses
Definition: programtypes.h:83
enum SubtitleTypes SubtitleType
if SubtitleTypes changes, the subtitletypes column in program and recordedprogram has to changed acco...
TranscodingStatuses
Definition: programtypes.h:120
MPUBLIC std::deque< int > GetPreferredSkipTypeCombinations(void)
MPUBLIC const char * kFlaggerInUseID
MPUBLIC QString toString(MarkTypes type)
MPUBLIC const char * kPBPPlayerInUseID
enum TranscodingStatuses TranscodingStatus
VideoProps
if VideoProps changes, the videoprop column in program and recordedprogram has to changed accordingly
Definition: programtypes.h:183
WatchListStatus
Definition: programtypes.h:223
enum CommFlagStatuses CommFlagStatus
enum VideoProps VideoProperty
if VideoProps changes, the videoprop column in program and recordedprogram has to changed accordingly
enum AudioProps AudioProperty
if AudioProps changes, the audioprop column in program and recordedprogram has to changed accordingly
MPUBLIC const char * kPreviewGeneratorInUseID
enum AvailableStatusTypes AvailableStatusType
enum FlagMask ProgramFlag
If you change these please update: mythplugins/mythweb/modules/tv/classes/Program....
enum AutoExpireTypes AutoExpireType
MPUBLIC const char * kPlayerInUseID
enum SkipTypes SkipType
This is used as a bitmask.
QMap< long long, long long > frm_pos_map_t
Frame # -> File offset map.
Definition: programtypes.h:46
AutoExpireTypes
Definition: programtypes.h:230
AvailableStatusTypes
Definition: programtypes.h:213
deprecated, it is only 1:1 sample aspect ratio
Definition: programtypes.h:65
MPUBLIC const char * kImportRecorderInUseID
FlagMask
If you change these please update: mythplugins/mythweb/modules/tv/classes/Program....
Definition: programtypes.h:130