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 
21 // Qt headers
22 #include <QString>
23 #include <QMap>
24 #include <QHash>
25 #include <QtCore>
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<long long, long long> frm_pos_map_t;
49 
50 typedef enum {
51  MARK_ALL = -100,
52  MARK_UNSET = -10,
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 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  // 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 class MPUBLIC RecStatus
211 {
212  Q_GADGET
213 
214  public:
215  Q_ENUMS(Type)
216 
217  enum Type {
218  Failing = -14,
219  //OtherRecording = -13, (obsolete)
220  //OtherTuning = -12, (obsolete)
221  MissedFuture = -11,
222  Tuning = -10,
223  Failed = -9,
224  TunerBusy = -8,
225  LowDiskSpace = -7,
226  Cancelled = -6,
227  Missed = -5,
228  Aborted = -4,
229  Recorded = -3,
230  Recording = -2,
231  WillRecord = -1,
232  Unknown = 0,
233  DontRecord = 1,
234  PreviousRecording = 2,
235  CurrentRecording = 3,
236  EarlierShowing = 4,
237  TooManyRecordings = 5,
238  NotListed = 6,
239  Conflict = 7,
240  LaterShowing = 8,
241  Repeat = 9,
242  Inactive = 10,
243  NeverRecord = 11,
244  Offline = 12
245  //OtherShowing = 13 (obsolete)
246  }; // note stored in int8_t in ProgramInfo
247 
248  static QString toUIState(Type);
249  static QString toString(Type, uint id);
250  static QString toString(Type, RecordingType type = kNotRecording);
251  static QString toDescription(Type, RecordingType,
252  const QDateTime &recstartts);
253 };
254 
255 typedef enum AvailableStatusTypes {
262 } AvailableStatusType; // note stored in uint8_t in ProgramInfo
263 MPUBLIC QString toString(AvailableStatusType);
264 
266  wlDeleted = -4,
267  wlEarlier = -3,
268  wlWatched = -2,
270 };
271 
272 typedef enum AutoExpireTypes {
278 
279 #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:166
QString toDescription(RecordingType rectype)
Converts "rectype" into a human readable description.
SubtitleTypes
if SubtitleTypes changes, the subtitletypes column in program and recordedprogram has to changed acco...
Definition: programtypes.h:198
MPUBLIC const char * kTranscoderInUseID
ProgramInfoType
Definition: programtypes.h:155
MPUBLIC const char * kRecorderInUseID
Q_ENUMS(Type) enum Type
Definition: programtypes.h:215
MPUBLIC const char * kJobQueueInUseID
static bool Recording(const RecordingInfo *p)
Definition: scheduler.cpp:234
MPUBLIC const char * kFileTransferInUseID
QMap< uint64_t, MarkTypes > frm_dir_map_t
Frame # -> Mark map.
Definition: programtypes.h:81
unsigned int uint
Definition: compat.h:136
GLint GLenum GLsizei GLint GLenum GLenum type
MPUBLIC const char * kTruncatingDeleteInUseID
MPUBLIC const char * kCCExtractorInUseID
MPUBLIC const char * kPIPPlayerInUseID
MarkTypes
Definition: programtypes.h:50
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:181
WatchListStatus
Definition: programtypes.h:265
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.php mythtv/bindings/perl/MythTV/Program.pm (search for "Assign the program flags" in both)
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:48
AutoExpireTypes
Definition: programtypes.h:272
AvailableStatusTypes
Definition: programtypes.h:255
deprecated, it is only 1:1 sample aspect ratio
Definition: programtypes.h:67
MPUBLIC const char * kImportRecorderInUseID
FlagMask
If you change these please update: mythplugins/mythweb/modules/tv/classes/Program.php mythtv/bindings/perl/MythTV/Program.pm (search for "Assign the program flags" in both)
Definition: programtypes.h:130