MythTV  master
programtypes.h
Go to the documentation of this file.
1 #ifndef PROGRAM_TYPES_H
2 #define PROGRAM_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,
78 };
80 
82 using frm_dir_map_t = QMap<uint64_t, MarkTypes>;
83 
89 };
90 
92 enum SkipType {
95  COMM_DETECT_OFF = 0x00000000,
96  COMM_DETECT_BLANK = 0x00000001,
98  COMM_DETECT_SCENE = 0x00000002,
99  COMM_DETECT_LOGO = 0x00000004,
104  COMM_DETECT_2 = 0x00000100,
108  /* Scene detection doesn't seem to be too useful (in the USA); there *
109  * are just too many false positives from non-commercial cut scenes. */
111 
116 };
117 
118 MPUBLIC QString SkipTypeToString(int flags);
119 MPUBLIC std::deque<int> GetPreferredSkipTypeCombinations(void);
120 
125 };
126 
132  FL_NONE = 0x00000000,
133  FL_COMMFLAG = 0x00000001,
134  FL_CUTLIST = 0x00000002,
135  FL_AUTOEXP = 0x00000004,
136  FL_EDITING = 0x00000008,
137  FL_BOOKMARK = 0x00000010,
138  FL_REALLYEDITING = 0x00000020,
139  FL_COMMPROCESSING = 0x00000040,
140  FL_DELETEPENDING = 0x00000080,
141  FL_TRANSCODED = 0x00000100,
142  FL_WATCHED = 0x00000200,
143  FL_PRESERVED = 0x00000400,
144  FL_CHANCOMMFREE = 0x00000800,
145  FL_REPEAT = 0x00001000,
146  FL_DUPLICATE = 0x00002000,
147  FL_REACTIVATE = 0x00004000,
148  FL_IGNOREBOOKMARK = 0x00008000,
149  FL_IGNOREPROGSTART = 0x00010000,
150  FL_ALLOWLASTPLAYPOS = 0x00020000,
151  // if you move the type mask please edit {Set,Get}ProgramInfoType()
152  FL_TYPEMASK = 0x00F00000,
153  FL_INUSERECORDING = 0x01000000,
154  FL_INUSEPLAYING = 0x02000000,
155  FL_INUSEOTHER = 0x04000000,
156 };
157 
165 };
166 
170  AUD_UNKNOWN = 0x00, // For backwards compatibility do not change 0 or 1
171  AUD_STEREO = 0x01,
172  AUD_MONO = 0x02,
173  AUD_SURROUND = 0x04,
174  AUD_DOLBY = 0x08,
175  AUD_HARDHEAR = 0x10,
177 }; // has 6 bits in ProgramInfo::properties
178 #define kAudioPropertyBits 6
179 #define kAudioPropertyOffset 0
180 #define kAudioPropertyMask (0x3f<<kAudioPropertyOffset)
181 
185  // For backwards compatibility do not change 0 or 1
186  VID_UNKNOWN = 0x000,
187  VID_WIDESCREEN = 0x001,
188  VID_HDTV = 0x002,
189  VID_MPEG2 = 0x004,
190  VID_AVC = 0x008,
191  VID_HEVC = 0x010,
192  VID_720 = 0x020,
193  VID_1080 = 0x040,
194  VID_4K = 0x080,
195  VID_3DTV = 0x100,
197  VID_DAMAGED = 0x400,
198 }; // has 11 bits in ProgramInfo::properties
199 #define kVideoPropertyBits 11
200 #define kVideoPropertyOffset kAudioPropertyBits
201 #define kVideoPropertyMask (0x7ff<<kVideoPropertyOffset)
202 
206  // For backwards compatibility do not change 0 or 1
207  SUB_UNKNOWN = 0x00,
208  SUB_HARDHEAR = 0x01,
209  SUB_NORMAL = 0x02,
210  SUB_ONSCREEN = 0x04,
211  SUB_SIGNED = 0x08
212 }; // has 4 bits in ProgramInfo::properties
213 #define kSubtitlePropertyBits 4
214 #define kSubtitlePropertyOffset (kAudioPropertyBits+kVideoPropertyBits)
215 #define kSubtitlePropertyMask (0x0f<<kSubtitlePropertyOffset)
216 
217 
225 }; // note stored in uint8_t in ProgramInfo
226 MPUBLIC QString toString(AvailableStatusType status);
227 
229  wlDeleted = -4,
230  wlEarlier = -3,
231  wlWatched = -2,
233 };
234 
240 };
241 
242 #endif // PROGRAM_TYPES_H
kLiveTVAutoExpire
@ kLiveTVAutoExpire
Definition: programtypes.h:239
COMM_DETECT_2_ALL
@ COMM_DETECT_2_ALL
Definition: programtypes.h:110
FL_TRANSCODED
@ FL_TRANSCODED
Definition: programtypes.h:141
COMM_DETECT_SCENE
@ COMM_DETECT_SCENE
Definition: programtypes.h:98
MPUBLIC
#define MPUBLIC
Definition: mythexp.h:10
MARK_KEYFRAME
@ MARK_KEYFRAME
Definition: programtypes.h:62
COMM_FLAG_NOT_FLAGGED
@ COMM_FLAG_NOT_FLAGGED
Definition: programtypes.h:85
FL_COMMPROCESSING
@ FL_COMMPROCESSING
Definition: programtypes.h:139
SUB_HARDHEAR
@ SUB_HARDHEAR
Definition: programtypes.h:208
MARK_ASPECT_16_9
@ MARK_ASPECT_16_9
Definition: programtypes.h:67
COMM_DETECT_ALL
@ COMM_DETECT_ALL
Definition: programtypes.h:101
MARK_COMM_END
@ MARK_COMM_END
Definition: programtypes.h:60
VID_HDTV
@ VID_HDTV
Definition: programtypes.h:188
MARK_ASPECT_2_21_1
@ MARK_ASPECT_2_21_1
Definition: programtypes.h:68
FL_WATCHED
@ FL_WATCHED
Definition: programtypes.h:142
VID_3DTV
@ VID_3DTV
Definition: programtypes.h:195
asFileNotFound
@ asFileNotFound
Definition: programtypes.h:222
FL_DUPLICATE
@ FL_DUPLICATE
Definition: programtypes.h:146
kCCExtractorInUseID
const MPUBLIC char * kCCExtractorInUseID
Definition: programtypes.cpp:24
kPlayerInUseID
const MPUBLIC char * kPlayerInUseID
Definition: programtypes.cpp:13
MARK_PLACEHOLDER
@ MARK_PLACEHOLDER
Definition: programtypes.h:54
asAvailable
@ asAvailable
Definition: programtypes.h:219
VID_DAMAGED
@ VID_DAMAGED
Definition: programtypes.h:197
kPreviewGeneratorInUseID
const MPUBLIC char * kPreviewGeneratorInUseID
Definition: programtypes.cpp:22
mythexp.h
MARK_CUT_END
@ MARK_CUT_END
Definition: programtypes.h:55
ProgramFlag
ProgramFlag
If you change these please update: mythplugins/mythweb/modules/tv/classes/Program....
Definition: programtypes.h:131
FL_REACTIVATE
@ FL_REACTIVATE
Definition: programtypes.h:147
COMM_DETECT_PREPOSTROLL
@ COMM_DETECT_PREPOSTROLL
Definition: programtypes.h:112
kPBPPlayerInUseID
const MPUBLIC char * kPBPPlayerInUseID
Definition: programtypes.cpp:15
COMM_DETECT_BLANK_SCENE
@ COMM_DETECT_BLANK_SCENE
Definition: programtypes.h:100
asDeleted
@ asDeleted
Definition: programtypes.h:224
frm_dir_map_t
QMap< uint64_t, MarkTypes > frm_dir_map_t
Frame # -> Mark map.
Definition: programtypes.h:82
TRANSCODING_RUNNING
@ TRANSCODING_RUNNING
Definition: programtypes.h:124
FL_INUSEPLAYING
@ FL_INUSEPLAYING
Definition: programtypes.h:154
VideoProps
VideoProps
if VideoProps changes, the videoprop column in program and recordedprogram has to changed accordingly
Definition: programtypes.h:184
COMM_DETECT_OFF
@ COMM_DETECT_OFF
Definition: programtypes.h:95
wlDeleted
@ wlDeleted
Definition: programtypes.h:229
AvailableStatusType
AvailableStatusType
Definition: programtypes.h:218
MARK_UTIL_PROGSTART
@ MARK_UTIL_PROGSTART
Definition: programtypes.h:76
kRecorderInUseID
const MPUBLIC char * kRecorderInUseID
Definition: programtypes.cpp:17
recordingtypes.h
kProgramInfoTypeVideoBD
@ kProgramInfoTypeVideoBD
Definition: programtypes.h:164
TRANSCODING_NOT_TRANSCODED
@ TRANSCODING_NOT_TRANSCODED
Definition: programtypes.h:122
kDeletedAutoExpire
@ kDeletedAutoExpire
Definition: programtypes.h:238
FL_AUTOEXP
@ FL_AUTOEXP
Definition: programtypes.h:135
COMM_FLAG_PROCESSING
@ COMM_FLAG_PROCESSING
Definition: programtypes.h:87
AUD_HARDHEAR
@ AUD_HARDHEAR
Definition: programtypes.h:175
VID_720
@ VID_720
Definition: programtypes.h:192
VID_UNKNOWN
@ VID_UNKNOWN
Definition: programtypes.h:186
COMM_FLAG_DONE
@ COMM_FLAG_DONE
Definition: programtypes.h:86
COMM_DETECT_2_BLANK
@ COMM_DETECT_2_BLANK
Definition: programtypes.h:106
SkipTypeToString
MPUBLIC QString SkipTypeToString(int flags)
Definition: programtypes.cpp:79
kDisableAutoExpire
@ kDisableAutoExpire
Definition: programtypes.h:236
TRANSCODING_COMPLETE
@ TRANSCODING_COMPLETE
Definition: programtypes.h:123
kTruncatingDeleteInUseID
const MPUBLIC char * kTruncatingDeleteInUseID
Definition: programtypes.cpp:19
COMM_DETECT_BLANKS
@ COMM_DETECT_BLANKS
Definition: programtypes.h:97
VID_4K
@ VID_4K
Definition: programtypes.h:194
asPendingDelete
@ asPendingDelete
Definition: programtypes.h:221
COMM_DETECT_COMMFREE
@ COMM_DETECT_COMMFREE
Definition: programtypes.h:93
AUD_UNKNOWN
@ AUD_UNKNOWN
Definition: programtypes.h:170
kNormalAutoExpire
@ kNormalAutoExpire
Definition: programtypes.h:237
MARK_DURATION_MS
@ MARK_DURATION_MS
Definition: programtypes.h:74
ProgramInfoType
ProgramInfoType
Definition: programtypes.h:158
MARK_GOP_START
@ MARK_GOP_START
Definition: programtypes.h:61
AUD_SURROUND
@ AUD_SURROUND
Definition: programtypes.h:173
TranscodingStatus
TranscodingStatus
Definition: programtypes.h:121
MARK_ASPECT_CUSTOM
@ MARK_ASPECT_CUSTOM
Definition: programtypes.h:69
MARK_ALL
@ MARK_ALL
Definition: programtypes.h:49
wlWatched
@ wlWatched
Definition: programtypes.h:231
MARK_TMP_CUT_END
@ MARK_TMP_CUT_END
Definition: programtypes.h:51
kProgramInfoTypeVideoDVD
@ kProgramInfoTypeVideoDVD
Definition: programtypes.h:161
FL_INUSERECORDING
@ FL_INUSERECORDING
Definition: programtypes.h:153
MARK_VIDEO_WIDTH
@ MARK_VIDEO_WIDTH
Definition: programtypes.h:71
kProgramInfoTypeVideoFile
@ kProgramInfoTypeVideoFile
Definition: programtypes.h:160
MARK_BOOKMARK
@ MARK_BOOKMARK
Definition: programtypes.h:57
FL_NONE
@ FL_NONE
Definition: programtypes.h:132
asZeroByte
@ asZeroByte
Definition: programtypes.h:223
FL_CHANCOMMFREE
@ FL_CHANCOMMFREE
Definition: programtypes.h:144
MARK_VIDEO_HEIGHT
@ MARK_VIDEO_HEIGHT
Definition: programtypes.h:72
FL_INUSEOTHER
@ FL_INUSEOTHER
Definition: programtypes.h:155
MARK_VIDEO_RATE
@ MARK_VIDEO_RATE
Definition: programtypes.h:73
VID_AVC
@ VID_AVC
Definition: programtypes.h:190
MARK_TOTAL_FRAMES
@ MARK_TOTAL_FRAMES
Definition: programtypes.h:75
FL_PRESERVED
@ FL_PRESERVED
Definition: programtypes.h:143
wlEarlier
@ wlEarlier
Definition: programtypes.h:230
SUB_UNKNOWN
@ SUB_UNKNOWN
Definition: programtypes.h:207
kProgramInfoTypeVideoStreamingHTML
@ kProgramInfoTypeVideoStreamingHTML
Definition: programtypes.h:162
kJobQueueInUseID
const MPUBLIC char * kJobQueueInUseID
Definition: programtypes.cpp:23
COMM_DETECT_PREPOSTROLL_ALL
@ COMM_DETECT_PREPOSTROLL_ALL
Definition: programtypes.h:113
MARK_ASPECT_4_3
@ MARK_ASPECT_4_3
Definition: programtypes.h:66
frm_pos_map_t
QMap< long long, long long > frm_pos_map_t
Frame # -> File offset map.
Definition: programtypes.h:46
FL_EDITING
@ FL_EDITING
Definition: programtypes.h:136
kProgramInfoTypeVideoStreamingRTSP
@ kProgramInfoTypeVideoStreamingRTSP
Definition: programtypes.h:163
COMM_DETECT_UNINIT
@ COMM_DETECT_UNINIT
Definition: programtypes.h:94
MARK_CUT_START
@ MARK_CUT_START
Definition: programtypes.h:56
FL_IGNOREPROGSTART
@ FL_IGNOREPROGSTART
Definition: programtypes.h:149
MARK_ASPECT_1_1
@ MARK_ASPECT_1_1
deprecated, it is only 1:1 sample aspect ratio
Definition: programtypes.h:65
FL_DELETEPENDING
@ FL_DELETEPENDING
Definition: programtypes.h:140
wlExpireOff
@ wlExpireOff
Definition: programtypes.h:232
MARK_UTIL_LASTPLAYPOS
@ MARK_UTIL_LASTPLAYPOS
Definition: programtypes.h:77
VID_HEVC
@ VID_HEVC
Definition: programtypes.h:191
AudioProps
AudioProps
if AudioProps changes, the audioprop column in program and recordedprogram has to changed accordingly
Definition: programtypes.h:169
FL_REALLYEDITING
@ FL_REALLYEDITING
Definition: programtypes.h:138
MARK_GOP_BYFRAME
@ MARK_GOP_BYFRAME
Definition: programtypes.h:64
MARK_UPDATED_CUT
@ MARK_UPDATED_CUT
Definition: programtypes.h:53
AUD_VISUALIMPAIR
@ AUD_VISUALIMPAIR
Definition: programtypes.h:176
FL_BOOKMARK
@ FL_BOOKMARK
Definition: programtypes.h:137
MARK_SCENE_CHANGE
@ MARK_SCENE_CHANGE
Definition: programtypes.h:63
MarkTypes
MarkTypes
Definition: programtypes.h:48
kImportRecorderInUseID
const MPUBLIC char * kImportRecorderInUseID
Definition: programtypes.cpp:16
VID_PROGRESSIVE
@ VID_PROGRESSIVE
Definition: programtypes.h:196
FL_ALLOWLASTPLAYPOS
@ FL_ALLOWLASTPLAYPOS
Definition: programtypes.h:150
SubtitleType
SubtitleType
if SubtitleTypes changes, the subtitletypes column in program and recordedprogram has to changed acco...
Definition: programtypes.h:205
VID_1080
@ VID_1080
Definition: programtypes.h:193
FL_COMMFLAG
@ FL_COMMFLAG
Definition: programtypes.h:133
GetPreferredSkipTypeCombinations
MPUBLIC std::deque< int > GetPreferredSkipTypeCombinations(void)
Definition: programtypes.cpp:117
AUD_STEREO
@ AUD_STEREO
Definition: programtypes.h:171
FL_CUTLIST
@ FL_CUTLIST
Definition: programtypes.h:134
FL_TYPEMASK
@ FL_TYPEMASK
Definition: programtypes.h:152
AutoExpireType
AutoExpireType
Definition: programtypes.h:235
toString
MPUBLIC QString toString(MarkTypes type)
Definition: programtypes.cpp:26
AUD_DOLBY
@ AUD_DOLBY
Definition: programtypes.h:174
MARK_UNSET
@ MARK_UNSET
Definition: programtypes.h:50
kTranscoderInUseID
const MPUBLIC char * kTranscoderInUseID
Definition: programtypes.cpp:21
SkipType
SkipType
This is used as a bitmask.
Definition: programtypes.h:92
COMM_DETECT_2_SCENE
@ COMM_DETECT_2_SCENE
Definition: programtypes.h:107
FL_REPEAT
@ FL_REPEAT
Definition: programtypes.h:145
SUB_NORMAL
@ SUB_NORMAL
Definition: programtypes.h:209
VID_WIDESCREEN
@ VID_WIDESCREEN
Definition: programtypes.h:187
COMM_DETECT_LOGO
@ COMM_DETECT_LOGO
Definition: programtypes.h:99
AUD_MONO
@ AUD_MONO
Definition: programtypes.h:172
MARK_SCAN_PROGRESSIVE
@ MARK_SCAN_PROGRESSIVE
Definition: programtypes.h:70
asNotYetAvailable
@ asNotYetAvailable
Definition: programtypes.h:220
FL_IGNOREBOOKMARK
@ FL_IGNOREBOOKMARK
Definition: programtypes.h:148
MARK_COMM_START
@ MARK_COMM_START
Definition: programtypes.h:59
kPIPPlayerInUseID
const MPUBLIC char * kPIPPlayerInUseID
Definition: programtypes.cpp:14
COMM_FLAG_COMMFREE
@ COMM_FLAG_COMMFREE
Definition: programtypes.h:88
COMM_DETECT_2
@ COMM_DETECT_2
Definition: programtypes.h:104
WatchListStatus
WatchListStatus
Definition: programtypes.h:228
CommFlagStatus
CommFlagStatus
Definition: programtypes.h:84
kProgramInfoTypeRecording
@ kProgramInfoTypeRecording
Definition: programtypes.h:159
kFlaggerInUseID
const MPUBLIC char * kFlaggerInUseID
Definition: programtypes.cpp:20
kFileTransferInUseID
const MPUBLIC char * kFileTransferInUseID
Definition: programtypes.cpp:18
SUB_ONSCREEN
@ SUB_ONSCREEN
Definition: programtypes.h:210
COMM_DETECT_2_LOGO
@ COMM_DETECT_2_LOGO
Definition: programtypes.h:105
MARK_TMP_CUT_START
@ MARK_TMP_CUT_START
Definition: programtypes.h:52
VID_MPEG2
@ VID_MPEG2
Definition: programtypes.h:189
SUB_SIGNED
@ SUB_SIGNED
Definition: programtypes.h:211
MARK_BLANK_FRAME
@ MARK_BLANK_FRAME
Definition: programtypes.h:58
COMM_DETECT_BLANK
@ COMM_DETECT_BLANK
Definition: programtypes.h:96