MythTV  master
programtypeflags.h
Go to the documentation of this file.
1 //
2 // Define flags/names for various ProgramInfo values.
3 //
4 // This file should be included once from programtypes.h with
5 // DEFINE_FLAGS_ENUM set to create the enums, and included again from
6 // programinfo.cpp with DEFINE_FLAGS_NAMES set to create the enum
7 // value to string mappings.
8 //
9 #undef FLAGS_PREAMBLE
10 #undef FLAGS_POSTAMBLE
11 #undef FLAGS_DATA
12 
13 //NOLINTBEGIN(cppcoreguidelines-macro-usage)
14 #ifdef DEFINE_FLAGS_ENUM
15 #define FLAGS_PREAMBLE(NAME, TYPE) \
16  enum NAME : TYPE {
17 #define FLAGS_POSTAMBLE(NAME, TYPE) \
18  }; \
19  using NAME##Type = TYPE;
20 #define FLAGS_DATA(PREFIX, NAME, VALUE) \
21  PREFIX##_##NAME = (VALUE),
22 #endif
23 
24 #ifdef DEFINE_FLAGS_NAMES
25 #define FLAGS_PREAMBLE(NAME, TYPE) \
26  static const QMap<TYPE,QString> NAME##Names {
27 #define FLAGS_POSTAMBLE(NAME, TYPE) \
28  };
29 #define FLAGS_DATA(PREFIX, NAME, VALUE) \
30  { VALUE, #NAME },
31 #endif
32 //NOLINTEND(cppcoreguidelines-macro-usage)
33 
34 
39 FLAGS_PREAMBLE(ProgramFlag, uint32_t)
40 FLAGS_DATA(FL, NONE, 0x00000000)
41 FLAGS_DATA(FL, COMMFLAG, 0x00000001)
42 FLAGS_DATA(FL, CUTLIST, 0x00000002)
43 FLAGS_DATA(FL, AUTOEXP, 0x00000004)
44 FLAGS_DATA(FL, EDITING, 0x00000008)
45 FLAGS_DATA(FL, BOOKMARK, 0x00000010)
46 FLAGS_DATA(FL, REALLYEDITING, 0x00000020)
47 FLAGS_DATA(FL, COMMPROCESSING, 0x00000040)
48 FLAGS_DATA(FL, DELETEPENDING, 0x00000080)
49 FLAGS_DATA(FL, TRANSCODED, 0x00000100)
50 FLAGS_DATA(FL, WATCHED, 0x00000200)
51 FLAGS_DATA(FL, PRESERVED, 0x00000400)
52 FLAGS_DATA(FL, CHANCOMMFREE, 0x00000800)
53 FLAGS_DATA(FL, REPEAT, 0x00001000)
54 FLAGS_DATA(FL, DUPLICATE, 0x00002000)
55 FLAGS_DATA(FL, REACTIVATE, 0x00004000)
56 FLAGS_DATA(FL, IGNOREBOOKMARK, 0x00008000)
57 FLAGS_DATA(FL, IGNOREPROGSTART, 0x00010000)
58 FLAGS_DATA(FL, IGNORELASTPLAYPOS,0x00020000)
59 FLAGS_DATA(FL, LASTPLAYPOS, 0x00040000)
60 // if you move the type mask please edit {Set,Get}ProgramInfoType()
61 FLAGS_DATA(FL, TYPEMASK, 0x00F00000)
62 FLAGS_DATA(FL, INUSERECORDING, 0x01000000)
63 FLAGS_DATA(FL, INUSEPLAYING, 0x02000000)
64 FLAGS_DATA(FL, INUSEOTHER, 0x04000000)
65 FLAGS_POSTAMBLE(ProgramFlag, uint32_t)
66 
67  // For backwards compatibility do not change 0 or 1
70 FLAGS_PREAMBLE(AudioProps, uint8_t)
71 FLAGS_DATA(AUD, UNKNOWN, 0x00)
72 FLAGS_DATA(AUD, STEREO, 0x01)
73 FLAGS_DATA(AUD, MONO, 0x02)
74 FLAGS_DATA(AUD, SURROUND, 0x04)
75 FLAGS_DATA(AUD, DOLBY, 0x08)
76 FLAGS_DATA(AUD, HARDHEAR, 0x10)
77 FLAGS_DATA(AUD, VISUALIMPAIR, 0x20)
78 FLAGS_POSTAMBLE(AudioProps, uint8_t)
79 
80 // For backwards compatibility do not change 0 or 1
83 FLAGS_PREAMBLE(VideoProps, uint16_t)
84 FLAGS_DATA(VID, UNKNOWN, 0x000)
85 FLAGS_DATA(VID, WIDESCREEN, 0x001)
86 FLAGS_DATA(VID, HDTV, 0x002)
87 FLAGS_DATA(VID, MPEG2, 0x004)
88 FLAGS_DATA(VID, AVC, 0x008)
89 FLAGS_DATA(VID, HEVC, 0x010)
90 FLAGS_DATA(VID, 720, 0x020)
91 FLAGS_DATA(VID, 1080, 0x040)
92 FLAGS_DATA(VID, 4K, 0x080)
93 FLAGS_DATA(VID, 3DTV, 0x100)
94 FLAGS_DATA(VID, PROGRESSIVE, 0x200)
95 FLAGS_DATA(VID, DAMAGED, 0x400)
96 FLAGS_POSTAMBLE(VideoProps, uint16_t)
97 
98 // For backwards compatibility do not change 0 or 1
101 FLAGS_PREAMBLE(SubtitleProps, uint8_t)
102 FLAGS_DATA(SUB, UNKNOWN, 0x00)
103 FLAGS_DATA(SUB, HARDHEAR, 0x01)
104 FLAGS_DATA(SUB, NORMAL, 0x02)
105 FLAGS_DATA(SUB, ONSCREEN, 0x04)
106 FLAGS_DATA(SUB, SIGNED, 0x08)
107 FLAGS_POSTAMBLE(SubtitleProps, uint8_t)
NONE
@ NONE
Definition: element.h:84
uint16_t
unsigned short uint16_t
Definition: iso6937tables.h:3