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 
26 // MythTV headers
27 #include "mythexp.h" // for MPUBLIC
28 #include "recordingtypes.h" // for RecordingType
29 
30 class QDateTime;
31 class QMutex;
32 
33 MPUBLIC extern const char *kPlayerInUseID;
34 MPUBLIC extern const char *kPIPPlayerInUseID;
35 MPUBLIC extern const char *kPBPPlayerInUseID;
36 MPUBLIC extern const char *kImportRecorderInUseID;
37 MPUBLIC extern const char *kRecorderInUseID;
38 MPUBLIC extern const char *kFileTransferInUseID;
39 MPUBLIC extern const char *kTruncatingDeleteInUseID;
40 MPUBLIC extern const char *kFlaggerInUseID;
41 MPUBLIC extern const char *kTranscoderInUseID;
42 MPUBLIC extern const char *kPreviewGeneratorInUseID;
43 MPUBLIC extern const char *kJobQueueInUseID;
44 MPUBLIC extern const char *kCCExtractorInUseID;
45 
47 typedef QMap<long long, long long> frm_pos_map_t;
48 
49 typedef enum {
50  MARK_ALL = -100,
51  MARK_UNSET = -10,
76 } MarkTypes;
77 MPUBLIC QString toString(MarkTypes type);
78 
80 typedef QMap<uint64_t, MarkTypes> frm_dir_map_t;
81 
82 typedef enum CommFlagStatuses {
88 
90 typedef enum SkipTypes {
93  COMM_DETECT_OFF = 0x00000000,
94  COMM_DETECT_BLANK = 0x00000001,
96  COMM_DETECT_SCENE = 0x00000002,
97  COMM_DETECT_LOGO = 0x00000004,
102  COMM_DETECT_2 = 0x00000100,
106  /* Scene detection doesn't seem to be too useful (in the USA); there *
107  * are just too many false positives from non-commercial cut scenes. */
109 
114 } SkipType;
115 
116 MPUBLIC QString SkipTypeToString(int);
117 MPUBLIC std::deque<int> GetPreferredSkipTypeCombinations(void);
118 
119 typedef enum TranscodingStatuses {
124 
129 typedef enum FlagMask {
130  FL_NONE = 0x00000000,
131  FL_COMMFLAG = 0x00000001,
132  FL_CUTLIST = 0x00000002,
133  FL_AUTOEXP = 0x00000004,
134  FL_EDITING = 0x00000008,
135  FL_BOOKMARK = 0x00000010,
136  FL_REALLYEDITING = 0x00000020,
137  FL_COMMPROCESSING = 0x00000040,
138  FL_DELETEPENDING = 0x00000080,
139  FL_TRANSCODED = 0x00000100,
140  FL_WATCHED = 0x00000200,
141  FL_PRESERVED = 0x00000400,
142  FL_CHANCOMMFREE = 0x00000800,
143  FL_REPEAT = 0x00001000,
144  FL_DUPLICATE = 0x00002000,
145  FL_REACTIVATE = 0x00004000,
146  FL_IGNOREBOOKMARK = 0x00008000,
147  // if you move the type mask please edit {Set,Get}ProgramInfoType()
148  FL_TYPEMASK = 0x000F0000,
149  FL_INUSERECORDING = 0x00100000,
150  FL_INUSEPLAYING = 0x00200000,
151  FL_INUSEOTHER = 0x00400000,
152 } ProgramFlag;
153 
154 typedef enum ProgramInfoType {
162 
165 typedef enum AudioProps {
166  AUD_UNKNOWN = 0x00, // For backwards compatibility do not change 0 or 1
167  AUD_STEREO = 0x01,
168  AUD_MONO = 0x02,
169  AUD_SURROUND = 0x04,
170  AUD_DOLBY = 0x08,
171  AUD_HARDHEAR = 0x10,
173 } AudioProperty; // has 6 bits in ProgramInfo::properties
174 #define kAudioPropertyBits 6
175 #define kAudioPropertyOffset 0
176 #define kAudioPropertyMask (0x3f<<kAudioPropertyOffset)
177 
180 typedef enum VideoProps {
181  // For backwards compatibility do not change 0 or 1
182  VID_UNKNOWN = 0x00,
183  VID_HDTV = 0x01,
185  VID_AVC = 0x04,
186  VID_720 = 0x08,
187  VID_1080 = 0x10,
188  VID_DAMAGED = 0x20,
189  VID_3DTV = 0x40,
190 } VideoProperty; // has 7 bits in ProgramInfo::properties
191 #define kVideoPropertyBits 7
192 #define kVideoPropertyOffset kAudioPropertyBits
193 #define kVideoPropertyMask (0x7f<<kVideoPropertyOffset)
194 
197 typedef enum SubtitleTypes {
198  // For backwards compatibility do not change 0 or 1
199  SUB_UNKNOWN = 0x00,
200  SUB_HARDHEAR = 0x01,
201  SUB_NORMAL = 0x02,
202  SUB_ONSCREEN = 0x04,
203  SUB_SIGNED = 0x08
204 } SubtitleType; // has 4 bits in ProgramInfo::properties
205 #define kSubtitlePropertyBits 4
206 #define kSubtitlePropertyOffset (kAudioPropertyBits+kVideoPropertyBits)
207 #define kSubtitlePropertyMask (0x0f<<kSubtitlePropertyOffset)
208 
209 typedef enum RecStatusTypes {
210  rsFailing = -14,
211  //rsOtherRecording = -13, (obsolete)
212  //rsOtherTuning = -12, (obsolete)
214  rsTuning = -10,
215  rsFailed = -9,
219  rsMissed = -5,
220  rsAborted = -4,
233  rsRepeat = 9,
237  //rsOtherShowing = 13 (obsolete)
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_
SkipTypes
This is used as a bitmask.
Definition: programtypes.h:90
MPUBLIC QString toDescription(RecStatusType, RecordingType, const QDateTime &recstartts)
Converts "recstatus" into a long human readable description.
AudioProps
if AudioProps changes, the audioprop column in program and recordedprogram has to changed accordingly...
Definition: programtypes.h:165
RecStatusTypes
Definition: programtypes.h:209
SubtitleTypes
if SubtitleTypes changes, the subtitletypes column in program and recordedprogram has to changed acco...
Definition: programtypes.h:197
MPUBLIC const char * kTranscoderInUseID
ProgramInfoType
Definition: programtypes.h:154
MPUBLIC const char * kRecorderInUseID
MPUBLIC const char * kJobQueueInUseID
MPUBLIC const char * kFileTransferInUseID
MPUBLIC QString toUIState(RecStatusType)
QMap< uint64_t, MarkTypes > frm_dir_map_t
Frame # -> Mark map.
Definition: programtypes.h:80
unsigned int uint
Definition: compat.h:139
GLint GLenum GLsizei GLint GLenum GLenum type
MPUBLIC const char * kTruncatingDeleteInUseID
MPUBLIC const char * kCCExtractorInUseID
MPUBLIC const char * kPIPPlayerInUseID
MarkTypes
Definition: programtypes.h:49
MPUBLIC QString SkipTypeToString(int)
CommFlagStatuses
Definition: programtypes.h:82
enum SubtitleTypes SubtitleType
if SubtitleTypes changes, the subtitletypes column in program and recordedprogram has to changed acco...
TranscodingStatuses
Definition: programtypes.h:119
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:180
WatchListStatus
Definition: programtypes.h:255
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
enum RecStatusTypes RecStatusType
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:47
AutoExpireTypes
Definition: programtypes.h:262
AvailableStatusTypes
Definition: programtypes.h:245
deprecated, it is only 1:1 sample aspect ratio
Definition: programtypes.h:66
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:129