VRS
A file format for sensor data.
Loading...
Searching...
No Matches
DescriptionRecord.h
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19#include <map>
20#include <string>
21
22#include "ForwardDefinitions.h"
23#include "WriteFileHandler.h"
24
25namespace vrs {
26
27class FileHandler;
28
29using std::map;
30using std::string;
31
33namespace DescriptionRecord {
34
36enum {
39};
40
49 WriteFileHandler& file,
50 const map<StreamId, const StreamTags*>& streamTags,
51 const map<string, string>& fileTags,
52 uint32_t& outPreviousRecordSize);
53
63 FileHandler& file,
64 uint32_t recordHeaderSize,
65 uint32_t& outDescriptionRecordSize,
66 map<StreamId, StreamTags>& outStreamTags,
67 map<string, string>& outFileTags);
68
73void upgradeStreamTags(map<string, string>& streamTags);
74
84 const map<string, string>& inFileTags,
85 map<StreamId, StreamTags>& inOutStreamTags);
86
87} // namespace DescriptionRecord
88
89} // namespace vrs
Class to abstract VRS file system operations, to enable support for alternate storage methods,...
Definition FileHandler.h:71
The WriteFileHandler interface adds write operations to the FileHandler interface.
Definition WriteFileHandler.h:45
void upgradeStreamTags(map< string, string > &streamTags)
Definition DescriptionRecord.cpp:355
@ kLegacyDescriptionFormatVersion
legacy description record format, json based.
Definition DescriptionRecord.h:37
@ kDescriptionFormatVersion
current description record format.
Definition DescriptionRecord.h:38
void createStreamSerialNumbers(const map< string, string > &inFileTags, map< StreamId, StreamTags > &inOutStreamTags)
Definition DescriptionRecord.cpp:374
int writeDescriptionRecord(WriteFileHandler &file, const map< StreamId, const StreamTags * > &streamTags, const map< string, string > &fileTags, uint32_t &outPreviousRecordSize)
Definition DescriptionRecord.cpp:274
int readDescriptionRecord(FileHandler &file, uint32_t recordHeaderSize, uint32_t &outDescriptionRecordSize, map< StreamId, StreamTags > &outStreamTags, map< string, string > &outFileTags)
Definition DescriptionRecord.cpp:293
Definition AsyncDiskFileChunk.hpp:49