ADTF File Library
Loading...
Searching...
No Matches
adtf3_sample_info.h
Go to the documentation of this file.
1
16
17#ifndef ADTF_FILE_ADTF3_SAMPLE_INFO
18#define ADTF_FILE_ADTF3_SAMPLE_INFO
19
22
23namespace adtf_file
24{
28namespace adtf3
29{
30
34enum class HashedValueType: uint8_t
35{
36 hvt_invalid = 0,
37 hvt_bool = 2,
38 hvt_int8 = 3,
39 hvt_uint8 = 4,
40 hvt_int16 = 5,
41 hvt_uint16 = 6,
42 hvt_int32 = 7,
43 hvt_uint32 = 8,
44 hvt_float32 = 9,
45 hvt_float64 = 10,
46 hvt_int64 = 12,
47 hvt_uint64 = 13
48};
49
50#pragma pack(push)
51#pragma pack(1)
55struct HashValueStorage //16 Byte per key value pair
56{
61 static uint8_t getVersion()
62 {
63 return 1;
64 }
65
68 byte_size(0),
69 type(HashedValueType::hvt_invalid)
70 {
71 }
75 uint8_t byte_size;
79 uint8_t reserved[1];
82 uint32_t key;
84 uint8_t storage[8]; // for accessing its important to have aligned value
86};
87#pragma pack(pop)
88
95bool hasSampleInfo(const WriteSample& sample);
96
102void serializeSampleInfo(const WriteSample& sample, OutputStream& stream);
103
110
111}
112}
113
114#endif
interface class for input streams
Definition adtf_file_reader.h:46
Interface class for an output stream.
Definition adtf_file_writer.h:39
Interface class for samples that are read from a Reader.
Definition sample.h:74
Interface class for samples that are written.
Definition sample.h:116
namespace for support of ADTF 3 files
Definition adtf3_media_description_deserializer.h:28
void deserializeSampleInfo(ReadSample &sample, InputStream &stream)
deserializes the sample info from stream as trailing data to the sample if hasSampleInfo returned wit...
void serializeSampleInfo(const WriteSample &sample, OutputStream &stream)
serializes the sample info as trailing data to the sample
HashedValueType
Value type identifier for sample info within adtf_file::ReadSample, adtf_file::WriteSample.
Definition adtf3_sample_info.h:35
bool hasSampleInfo(const WriteSample &sample)
Checks wether the sample has trailing sample information or not.
namespace for ADTF File library
Definition adtf2_adtf_core_media_sample_deserializer.h:25
Value Storage struct.
Definition adtf3_sample_info.h:56
uint8_t storage_version
the version of storage (we using 8 bit for versioning)
Definition adtf3_sample_info.h:73
uint32_t key
the hash key of the value (for accessing its important to have aligned value)
Definition adtf3_sample_info.h:82
uint8_t byte_size
byte size of value (we using 8 bit to restrict the value size)
Definition adtf3_sample_info.h:75
static uint8_t getVersion()
Get the Version.
Definition adtf3_sample_info.h:61
HashedValueType type
the value type
Definition adtf3_sample_info.h:77