pianod2
multisource multiuser scriptable networked music player
Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
Audio::GstreamerDoublePipeline Class Reference

Class for gstreamer pipelines that need sources wired to downstream elements dynamically when autoplugging. More...

#include <gstreamplayer.h>

Inheritance diagram for Audio::GstreamerDoublePipeline:
Inheritance graph
[legend]
Collaboration diagram for Audio::GstreamerDoublePipeline:
Collaboration graph
[legend]

Public Member Functions

 GstreamerDoublePipeline ()=default
 
virtual ~GstreamerDoublePipeline ()=default
 
- Public Member Functions inherited from Audio::GstreamerSimplePipeline
 GstreamerSimplePipeline ()
 
virtual ~GstreamerSimplePipeline ()
 

Protected Member Functions

void push (GstElement *item)
 Push an output element into the filter graph. More...
 
void pushSource (GstElement *item)
 Wire an element to the end of the source pipeline/filter graph. More...
 
- Protected Member Functions inherited from Audio::GstreamerSimplePipeline
void add (GstElement *element)
 
void throwDeferredException (const GstreamerAudioException &exception, bool asynchronously=false) const
 "Throw" an exception from an asyncrhonous player thread. More...
 
void throwAsyncException (const GstreamerAudioException &exception)
 
void push (GstElement *item)
 Wire an item to the pipeline/filter graph. More...
 
GstElement * createElement (const char *name, const std::string &overrides="")
 Create a gstreamer element and add it to the pipeline/bin, unwired. More...
 
GstState currentPipelineState () const
 Query the pipeline's current state. More...
 
void setPipelineState (GstState state)
 Set the pipeline's state. More...
 

Private Member Functions

void connectOutput (GstPad *pad)
 Handle the pad added signal by connecting the decoder to the output chain. More...
 

Static Private Member Functions

static void on_pad_added (GstElement *, GstPad *pad, gpointer instance)
 Callback function for pad-added signal. More...
 

Private Attributes

GstElement * input_pipeline_last = nullptr
 Last item pushed on the stream. More...
 
gulong signal_handler_id = 0
 

Additional Inherited Members

- Protected Attributes inherited from Audio::GstreamerSimplePipeline
GstElement * pipeline
 Filter graph for elements. More...
 
GstElement * chain_start = nullptr
 First item pushed on the stream after setup. More...
 
GstElement * pipeline_last = nullptr
 Last item pushed on the stream. More...
 
std::recursive_mutex state_mutex
 
std::unique_ptr< GstreamerAudioExceptionpipeline_exception
 Asynchronous exception. More...
 

Detailed Description

Class for gstreamer pipelines that need sources wired to downstream elements dynamically when autoplugging.

Constructor & Destructor Documentation

◆ GstreamerDoublePipeline()

Audio::GstreamerDoublePipeline::GstreamerDoublePipeline ( )
default

◆ ~GstreamerDoublePipeline()

virtual Audio::GstreamerDoublePipeline::~GstreamerDoublePipeline ( )
virtualdefault

Member Function Documentation

◆ connectOutput()

void Audio::GstreamerDoublePipeline::connectOutput ( GstPad *  pad)
private

Handle the pad added signal by connecting the decoder to the output chain.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_pad_added()

void Audio::GstreamerDoublePipeline::on_pad_added ( GstElement *  ,
GstPad *  pad,
gpointer  instance 
)
staticprivate

Callback function for pad-added signal.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ push()

void Audio::GstreamerDoublePipeline::push ( GstElement *  item)
protected

Push an output element into the filter graph.

The input elements are later wired to the output elements when the input elements trigger a pad-added signal, which is set up when the first output element is added.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pushSource()

void Audio::GstreamerDoublePipeline::pushSource ( GstElement *  item)
protected

Wire an element to the end of the source pipeline/filter graph.

Items are wired in the order they are pushed.

Parameters
itemThe item to insert into to the pipeline.
Exceptions
AudioExceptionif the item can't be linked.
Here is the caller graph for this function:

Member Data Documentation

◆ input_pipeline_last

GstElement* Audio::GstreamerDoublePipeline::input_pipeline_last = nullptr
private

Last item pushed on the stream.

◆ signal_handler_id

gulong Audio::GstreamerDoublePipeline::signal_handler_id = 0
private

The documentation for this class was generated from the following files: