19 #include <unordered_map>
38 void open(
const std::string& file_name,
39 std::shared_ptr<adtf_file::SampleFactory> sample_factory,
40 std::shared_ptr<adtf_file::StreamTypeFactory> stream_type_factory)
override;
42 std::vector<adtf_file::Stream>
getStreams()
const override;
62 std::shared_ptr<adtf_file::Reader>
addFile(
const std::string& file_name,
63 std::shared_ptr<adtf_file::SampleFactory> sample_factory,
64 std::shared_ptr<adtf_file::StreamTypeFactory> stream_type_factory);
72 std::unordered_map<std::string, uint16_t> _stream_ids;
76 std::shared_ptr<Reader> reader;
77 std::unordered_map<uint16_t, uint16_t> stream_ids;
81 auto item = reader->getNextItem();
82 item.
stream_id = stream_ids[item.stream_id];
86 std::vector<File> _files;
87 std::vector<adtf_file::Stream> _streams;
94 std::multimap<std::chrono::nanoseconds, QueueItem> _queue;
class to create or read a file item. This file item is either a sample, streamtype or trigger.
Definition: reader.h:156
uint16_t stream_id
stream id the file items belongs to
Definition: reader.h:159
Default Reader factory implementation for readers using a standard default CTOR.
Definition: reader.h:339
Abstract base class for a multi reader. To use this class you need to override MultiFileReader::getFa...
Definition: multi_file_reader.h:30
std::optional< double > getProgress() const override
Get the Progress, a relative file position between 0.0 and 1.0.
adtf_file::FileItem getNextItem() override
std::shared_ptr< adtf_file::Reader > addFile(const std::string &file_name, std::shared_ptr< adtf_file::SampleFactory > sample_factory, std::shared_ptr< adtf_file::StreamTypeFactory > stream_type_factory)
Adds a file to the multi file reader and opens the file if supported.
void open(const std::string &file_name, std::shared_ptr< adtf_file::SampleFactory > sample_factory, std::shared_ptr< adtf_file::StreamTypeFactory > stream_type_factory) override
opens a file by the given filename. The given factories must be used to create samples and streamtype...
std::vector< adtf_file::Stream > getStreams() const override
Get the Streams.
std::string getReaderIdentifier() const override
Get the Reader Identifier of the Reader.
void build()
Merges the streams.
virtual adtf_file::ReaderFactories getFactories() const
Get all supported reader factories of this multireader.
std::optional< uint64_t > getItemCount() const override
Get the Item Count. This gets the overall count of all items (samples, stream types and triggers) of ...
namespace for ADTF DAT Processing library.
Definition: ddl_helpers.h:38