#include <demultiplexer.h>
This one demultiplexes the streams of an ADTFDAT file (or any other adtf_file::Reader), and passes the stream items to Processor implementations.
◆ Demultiplexer()
Initializes the demultiplexer
- Parameters
-
| [in] | reader | The source reader. |
| [in] | processor_factories | Factories for processors, these are used by addProcessor. |
◆ addProcessor() [1/2]
| void adtfdat_processing::Demultiplexer::addProcessor |
( |
const std::string & | stream_name, |
|
|
const std::string & | processor_id, |
|
|
const std::string & | destination_url, |
|
|
const adtf_file::Configuration & | configuration ) |
Adds a processor for a given stream.
- Parameters
-
| [in] | stream_name | The name of the stream. |
| [in] | processor_id | The identifier of the processor implementation. |
| [in] | destination_url | The output URL. |
| [in] | configuration | The configuration of the processor. |
◆ addProcessor() [2/2]
| void adtfdat_processing::Demultiplexer::addProcessor |
( |
const std::string & | stream_name, |
|
|
const std::string & | substream_name, |
|
|
const std::string & | processor_id, |
|
|
const std::string & | destination_url, |
|
|
const adtf_file::Configuration & | configuration ) |
Adds a processor for a given substream.
- Parameters
-
| [in] | stream_name | The name of the stream. |
| [in] | substream_name | The name of the substream within stream. |
| [in] | processor_id | The identifier of the processor implementation. |
| [in] | destination_url | The output URL. |
| [in] | configuration | The configuration of the processor. |
◆ process()
| void adtfdat_processing::Demultiplexer::process |
( |
const std::function< bool(double)> & | progress_handler = {} | ) |
|
Processes all selected streams.
- Parameters
-
| [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. |
◆ setTimeRange()
| void adtfdat_processing::Demultiplexer::setTimeRange |
( |
const std::optional< std::chrono::nanoseconds > & | time_start, |
|
|
const std::optional< std::chrono::nanoseconds > & | time_end ) |
Set cut time range. Reset to 'no cutting' with '{}' or 'std::nullopt'. All samples with a timestamp dating before 'time_start' will be discarded while processing the file. All samples with a timestamp dating after 'time_end' will be discarded while processing the file.
- Parameters
-
| [in] | time_start | Time in nanoseconds [ns] = 10^-9 [s] |
| [in] | time_end | Time in nanoseconds [ns] = 10^-9 [s] |
The documentation for this class was generated from the following file: