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 <vrs/ForwardDefinitions.h>
23#include <vrs/VrsExport.h>
24#include <vrs/WriteFileHandler.h>
25
26namespace vrs {
27
28class FileHandler;
29
30using std::map;
31using std::string;
32
34namespace DescriptionRecord {
35
37enum {
40};
41
49VRS_API int writeDescriptionRecord(
50 WriteFileHandler& file,
51 const map<StreamId, const StreamTags*>& streamTags,
52 const map<string, string>& fileTags,
53 uint32_t& outPreviousRecordSize);
54
63VRS_API int readDescriptionRecord(
64 FileHandler& file,
65 uint32_t recordHeaderSize,
66 uint32_t& outDescriptionRecordSize,
67 map<StreamId, StreamTags>& outStreamTags,
68 map<string, string>& outFileTags);
69
74VRS_API void upgradeStreamTags(map<string, string>& streamTags);
75
84VRS_API void createStreamSerialNumbers(
85 const map<string, string>& inFileTags,
86 map<StreamId, StreamTags>& inOutStreamTags);
87
88} // namespace DescriptionRecord
89
90} // namespace vrs
Class to abstract VRS file system operations, to enable support for alternate storage methods,...
Definition FileHandler.h:75
The WriteFileHandler interface adds write operations to the FileHandler interface.
Definition WriteFileHandler.h:43
VRS_API void upgradeStreamTags(map< string, string > &streamTags)
Definition DescriptionRecord.cpp:353
@ kLegacyDescriptionFormatVersion
legacy description record format, json based.
Definition DescriptionRecord.h:38
@ kDescriptionFormatVersion
current description record format.
Definition DescriptionRecord.h:39
VRS_API void createStreamSerialNumbers(const map< string, string > &inFileTags, map< StreamId, StreamTags > &inOutStreamTags)
Definition DescriptionRecord.cpp:372
VRS_API int writeDescriptionRecord(WriteFileHandler &file, const map< StreamId, const StreamTags * > &streamTags, const map< string, string > &fileTags, uint32_t &outPreviousRecordSize)
Definition DescriptionRecord.cpp:272
VRS_API int readDescriptionRecord(FileHandler &file, uint32_t recordHeaderSize, uint32_t &outDescriptionRecordSize, map< StreamId, StreamTags > &outStreamTags, map< string, string > &outFileTags)
Definition DescriptionRecord.cpp:291
Definition Compressor.cpp:113