#include <indexwritetable_v201_v301.h>
|
| void | create (timestamp_t index_delay=1000000) |
| |
| void | free () |
| |
| uint16_t | getMaxStreamId () const |
| |
| size_t | getItemCount (uint16_t stream_id) const |
| |
| uint64_t | getBufferSize (uint16_t stream_id) const |
| |
| void | copyToBuffer (uint16_t stream_id, void *buffer) const |
| |
| void | append (uint16_t stream_id, uint64_t stream_index, uint64_t chunk_index, uint64_t file_pos, uint32_t size, timestamp_t time_stamp, uint32_t flags) |
| |
| void | remove (uint64_t chunk_index, uint16_t stream_id) |
| |
| uint64_t | getIndexOffset (uint16_t stream_id) const |
| |
| uint64_t | getIndexTableOffset (uint16_t stream_id) const |
| |
| bool | requiresIndex (uint16_t stream_id, timestamp_t time_stamp, uint32_t flags, uint64_t file_pos) const |
| | Checks if the item needs an index entry based on normal rules.
|
| |
Class for storing an index table of an indexed file.
◆ append()
| void ifhd::v201_v301::IndexWriteTable::append |
( |
uint16_t | stream_id, |
|
|
uint64_t | stream_index, |
|
|
uint64_t | chunk_index, |
|
|
uint64_t | file_pos, |
|
|
uint32_t | size, |
|
|
timestamp_t | time_stamp, |
|
|
uint32_t | flags ) |
Appends a new item to the index table.
- Parameters
-
| stream_id | The stream id. |
| stream_index | The stream index. |
| chunk_index | The chunk index. |
| file_pos | The file position. |
| size | The size of the item. |
| time_stamp | The timestamp. |
| flags | append flags, see ChunkHeader |
◆ copyToBuffer()
| void ifhd::v201_v301::IndexWriteTable::copyToBuffer |
( |
uint16_t | stream_id, |
|
|
void * | buffer ) const |
Copys all stream data into a buffer. No buffer overflow checking is done!
- Parameters
-
| [in] | stream_id | the stream id. |
| [out] | buffer | The buffer that is to be filled. |
◆ create()
| void ifhd::v201_v301::IndexWriteTable::create |
( |
timestamp_t | index_delay = 1000000 | ) |
|
Allocates all neccessary resources.
- Parameters
-
| index_delay | The maximum delay between indices. |
◆ free()
| void ifhd::v201_v301::IndexWriteTable::free |
( |
| ) |
|
Frees all allocated resources.
◆ getBufferSize()
| uint64_t ifhd::v201_v301::IndexWriteTable::getBufferSize |
( |
uint16_t | stream_id | ) |
const |
Returns the buffer size of a stream.
- Parameters
-
- Returns
- The buffer size of the stream.
◆ getIndexOffset()
| uint64_t ifhd::v201_v301::IndexWriteTable::getIndexOffset |
( |
uint16_t | stream_id | ) |
const |
Returns the offset of the first stream index in the chunk headers fro the given stream.
- Parameters
-
- Returns
- the offset of the first stream index in the chunk headers fro the given stream.
◆ getIndexTableOffset()
| uint64_t ifhd::v201_v301::IndexWriteTable::getIndexTableOffset |
( |
uint16_t | stream_id | ) |
const |
Returns the offset of the stream table indices in the chunk header and master/stream references.
- Parameters
-
- Returns
- the offset of the stream table indices in the chunk header and master/stream references..
◆ getItemCount()
| size_t ifhd::v201_v301::IndexWriteTable::getItemCount |
( |
uint16_t | stream_id | ) |
const |
Returns the item count of a stream.
- Parameters
-
- Returns
- The item count of the stream.
◆ getMaxStreamId()
| uint16_t ifhd::v201_v301::IndexWriteTable::getMaxStreamId |
( |
| ) |
const |
Returns the biggest possible stream id.
- Returns
- The biggest possible stream id.
◆ remove()
| void ifhd::v201_v301::IndexWriteTable::remove |
( |
uint64_t | chunk_index, |
|
|
uint16_t | stream_id ) |
The method removes an index entry from the front of the tables.
- Parameters
-
| chunk_index | the chunk index |
| stream_id | the stream id |
◆ requiresIndex()
| bool ifhd::v201_v301::IndexWriteTable::requiresIndex |
( |
uint16_t | stream_id, |
|
|
timestamp_t | time_stamp, |
|
|
uint32_t | flags, |
|
|
uint64_t | file_pos ) const |
Checks if the item needs an index entry based on normal rules.
- Parameters
-
| stream_id | The stream id. |
| time_stamp | The timestamp. |
| flags | append flags, see ChunkHeader |
| file_pos | The file position - same as in append function. |
- Returns
- If the index is required.
The documentation for this class was generated from the following file: