#include <indexreadtable_v201_v301.h>
|
void | create (IndexedFile *indexed_file) |
|
void | readIndexTable () |
|
void | free () |
|
std::string | getStreamName (uint16_t stream_id) const |
|
bool | streamExists (uint16_t stream_id) const |
| Checks either a stream exists or not. More...
|
|
const StreamInfoHeader * | getStreamInfo (uint16_t stream_id) const |
|
timestamp_t | getFirstTime (uint16_t stream_id) const |
|
timestamp_t | getLastTime (uint16_t stream_id) const |
|
const void * | getAdditionalStreamInfo (uint16_t stream_id) const |
|
int64_t | getItemCount (uint16_t stream_id) const |
|
void | adjustChunkHeader (ChunkHeader *header) |
|
void | fillChunkHeaderFromIndex (uint32_t master_idx, ChunkHeader *header, int64_t *chunk_index, int64_t *chunk_offset) |
|
int64_t | lookupChunkRef (uint16_t stream_id, int64_t pos, TimeFormat time_format, int64_t *chunk_index, int64_t *chunk_offset, int64_t *end_chunk_index, int64_t *master_index) const |
|
bool | findNearestEntryWithFlags (uint16_t stream_id, uint64_t chunk_index, uint16_t chunk_flags, uint64_t *master_index) |
|
bool | validateRawMasterIndex (int32_t ref_master_table_index) |
|
Class for storing an index table of an indexed file.
◆ adjustChunkHeader()
void ifhd::v201_v301::IndexReadTable::adjustChunkHeader |
( |
ChunkHeader * |
header | ) |
|
Adjusts the indices in the given chunk header
- Parameters
-
header | [inout] The header that should be adjusted |
◆ create()
void ifhd::v201_v301::IndexReadTable::create |
( |
IndexedFile * |
indexed_file | ) |
|
Allocates all neccessary resources.
- Parameters
-
indexed_file | [in] the indexed file from where the header is read from |
◆ fillChunkHeaderFromIndex()
void ifhd::v201_v301::IndexReadTable::fillChunkHeaderFromIndex |
( |
uint32_t |
master_idx, |
|
|
ChunkHeader * |
header, |
|
|
int64_t * |
chunk_index, |
|
|
int64_t * |
chunk_offset |
|
) |
| |
Filles a chunk header from a master index entry
- Parameters
-
master_idx | [in] The index of the entry. |
header | [out] The header that should be filled. |
chunk_index | [out] The index of the chunk. |
chunk_offset | [out] The file offset of the chunk. |
◆ findNearestEntryWithFlags()
bool ifhd::v201_v301::IndexReadTable::findNearestEntryWithFlags |
( |
uint16_t |
stream_id, |
|
|
uint64_t |
chunk_index, |
|
|
uint16_t |
chunk_flags, |
|
|
uint64_t * |
master_index |
|
) |
| |
Tries to find an entry before or at a given timestamp that has certain flags set.
- Parameters
-
[in] | stream_id | The stream id. |
[in] | chunk_index | The limiting chunk. |
[in] | chunk_flags | The flags to look for. |
[out] | master_index | The wil be set to the index in the master index table. |
- Returns
- Whether or not an entry was found.
◆ free()
void ifhd::v201_v301::IndexReadTable::free |
( |
| ) |
|
Frees all allocated resources.
◆ getAdditionalStreamInfo()
const void* ifhd::v201_v301::IndexReadTable::getAdditionalStreamInfo |
( |
uint16_t |
stream_id | ) |
const |
This function gets the additional stream information by its id.
- Parameters
-
stream_id | [in] the stream Id |
- Returns
- Additional stream information
◆ getFirstTime()
timestamp_t ifhd::v201_v301::IndexReadTable::getFirstTime |
( |
uint16_t |
stream_id | ) |
const |
This function gets the first time stamp of the given stream.
- Parameters
-
stream_id | [in] the stream Id |
- Returns
- timestamp_t
◆ getItemCount()
int64_t ifhd::v201_v301::IndexReadTable::getItemCount |
( |
uint16_t |
stream_id | ) |
const |
Returns the item count of a stream.
- Parameters
-
stream_id | [in] The stream id. |
- Returns
- The item count of the stream.
◆ getLastTime()
timestamp_t ifhd::v201_v301::IndexReadTable::getLastTime |
( |
uint16_t |
stream_id | ) |
const |
This function gets the last time stamp of the given stream.
- Parameters
-
stream_id | [in] the stream Id |
- Returns
- timestamp_t
◆ getStreamInfo()
const StreamInfoHeader* ifhd::v201_v301::IndexReadTable::getStreamInfo |
( |
uint16_t |
stream_id | ) |
const |
This function gets the information header of a stream by its id.
- Parameters
-
stream_id | [in] the stream Id |
- Returns
- Stream information header
◆ getStreamName()
std::string ifhd::v201_v301::IndexReadTable::getStreamName |
( |
uint16_t |
stream_id | ) |
const |
This function gets the name of a stream by its id.
- Parameters
-
stream_id | [in] the stream Id |
- Returns
- Stream name
◆ lookupChunkRef()
int64_t ifhd::v201_v301::IndexReadTable::lookupChunkRef |
( |
uint16_t |
stream_id, |
|
|
int64_t |
pos, |
|
|
TimeFormat |
time_format, |
|
|
int64_t * |
chunk_index, |
|
|
int64_t * |
chunk_offset, |
|
|
int64_t * |
end_chunk_index, |
|
|
int64_t * |
master_index |
|
) |
| const |
This function gets the chunk index of the given file position.
- Parameters
-
[in] | stream_id | the stream Id |
[in] | pos | the file position |
[in] | time_format | the format to look for (see IndexedFile::TF_*) |
[out] | chunk_index | the index of the chunk where the search should start. |
[out] | chunk_offset | the file offset of the chunk where the search should start. |
[out] | end_chunk_index | the nearest end chunkindex of pos |
[out] | master_index | the index of the nearest master index entry. |
- Returns
- Standard result
◆ readIndexTable()
void ifhd::v201_v301::IndexReadTable::readIndexTable |
( |
| ) |
|
Build stream index tables
◆ streamExists()
bool ifhd::v201_v301::IndexReadTable::streamExists |
( |
uint16_t |
stream_id | ) |
const |
Checks either a stream exists or not.
- Parameters
-
- Return values
-
true | exists |
false | does not exist |
◆ validateRawMasterIndex()
bool ifhd::v201_v301::IndexReadTable::validateRawMasterIndex |
( |
int32_t |
ref_master_table_index | ) |
|
Checks if the specified index is valid
- Parameters
-
[in] | ref_master_table_index | The index to be checked |
- Return values
-
ERR_NOERROR | Index is fine |
ERR_OUT_OF_RANGE | Index is not within the valid range. |
The documentation for this class was generated from the following file: