11 #include <nx/sdk/analytics/rect.h> 12 #include <nx/sdk/uuid.h> 15 namespace vms_server_plugins {
18 namespace object_streamer {
20 std::string readFileToString(
const std::string& filePath);
33 std::string trackIdRef;
35 std::map<std::string, std::string> attributes;
36 int frameNumberToGenerateObject = 0;
37 int64_t timestampUs = -1;
38 EntryType entryType = EntryType::regular;
39 std::string imageSource;
40 std::string titleText;
45 objectStreamIsNotAValidJson,
46 objectStreamIsNotAJsonArray,
47 objectItemIsNotAJsonObject,
51 frameNumberIsNotANumber,
52 boundingBoxIsNotAJsonObject,
58 attributesFieldIsNotAJsonObject,
59 attributeValueIsNotAString,
60 timestampIsNotANumber,
61 objectEntryTypeIsNotAString,
62 objectEntryTypeIsUnknown,
63 imageSourceIsNotAString,
69 std::set<Issue> errors;
70 std::set<Issue> warnings;
75 std::map<int, std::vector<Object>> objectsByFrameNumber;
76 std::set<std::string> objectTypeIds;
79 StreamInfo parseObjectStreamFile(
const std::string& filePath,
Issues* issues);
86 bool parseCommonFields(
91 bool parseBoundingBox(
98 std::map<std::string, std::string>* outAttributes,
103 int64_t* outTimestamp,
106 bool parseImageSource(
108 std::string* outImageSource,
113 std::string* outTitleText,
116 std::string issueToString(Issue issue);
Definition: stream_parser.h:73
Definition: stream_parser.h:67
Definition: apple_utils.h:6
Definition: stream_parser.h:22