46 void open(
const std::string& file_name,
47 std::shared_ptr<adtf_file::SampleFactory> sample_factory,
48 std::shared_ptr<adtf_file::StreamTypeFactory> stream_type_factory)
override;
52 std::vector<adtf_file::Stream>
getStreams()
const override;
60 std::shared_ptr<const adtf_file::StreamType>
getStreamTypeBefore(uint64_t item_index, uint16_t stream_id)
override;
61 void seekTo(uint64_t item_index)
override;
64 void setupReader(
const std::string& file_name,
65 const std::shared_ptr<adtf_file::SampleFactory>& sample_factory,
66 const std::shared_ptr<adtf_file::StreamTypeFactory>& stream_type_factory);
67 void resetTimestampTracking();
71 void sanitizeFinalBlock();
74 const std::shared_ptr<const adtf_file::Sample>& sample,
75 std::chrono::nanoseconds timestamp);
76 void setFileItemTimestamp(
adtf_file::FileItem& file_item, std::chrono::nanoseconds timestamp);
78 std::shared_ptr<adtf_file::SampleFactory> _sample_factory{};
79 std::shared_ptr<Reader> _reader{};
80 std::vector<adtf_file::Stream> _streams{};
82 std::optional<std::chrono::nanoseconds> _lower_timestamp_bound{};
83 std::deque<adtf_file::FileItem> _item_queue;
class to create or read a file item. This file item is either a sample, streamtype or trigger.
Definition reader.h:172
Default Reader factory implementation for readers using a standard default CTOR.
Definition reader.h:367
Interface for seekable Reader, where the file position can be adapted.
Definition reader.h:288
SampleTimestampSanitizerReader()
CTOR.
std::vector< adtf_file::Stream > getStreams() const override
Get the Streams.
std::string getReaderIdentifier() const override
Get the Reader Identifier of the Reader.
uint32_t getFileVersion() const override
uint64_t getItemIndexForTimeStamp(std::chrono::nanoseconds time_stamp) override
std::shared_ptr< const adtf_file::StreamType > getStreamTypeBefore(uint64_t item_index, uint16_t stream_id) override
adtf_file::FileItem getNextItem() override
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 ...
void seekTo(uint64_t item_index) override
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::string getDescription() const override
uint64_t getItemIndexForStreamItemIndex(uint16_t stream_id, uint64_t stream_item_index) override
std::vector< adtf_file::Extension > getExtensions() const override
Get the Extensions if any.
std::optional< double > getProgress() const override
Get the Progress, a relative file position between 0.0 and 1.0.
namespace for ADTF DAT Processing library.
Definition ddl_helpers.h:38
adtf_file::ReaderFactoryImplementation< SampleTimestampSanitizerReader > SampleTimestampSanitizerReaderFactory
Default reader factory implementation for the SampleTimestampSanitizerReader.
Definition sample_timestamp_sanitizer_reader.h:89