MythTV  0.27pre
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
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 // ANSI C
16 #include <stdint.h> // for [u]int[32,64]_t
17 
18 // C++ headers
19 #include <deque>
20 using namespace std;
21 
22 // Qt headers
23 #include <QString>
24 #include <QMap>
25 #include <QHash>
26 
27 // MythTV headers
28 #include "mythexp.h" // for MPUBLIC
29 #include "recordingtypes.h" // for RecordingType
30 
31 class QDateTime;
32 class QMutex;
33 
34 MPUBLIC extern const char *kPlayerInUseID;
35 MPUBLIC extern const char *kPIPPlayerInUseID;
36 MPUBLIC extern const char *kPBPPlayerInUseID;
37 MPUBLIC extern const char *kImportRecorderInUseID;
38 MPUBLIC extern const char *kRecorderInUseID;
39 MPUBLIC extern const char *kFileTransferInUseID;
40 MPUBLIC extern const char *kTruncatingDeleteInUseID;
41 MPUBLIC extern const char *kFlaggerInUseID;
42 MPUBLIC extern const char *kTranscoderInUseID;
43 MPUBLIC extern const char *kPreviewGeneratorInUseID;
44 MPUBLIC extern const char *kJobQueueInUseID;
45 MPUBLIC extern const char *kCCExtractorInUseID;
46 
47 typedef QHash<QString,QString> InfoMap;
48 
50 typedef QMap<uint64_t, uint64_t> frm_pos_map_t;
51 
52 typedef enum {
53  MARK_ALL = -100,
54  MARK_UNSET = -10,
69  MARK_ASPECT_1_1 = 10, //< deprecated, it is only 1:1 sample aspect ratio
79 } MarkTypes;
80 MPUBLIC QString toString(MarkTypes type);
81 
83 typedef QMap<uint64_t, MarkTypes> frm_dir_map_t;
84 
85 typedef enum CommFlagStatuses {
91 
93 typedef enum SkipTypes {
96  COMM_DETECT_OFF = 0x00000000,
97  COMM_DETECT_BLANK = 0x00000001,
99  COMM_DETECT_SCENE = 0x00000002,
100  COMM_DETECT_LOGO = 0x00000004,
105  COMM_DETECT_2 = 0x00000100,
109  /* Scene detection doesn't seem to be too useful (in the USA); there *
110  * are just too many false positives from non-commercial cut scenes. */
112 
117 } SkipType;
118 
119 MPUBLIC QString SkipTypeToString(int);
121 
122 typedef enum TranscodingStatuses {
127 
132 typedef enum FlagMask {
133  FL_NONE = 0x00000000,
134  FL_COMMFLAG = 0x00000001,
135  FL_CUTLIST = 0x00000002,
136  FL_AUTOEXP = 0x00000004,
137  FL_EDITING = 0x00000008,
138  FL_BOOKMARK = 0x00000010,
139  FL_REALLYEDITING = 0x00000020,
140  FL_COMMPROCESSING = 0x00000040,
141  FL_DELETEPENDING = 0x00000080,
142  FL_TRANSCODED = 0x00000100,
143  FL_WATCHED = 0x00000200,
144  FL_PRESERVED = 0x00000400,
145  FL_CHANCOMMFREE = 0x00000800,
146  FL_REPEAT = 0x00001000,
147  FL_DUPLICATE = 0x00002000,
148  FL_REACTIVATE = 0x00004000,
149  FL_IGNOREBOOKMARK = 0x00008000,
150  // if you move the type mask please edit {Set,Get}ProgramInfoType()
151  FL_TYPEMASK = 0x000F0000,
152  FL_INUSERECORDING = 0x00100000,
153  FL_INUSEPLAYING = 0x00200000,
154  FL_INUSEOTHER = 0x00400000,
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 (0x3f<<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 typedef enum RecStatusTypes {
216  rsTuning = -10,
217  rsFailed = -9,
221  rsMissed = -5,
222  rsAborted = -4,
235  rsRepeat = 9,
238  rsOffLine = 12,
240 } RecStatusType; // note stored in int8_t in ProgramInfo
241 MPUBLIC QString toUIState(RecStatusType);
242 MPUBLIC QString toString(RecStatusType, uint id);
243 MPUBLIC QString toString(RecStatusType, RecordingType);
244 MPUBLIC QString toDescription(RecStatusType, RecordingType,
245  const QDateTime &recstartts);
246 
247 typedef enum AvailableStatusTypes {
254 } AvailableStatusType; // note stored in uint8_t in ProgramInfo
255 MPUBLIC QString toString(AvailableStatusType);
256 
258  wlDeleted = -4,
259  wlEarlier = -3,
260  wlWatched = -2,
262 };
263 
264 typedef enum AutoExpireTypes {
270 
271 #endif // _PROGRAM_INFO_TYPES_H_