adtf_file_library
0.13.1
|
#include <multiplexer.h>
Public Member Functions | |
Multiplexer (const std::string &destination_file_name, adtf_file::ADTFDatFileWriter::TargetADTFVersion target_adtf_version=adtf_file::ADTFDatFileWriter::TargetADTFVersion::adtf3ns, bool skip_stream_types_and_triggers=false) | |
void | addStream (const std::shared_ptr< adtf_file::Reader > reader, const std::string &stream_name, const std::string &destination_stream_name, const std::shared_ptr< adtf_file::SampleSerializer > serializer) |
void | addExtension (const std::string &name, const void *extension_data, size_t extension_size, uint32_t user_id=0, uint32_t type_id=0, uint32_t version_id=0) |
void | process (const std::function< bool(double)> &progress_handler) |
This can multiplex multiple streams from multiple readers into a single ADTFDAT file.
adtfdat_processing::Multiplexer::Multiplexer | ( | const std::string & | destination_file_name, |
adtf_file::ADTFDatFileWriter::TargetADTFVersion | target_adtf_version = adtf_file::ADTFDatFileWriter::TargetADTFVersion::adtf3ns , |
||
bool | skip_stream_types_and_triggers = false |
||
) |
Initiallizes the multiplexer.
[in] | destination_file_name | The output ADTFDAT filename. |
[in] | target_adtf_version | The target file version. |
[in] | skip_stream_types_and_triggers | Whether or not to pass on triggers and stream types to the writer. |
void adtfdat_processing::Multiplexer::addExtension | ( | const std::string & | name, |
const void * | extension_data, | ||
size_t | extension_size, | ||
uint32_t | user_id = 0 , |
||
uint32_t | type_id = 0 , |
||
uint32_t | version_id = 0 |
||
) |
Adds a new extension to the output
[in] | name | Name of the extension |
[in] | extension_data | The extension data. |
[in] | extension_size | The extension data size. |
[in] | user_id | The user id of the extension. |
[in] | type_id | The type id of the extension. |
[in] | version_id | The version id of the extension. |
void adtfdat_processing::Multiplexer::addStream | ( | const std::shared_ptr< adtf_file::Reader > | reader, |
const std::string & | stream_name, | ||
const std::string & | destination_stream_name, | ||
const std::shared_ptr< adtf_file::SampleSerializer > | serializer | ||
) |
Adds a new stream to the output.
[in] | reader | The reader that the stream belongs to. |
[in] | stream_name | The name of the stream. |
[in] | destination_stream_name | The name of the stream in the output file. |
[in] | serializer | The serializer that is used to serialize the samples. |
void adtfdat_processing::Multiplexer::process | ( | const std::function< bool(double)> & | progress_handler | ) |
Performs the generation of the multiplexed file.
[in,out] | progress_handler | A callback that is called for each prosessed stream item. The value passed to thes method is in the range [0.0, 1.0]. Processing will be canceled if this returns false. |