MythTV  0.28pre
 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 
48 typedef QMap<uint64_t, uint64_t> frm_pos_map_t;
49 
50 typedef enum {
51  MARK_ALL = -100,
52  MARK_UNSET = -10,
67  MARK_ASPECT_1_1 = 10, //< deprecated, it is only 1:1 sample aspect ratio
77 } MarkTypes;
78 MPUBLIC QString toString(MarkTypes type);
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 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  // if you move the type mask please edit {Set,Get}ProgramInfoType()
149  FL_TYPEMASK = 0x000F0000,
150  FL_INUSERECORDING = 0x00100000,
151  FL_INUSEPLAYING = 0x00200000,
152  FL_INUSEOTHER = 0x00400000,
153 } ProgramFlag;
154 
155 typedef enum ProgramInfoType {
163 
166 typedef enum AudioProps {
167  AUD_UNKNOWN = 0x00, // For backwards compatibility do not change 0 or 1
168  AUD_STEREO = 0x01,
169  AUD_MONO = 0x02,
170  AUD_SURROUND = 0x04,
171  AUD_DOLBY = 0x08,
172  AUD_HARDHEAR = 0x10,
174 } AudioProperty; // has 6 bits in ProgramInfo::properties
175 #define kAudioPropertyBits 6
176 #define kAudioPropertyOffset 0
177 #define kAudioPropertyMask (0x3f<<kAudioPropertyOffset)
178 
181 typedef enum VideoProps {
182  // For backwards compatibility do not change 0 or 1
183  VID_UNKNOWN = 0x00,
184  VID_HDTV = 0x01,
186  VID_AVC = 0x04,
187  VID_720 = 0x08,
188  VID_1080 = 0x10,
189  VID_DAMAGED = 0x20,
190  VID_3DTV = 0x40,
191 } VideoProperty; // has 7 bits in ProgramInfo::properties
192 #define kVideoPropertyBits 7
193 #define kVideoPropertyOffset kAudioPropertyBits
194 #define kVideoPropertyMask (0x7f<<kVideoPropertyOffset)
195 
198 typedef enum SubtitleTypes {
199  // For backwards compatibility do not change 0 or 1
200  SUB_UNKNOWN = 0x00,
201  SUB_HARDHEAR = 0x01,
202  SUB_NORMAL = 0x02,
203  SUB_ONSCREEN = 0x04,
204  SUB_SIGNED = 0x08
205 } SubtitleType; // has 4 bits in ProgramInfo::properties
206 #define kSubtitlePropertyBits 4
207 #define kSubtitlePropertyOffset (kAudioPropertyBits+kVideoPropertyBits)
208 #define kSubtitlePropertyMask (0x0f<<kSubtitlePropertyOffset)
209 
210 typedef enum RecStatusTypes {
214  rsTuning = -10,
215  rsFailed = -9,
219  rsMissed = -5,
220  rsAborted = -4,
233  rsRepeat = 9,
236  rsOffLine = 12,
238 } RecStatusType; // note stored in int8_t in ProgramInfo
239 MPUBLIC QString toUIState(RecStatusType);
240 MPUBLIC QString toString(RecStatusType, uint id);
242 MPUBLIC QString toDescription(RecStatusType, RecordingType,
243  const QDateTime &recstartts);
244 
245 typedef enum AvailableStatusTypes {
252 } AvailableStatusType; // note stored in uint8_t in ProgramInfo
253 MPUBLIC QString toString(AvailableStatusType);
254 
256  wlDeleted = -4,
257  wlEarlier = -3,
258  wlWatched = -2,
260 };
261 
262 typedef enum AutoExpireTypes {
268 
269 #endif // _PROGRAM_INFO_TYPES_H_