gstreamer
Loading...
Searching...
No Matches
gstreamer Namespace Reference

Typedefs

using gstreamersMap = std::unordered_map<std::string, std::shared_ptr<GStreamer>>
 

Functions

std::shared_ptr< const gstreamersMapgstreamersMapPtr (const std::shared_ptr< GOptions > &gopts, int thread_id)
 Create a per-thread map of streamer instances based on configured outputs.
 
vector< GStreamerDefinitiongetGStreamerDefinition (const std::shared_ptr< GOptions > &gopts)
 Parse gstreamer output definitions from options.
 
GOptions defineOptions ()
 Contribute gstreamer options to the global option set.
 

Typedef Documentation

◆ gstreamersMap

using gstreamer::gstreamersMap = std::unordered_map<std::string, std::shared_ptr<GStreamer>>

Definition at line 437 of file gstreamer.h.

Function Documentation

◆ defineOptions()

GOptions gstreamer::defineOptions ( )

The returned GOptions aggregates:

  • gstreamer options (buffer settings and output definitions)
  • options from dependent modules (e.g. gdynamicdigitization)
Returns
A fully populated GOptions instance for this module.

Definition at line 38 of file gstreamer_options.cc.

◆ getGStreamerDefinition()

std::vector< GStreamerDefinition > gstreamer::getGStreamerDefinition ( const std::shared_ptr< GOptions > & gopts)

This reads the "gstreamer" option node and creates a list of GStreamerDefinition objects. Each entry is expected to contain:

  • format : plugin format token.
  • filename : base output filename (without extension).
  • type : output type token (defaults to "event" when omitted).
Parameters
goptsOptions container.
Returns
Vector of configured output definitions.

Definition at line 16 of file gstreamer_options.cc.

◆ gstreamersMapPtr()

std::shared_ptr< const gstreamersMap > gstreamer::gstreamersMapPtr ( const std::shared_ptr< GOptions > & gopts,
int thread_id )
inline

This helper is intended to run inside a worker thread. It:

  • Parses the configured gstreamer outputs from options.
  • Specializes each output definition with thread_id (appends "_t<id>" to the base filename).
  • Dynamically loads the corresponding plugin and registers the object.
  • Stores each streamer in the returned map and configures it with define_gstreamer().

Note:

  • The returned map is owned by the caller via a shared pointer.
  • Opening connections is intentionally left to the caller (to keep API flexibility).
Parameters
goptsOptions container.
thread_idWorker thread id used to specialize output names.
Returns
Shared pointer to a map from plugin name to streamer instance.

Definition at line 456 of file gstreamer.h.