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

Utility struct describing one configured output for the gstreamer module. 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 from explicit fields.
 
 GStreamerDefinition (const GStreamerDefinition &other, int t)
 Construct a per-thread variant of an existing definition.
 
std::string gstreamerPluginName () const
 Return the plugin library / object name used by the dynamic loader.
 

Data Fields

std::string format
 Output format token used to select a plugin.
 
std::string rootname
 Base filename (without extension), possibly specialized by thread id.
 
std::string type
 Semantic output type token (e.g. "event" or "stream").
 
int tid = -1
 Thread id used to specialize rootname; negative means "not specialized".
 

Detailed Description

A GStreamerDefinition is typically produced from a user option node and then specialized per-thread by appending a thread suffix to the base filename.

Members:

  • format : output format selector (e.g. "root", "ascii", "jlabsro", "csv").
  • rootname : user-provided base filename (without extension). A per-thread suffix may be appended.
  • type : semantic output type (e.g. "event" or "stream"). Plugins may use this to select which hooks are implemented.
  • tid : thread id used to specialize the filename; negative means "not thread specialized".

Definition at line 35 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.
nBase filename (without extension).
tOutput type token.

Definition at line 46 of file gstreamer_options.h.

◆ GStreamerDefinition() [3/3]

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

If t is non-negative, the constructor appends "_t<tid>" to rootname. If t is negative, the original rootname is preserved and tid remains negative.

Parameters
otherSource definition (usually shared across all threads).
tThread id. Use a negative value to disable filename specialization.

Definition at line 59 of file gstreamer_options.h.

Member Function Documentation

◆ gstreamerPluginName()

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

The convention is: "gstreamer_<format>_plugin".

Returns
The plugin name derived from format.

Definition at line 85 of file gstreamer_options.h.

Field Documentation

◆ format

std::string GStreamerDefinition::format

Definition at line 67 of file gstreamer_options.h.

◆ rootname

std::string GStreamerDefinition::rootname

Definition at line 70 of file gstreamer_options.h.

◆ tid

int GStreamerDefinition::tid = -1

Definition at line 76 of file gstreamer_options.h.

◆ type

std::string GStreamerDefinition::type

Definition at line 73 of file gstreamer_options.h.


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