-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathgimi.cpp
121 lines (101 loc) · 4.13 KB
/
gimi.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#include "core/fourcc.h"
#include "core/spec.h"
#include <cstring>
static const SpecDesc specGimi = {
"gimi",
"GEOINT Imagery Media for ISR - NGA.STND.0076",
{ "isobmff" },
{
{ "Requirement NGA.STND.0076_1.0-02\n"
"An NGA.STND.0076_1.0 file shall include the 'geo1' brand in the\n"
"compatible brands list.\n",
[](Box const &root, IReport *out) {
if(root.children.empty() || root.children[0].fourcc != FOURCC("ftyp")) {
out->error("'ftyp' box not found");
return;
}
auto &ftypBox = root.children[0];
bool found = false;
for(auto &brand : ftypBox.syms)
if(!strcmp(brand.name, "compatible_brand") && brand.value == FOURCC("geo1"))
found = true;
if(!found)
out->error("'geo1' brand not found in 'ftyp' box");
} },
{ "Requirement NGA.STND.0076_1.0-03\n"
"An NGA.STND.0076_1.0 file shall include the 'unif' brand in the compatible brands list.\n",
[](Box const &root, IReport *out) {
if(root.children.empty() || root.children[0].fourcc != FOURCC("ftyp")) {
out->error("'ftyp' box not found");
return;
}
auto &ftypBox = root.children[0];
bool found = false;
for(auto &brand : ftypBox.syms)
if(!strcmp(brand.name, "compatible_brand") && brand.value == FOURCC("unif"))
found = true;
if(!found)
out->error("'unif' brand not found in 'ftyp' box");
} },
{ "Requirement NGA.STND.0076_1.0-04\n"
"An NGA.STND.0076 file shall include the 'unif' brand in the compatible brands list.",
[](Box const &root, IReport *out) {
(void)root;
(void)out;
/* TODO: The 'unif' brand indicates the unified implementation and handling of
IDs across file-scoped MetaBox items, tracks, track groups, and entity groups.
*/
} },
{ "Requirement NGA.STND.0076_1.0-05\n"
"Where an NGA.STND.0076 file contains Still Imagery content, the file shall conform to the 'mif2' brand "
"requirements.",
[](Box const &root, IReport *out) {
(void)root;
(void)out;
/* TODO: The ‘mif2’ brand represents interoperability requirements for image and metadata items. ‘mif2’
* represents a baseline for Still Imagery support in this standard. The HEIF standard documents the specifics
* of the branding differences.*/
} },
{ "Requirement NGA.STND.0076_1.0-06\n"
"Where an NGA.STND.0076 file contains Still Imagery content, the file shall include 'mif2' brand.",
[](Box const &root, IReport *out) {
(void)root;
(void)out;
/* TODO: */
} },
{ "Requirement NGA.STND.0076_1.0-07\n"
"Where an NGA.STND.0076 file contains image sequence content, the file shall conform to the requirements "
"associated with the 'msf1' brand.",
[](Box const &root, IReport *out) {
(void)root;
(void)out;
/* TODO: The 'msf1' brand indicates the presence of a HEIF defined image sequence.*/
} },
{ "Requirement NGA.STND.0076_1.0-08\n"
"Where an NGA.STND.0076 file contains image sequence content, the file shall include the 'msf1' brand.",
[](Box const &root, IReport *out) {
(void)root;
(void)out;
/* TODO: */
} },
{ "Requirement NGA.STND.0076_1.0-09\n"
"Where an NGA.STND.0076 file contains Motion Imagery content, the file shall conform to the requirements "
"associated with the 'isoa' brand.",
[](Box const &root, IReport *out) {
(void)root;
(void)out;
/* TODO: The ‘isoa’ brand represents interoperability requirements for the base format as well as Motion Imagery
* requirements for this standard. */
} },
{ "Requirement NGA.STND.0076_1.0-10\n"
"NGA.STND.0076_1.0-10 Where an NGA.STND.0076 file contains Motion Imagery content, the file shall include "
"the 'isoa' brand.",
[](Box const &root, IReport *out) {
(void)root;
(void)out;
/* TODO: */
} },
},
isIsobmff,
};
static auto const registered = registerSpec(&specGimi);