17 vector<GStreamerDefinition> goutputs;
24 auto goutput_node = gopts->getOptionNode(
"gstreamer");
26 for (
auto goutput_item : goutput_node) {
27 goutputs.emplace_back(
28 gopts->get_variable_in_option<
string>(goutput_item,
"format",
goptions::NODFLT),
29 gopts->get_variable_in_option<
string>(goutput_item,
"filename",
goptions::NODFLT),
30 gopts->get_variable_in_option<
string>(goutput_item,
"type",
"event")
46 string help =
"Define output formats and filenames. It can be used to select <events> or <frame> streams.\n";
47 help +=
"The file extension is added automatically based on the format.\n \n";
48 help +=
"\nSupported formats:\n \n";
51 help +=
"Output types:\n \n";
53 help +=
" - event: write events\n";
54 help +=
" - stream: write frame time snapshots\n";
56 help +=
"Example that defines two gstreamer outputs:\n \n";
57 help +=
" -gstreamer=\"[{format: root, filename: out}, {format: csv, filename: out}]\"\n";
59 help +=
"The produced files structure depends on the accumulation method used: \n \n";
60 help +=
" - event-based digitization (like <flux>) will have one file for every thread, with \"_tj\" appended to the filename \n";
61 help +=
" - run-based digitization (like <dosimeter>) will have one file only\n";
67 "number of events kept in memory before flushing them to the filestream"), help);
73 {
"type",
"event",
"type of output file"},
static const std::vector< std::string > & supported_formats()
Return the list of output format tokens supported by the module.
vector< GStreamerDefinition > getGStreamerDefinition(const std::shared_ptr< GOptions > &gopts)
Parse all configured gstreamer output definitions from the options container.
GOptions defineOptions()
Define the options contributed by the gstreamer module.
Shared constants and error codes for the gstreamer module.
#define DEFAULT_GSTREAMER_BUFFER_FLUSH_LIMIT
Default number of buffered events before a GStreamer instance flushes its internal buffer.
Core streaming interface and helper utilities for the gstreamer module.
Option and configuration helpers for the gstreamer module.
constexpr const char * GSTREAMER_LOGGER
Logger category name used by gstreamer components.