gstreamer
Loading...
Searching...
No Matches
gstreamer core streaming API

Core abstractions and helper functions used by all streamer plugins. More...

Collaboration diagram for gstreamer core streaming API:

Files

file  gstreamer.h
 Core streaming interface and helper utilities for the gstreamer module.
 
file  gstreamerConventions.h
 Shared constants and error codes for the gstreamer module.
 

Data Structures

class  GStreamer
 Abstract base class for all gstreamer output plugins. More...
 

Functions

std::shared_ptr< const gstreamersMapgstreamer::gstreamersMapPtr (const std::shared_ptr< GOptions > &gopts, int thread_id=-1)
 Create a per-thread map of configured streamer instances.
 
std::shared_ptr< const gstreamersMapgstreamer::preloadGStreamerPlugins (const std::shared_ptr< GOptions > &gopts)
 Preload configured streamer plugins before worker threads are started.
 

Detailed Description

Function Documentation

◆ gstreamersMapPtr()

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

This helper parses all configured output definitions, specializes each one for the requested worker thread, dynamically loads the corresponding plugin, and stores the resulting streamer object in the returned map.

The helper intentionally does not open the backend connection. That step is left to the caller so applications can decide how to handle failures and when to start the output lifetime.

Parameters
goptsParsed options container supplying streamer definitions.
thread_idWorker thread id used to specialize output names. The default leaves names unchanged.
Returns
Shared pointer to a constant map from plugin object name to streamer instance.

Definition at line 607 of file gstreamer.h.

◆ preloadGStreamerPlugins()

std::shared_ptr< const gstreamersMap > gstreamer::preloadGStreamerPlugins ( const std::shared_ptr< GOptions > & gopts)
inline

Linux sanitizer builds can fail when a plugin with static TLS is first loaded from a worker thread. Keeping this map alive preserves the dlopen handles while later per-thread streamer instances are created.

Parameters
goptsParsed options container supplying streamer definitions.
Returns
Shared pointer that should be retained until threaded streaming is complete.

Definition at line 642 of file gstreamer.h.