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 using frm_pos_map_t = QMap<long long, long long>;
47 
48 enum MarkTypes {
49  MARK_ALL = -100,
50  MARK_UNSET = -10,
77 };
79 
81 using frm_dir_map_t = QMap<uint64_t, MarkTypes>;
82 
88 };
89 
91 enum SkipType {
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 };
116 
117 MPUBLIC QString SkipTypeToString(int);
118 MPUBLIC std::deque<int> GetPreferredSkipTypeCombinations(void);
119 
124 };
125 
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 };
156 
164 };
165 
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 }; // has 6 bits in ProgramInfo::properties
177 #define kAudioPropertyBits 6
178 #define kAudioPropertyOffset 0
179 #define kAudioPropertyMask (0x3f<<kAudioPropertyOffset)
180 
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 }; // has 7 bits in ProgramInfo::properties
194 #define kVideoPropertyBits 7
195 #define kVideoPropertyOffset kAudioPropertyBits
196 #define kVideoPropertyMask (0x7f<<kVideoPropertyOffset)
197 
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 }; // has 4 bits in ProgramInfo::properties
208 #define kSubtitlePropertyBits 4
209 #define kSubtitlePropertyOffset (kAudioPropertyBits+kVideoPropertyBits)
210 #define kSubtitlePropertyMask (0x0f<<kSubtitlePropertyOffset)
211 
212 
220 }; // note stored in uint8_t in ProgramInfo
222 
224  wlDeleted = -4,
225  wlEarlier = -3,
226  wlWatched = -2,
228 };
229 
235 };
236 
237 #endif // _PROGRAM_INFO_TYPES_H_
AudioProps
if AudioProps changes, the audioprop column in program and recordedprogram has to changed accordingly
Definition: programtypes.h:168
AutoExpireType
Definition: programtypes.h:230
#define MPUBLIC
Definition: mythexp.h:10
SubtitleType
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
TranscodingStatus
Definition: programtypes.h:120
CommFlagStatus
Definition: programtypes.h:83
MPUBLIC const char * kJobQueueInUseID
MPUBLIC const char * kFileTransferInUseID
MPUBLIC const char * kTruncatingDeleteInUseID
MPUBLIC const char * kCCExtractorInUseID
MPUBLIC const char * kPIPPlayerInUseID
QMap< long long, long long > frm_pos_map_t
Frame # -> File offset map.
Definition: programtypes.h:46
MarkTypes
Definition: programtypes.h:48
MPUBLIC QString SkipTypeToString(int)
ProgramFlag
If you change these please update: mythplugins/mythweb/modules/tv/classes/Program....
Definition: programtypes.h:130
MPUBLIC std::deque< int > GetPreferredSkipTypeCombinations(void)
MPUBLIC const char * kFlaggerInUseID
SkipType
This is used as a bitmask.
Definition: programtypes.h:91
MPUBLIC QString toString(MarkTypes type)
MPUBLIC const char * kPBPPlayerInUseID
VideoProps
if VideoProps changes, the videoprop column in program and recordedprogram has to changed accordingly
Definition: programtypes.h:183
AvailableStatusType
Definition: programtypes.h:213
WatchListStatus
Definition: programtypes.h:223
MPUBLIC const char * kPreviewGeneratorInUseID
QMap< uint64_t, MarkTypes > frm_dir_map_t
Frame # -> Mark map.
Definition: programtypes.h:81
MPUBLIC const char * kPlayerInUseID
deprecated, it is only 1:1 sample aspect ratio
Definition: programtypes.h:65
MPUBLIC const char * kImportRecorderInUseID