Proxy Reader that merges all streams into a single stream with substreams.
More...
#include <streams_to_substreams_reader.h>
Proxy Reader that merges all streams into a single stream with substreams.
◆ getDescription()
| std::string adtfdat_processing::StreamsToSubstreamsReader::getDescription |
( |
| ) |
const |
|
overridevirtual |
◆ getExtensions()
| std::vector< adtf_file::Extension > adtfdat_processing::StreamsToSubstreamsReader::getExtensions |
( |
| ) |
const |
|
overridevirtual |
Get the Extensions if any.
- Returns
- std::vector<Extension> A vector of all available extensions.
Reimplemented from adtf_file::Reader.
◆ getFileVersion()
| uint32_t adtfdat_processing::StreamsToSubstreamsReader::getFileVersion |
( |
| ) |
const |
|
overridevirtual |
The file version with respect to ADTF DAT Format. When implementing a reader yourself
- use
ifhd::v201_v301::version_id if you do not explicitly create trigger items.
- use
ifhd::v500::version_id otherwise. - Returns
- the file format version.
Reimplemented from adtf_file::Reader.
◆ getItemCount()
| std::optional< uint64_t > adtfdat_processing::StreamsToSubstreamsReader::getItemCount |
( |
| ) |
const |
|
overridevirtual |
Get the Item Count. This gets the overall count of all items (samples, stream types and triggers) of all streams.
- Returns
- std::optional<uint64_t>
Reimplemented from adtf_file::Reader.
◆ getItemIndexForStreamItemIndex()
| uint64_t adtfdat_processing::StreamsToSubstreamsReader::getItemIndexForStreamItemIndex |
( |
uint16_t | stream_id, |
|
|
uint64_t | stream_item_index ) |
|
overridevirtual |
Find the index of the given stream item.
- Parameters
-
| [in] | stream_id | The stream id. |
| [in] | stream_item_index | The item index within the stream. |
- Returns
- The item index.
- Exceptions
-
| std::out_of_range | if given item_index is out of range |
| std::out_of_range | if given stream_id is out of range (must be at least 1) |
| std::runtime_error | if position was not found |
| any | other implementation dependent exceptions for the get call |
Implements adtf_file::SeekableReader.
◆ getItemIndexForTimeStamp()
| uint64_t adtfdat_processing::StreamsToSubstreamsReader::getItemIndexForTimeStamp |
( |
std::chrono::nanoseconds | time_stamp | ) |
|
|
overridevirtual |
Find the index of the first item that has a timestamp greator or equal to the one specified.
- Parameters
-
| [in] | time_stamp | The timestamp. |
- Returns
- The item index.
- Exceptions
-
| std::runtime_error | if position was not found |
| any | other implementation dependent exceptions for the get call |
Implements adtf_file::SeekableReader.
◆ getNextItem()
Returns the next item of the file and increase the item index to the next one. These can be samples, streamtypes or trigger.
- Returns
- The next item.
- Exceptions
-
| exceptions::EndOfFile | if end of file was reached |
| std::exception | based exception for any other implementation dependent case to identify error on getNextItem call |
Implements adtf_file::Reader.
◆ getProgress()
| std::optional< double > adtfdat_processing::StreamsToSubstreamsReader::getProgress |
( |
| ) |
const |
|
overridevirtual |
Get the Progress, a relative file position between 0.0 and 1.0.
- Returns
- std::optional<double> The relative value between 0.0 and 1.0 where internal file position is.
Reimplemented from adtf_file::Reader.
◆ getReaderIdentifier()
| std::string adtfdat_processing::StreamsToSubstreamsReader::getReaderIdentifier |
( |
| ) |
const |
|
overridevirtual |
Get the Reader Identifier of the Reader.
- Returns
- the reader identifier
Implements adtf_file::Reader.
◆ getStreams()
| std::vector< adtf_file::Stream > adtfdat_processing::StreamsToSubstreamsReader::getStreams |
( |
| ) |
const |
|
overridevirtual |
Get the Streams.
- Returns
- std::vector<Stream> A vector of all available streams.
Reimplemented from adtf_file::Reader.
◆ getStreamTypeBefore()
| std::shared_ptr< const adtf_file::StreamType > adtfdat_processing::StreamsToSubstreamsReader::getStreamTypeBefore |
( |
uint64_t | item_index, |
|
|
uint16_t | stream_id ) |
|
overridevirtual |
Returns the stream type that is valid
- Parameters
-
| [in] | item_index | The global index before which the stream type should be retrieved. |
| [in] | stream_id | The stream id for which the stream type should be retrieved. |
- Returns
- A shared pointer to the stream type.
- Exceptions
-
| std::out_of_range | if given item_index is out of range |
| std::out_of_range | if given stream_id is out of range (must be at least 1) |
| any | other implementation dependent exceptions for the get call |
Implements adtf_file::SeekableReader.
◆ open()
opens a file by the given filename. The given factories must be used to create samples and streamtypes for the getNextItem call
- Parameters
-
| filename | The file to open |
| sample_factory | The sample factory to create samples for the getNextItem call. |
| stream_type_factory | The stream type factory to create streamtype for the getNextItem call. |
- Exceptions
-
| std::exception | based exception for any other implementation dependent case to identify error on open call |
Implements adtf_file::Reader.
◆ seekTo()
| void adtfdat_processing::StreamsToSubstreamsReader::seekTo |
( |
uint64_t | item_index | ) |
|
|
overridevirtual |
Seek to the given index, such that getNextItem() will return the item corresponding to the index on the next call.
- Parameters
-
| [in] | item_index | The index to seek to. |
- Exceptions
-
| std::out_of_range | if given item_index is out of range (check for getItemCount()) |
| any | other implementation dependent exceptions for the seek call |
Implements adtf_file::SeekableReader.
The documentation for this class was generated from the following file: