17 vector<GStreamerDefinition> goutputs;
21 auto goutput_node = gopts->getOptionNode(
"gstreamer");
23 for (
auto goutput_item : goutput_node) {
24 goutputs.emplace_back(
25 gopts->get_variable_in_option<
string>(goutput_item,
"format",
goptions::NODFLT),
26 gopts->get_variable_in_option<
string>(goutput_item,
"filename",
goptions::NODFLT),
27 gopts->get_variable_in_option<
string>(goutput_item,
"type",
"event")
41 string help =
"Define a Output format and name\n";
42 help +=
"This option defines a GStreamer output. It can be used to write events or frame streams.\n";
44 help +=
"The file extension is added automatically based on the format.\n";
45 help +=
"Supported formats:\n";
48 help +=
"Output types\n";
50 help +=
" - event: write events\n";
51 help +=
" - stream: write frame stream\n";
53 help +=
"Example that defines two gstreamer outputs:\n";
54 help +=
"-gstreamer=\"[{format: root, filename: out}, {format: jlabsro, filename: out}}]\"\n";
58 "number of events kept in memory before flushing them to the filestream"), help);
63 {
"type",
"event",
"type of output file"},
static const std::vector< std::string > & supported_formats()
Return the list of supported output formats.
Shared constants and error codes for the gstreamer module.
#define DEFAULT_GSTREAMER_BUFFER_FLUSH_LIMIT
Default number of buffered events before a GStreamer flushes its internal event buffer.
Core streaming interface for gstreamer output plugins.
Option and configuration helpers for the gstreamer module.
constexpr const char * GSTREAMER_LOGGER
Logger category name used by gstreamer components.
vector< GStreamerDefinition > getGStreamerDefinition(const std::shared_ptr< GOptions > &gopts)
Parse gstreamer output definitions from options.
GOptions defineOptions()
Contribute gstreamer options to the global option set.