gstreamer
Loading...
Searching...
No Matches
GStreamerDefinition Struct Reference

Lightweight description of one configured gstreamer output. More...

#include <gstreamer_options.h>

Public Member Functions

 GStreamerDefinition ()=default
 Default constructor producing an empty definition.
 
 GStreamerDefinition (std::string f, std::string n, std::string t)
 Construct a definition from explicit field values.
 
 GStreamerDefinition (const GStreamerDefinition &other, int t)
 Construct a per-thread specialization from an existing definition.
 
std::string gstreamerPluginName () const
 Return the plugin library name expected by the dynamic loader.
 

Data Fields

std::string format
 Output format token used to select the plugin implementation.
 
std::string rootname
 Base output filename without extension, optionally specialized by thread id.
 
std::string type
 Semantic output type, typically "event" or "stream".
 
int tid = -1
 Worker thread id associated with this definition, or a negative value when not specialized.
 

Detailed Description

A streamer definition is the normalized representation of one object inside the -gstreamer option node. It captures:

  • the output format plugin selector
  • the output rootname base name
  • the semantic type of data to be written
  • the optional tid used to specialize filenames in multithreaded execution

The struct does not own any file or plugin resources. It is purely a value object used during configuration parsing and streamer instantiation.

Definition at line 39 of file gstreamer_options.h.

Constructor & Destructor Documentation

◆ GStreamerDefinition() [1/3]

GStreamerDefinition::GStreamerDefinition ( )
default

◆ GStreamerDefinition() [2/3]

GStreamerDefinition::GStreamerDefinition ( std::string f,
std::string n,
std::string t )
inline
Parameters
fOutput format token used to choose the plugin implementation.
nBase output filename without extension.
tSemantic output type such as "event" or "stream".

Definition at line 51 of file gstreamer_options.h.

◆ GStreamerDefinition() [3/3]

GStreamerDefinition::GStreamerDefinition ( const GStreamerDefinition & other,
int t )
inline

When t is non-negative, the constructor appends "_t<tid>" to the source rootname so that each worker thread naturally writes to a distinct output name. When t is negative, the original base name is preserved unchanged.

Parameters
otherSource definition to copy.
tWorker thread identifier. A negative value disables filename specialization.

Definition at line 65 of file gstreamer_options.h.

Member Function Documentation

◆ gstreamerPluginName()

std::string GStreamerDefinition::gstreamerPluginName ( ) const
inline

The naming convention used by this module is:

gstreamer_<format>_plugin
Returns
Plugin object name derived from the current format field.

Definition at line 94 of file gstreamer_options.h.

Field Documentation

◆ format

std::string GStreamerDefinition::format

Definition at line 73 of file gstreamer_options.h.

◆ rootname

std::string GStreamerDefinition::rootname

Definition at line 76 of file gstreamer_options.h.

◆ tid

int GStreamerDefinition::tid = -1

Definition at line 82 of file gstreamer_options.h.

◆ type

std::string GStreamerDefinition::type

Definition at line 79 of file gstreamer_options.h.


The documentation for this struct was generated from the following file: