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

Base class for gstreamer pipelines, both readers and outputs. More...

#include <gstreamplayer.h>

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

Public Member Functions

 GstreamerReaderWithBus (const std::string &media_url, int timeout)
 
virtual ~GstreamerReaderWithBus ()
 
- Public Member Functions inherited from Audio::GstreamerMediaReader
 GstreamerMediaReader (const std::string &media_url, int timeout=15)
 Base abstract class for reading a media file or URL using gstreamer. More...
 
- Public Member Functions inherited from Audio::GstreamerDoublePipeline
 GstreamerDoublePipeline ()=default
 
virtual ~GstreamerDoublePipeline ()=default
 
- Public Member Functions inherited from Audio::GstreamerSimplePipeline
 GstreamerSimplePipeline ()
 
virtual ~GstreamerSimplePipeline ()
 

Protected Member Functions

virtual bool notification (GstMessage *message)
 
- Protected Member Functions inherited from Audio::GstreamerDoublePipeline
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

bool notificationReceived (GstMessage *message)
 Handle an event notification from the stream. More...
 

Static Private Member Functions

static gboolean on_bus_message (GstBus *bus, GstMessage *message, gpointer instance)
 

Additional Inherited Members

- Protected Attributes inherited from Audio::GstreamerMediaReader
const bool is_network = false
 True if media is network streaming. More...
 
const std::string url
 Media URL or filename. More...
 
- 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

Base class for gstreamer pipelines, both readers and outputs.

Constructor & Destructor Documentation

◆ GstreamerReaderWithBus()

Audio::GstreamerReaderWithBus::GstreamerReaderWithBus ( const std::string &  media_url,
int  timeout 
)

Wire up an event dispatch loop to the notifications bus.

Here is the call graph for this function:

◆ ~GstreamerReaderWithBus()

Audio::GstreamerReaderWithBus::~GstreamerReaderWithBus ( )
virtual

Member Function Documentation

◆ notification()

bool Audio::GstreamerReaderWithBus::notification ( GstMessage *  message)
protectedvirtual
Here is the caller graph for this function:

◆ notificationReceived()

bool Audio::GstreamerReaderWithBus::notificationReceived ( GstMessage *  message)
private

Handle an event notification from the stream.

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

◆ on_bus_message()

gboolean Audio::GstreamerReaderWithBus::on_bus_message ( GstBus *  bus,
GstMessage *  message,
gpointer  instance 
)
staticprivate
Here is the call graph for this function:
Here is the caller graph for this function:

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