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

Class for reading media streams via gstreamer. More...

#include <gstreamplayer.h>

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

Public Member Functions

 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 Attributes

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...
 

Private Attributes

GstElement * media_source = nullptr
 Source element. Reads file or network. More...
 
GstElement * decoder = nullptr
 Autoplugger, which in turn wires up an audio decoder. More...
 

Additional Inherited Members

- 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...
 

Detailed Description

Class for reading media streams via gstreamer.

Constructor & Destructor Documentation

◆ GstreamerMediaReader()

Audio::GstreamerMediaReader::GstreamerMediaReader ( const std::string &  media_url,
int  timeout = 15 
)

Base abstract class for reading a media file or URL using gstreamer.

Parameters
media_urlThe filename or URL of the media.
timeoutThe timeout for reading the media stream, in seconds.
Here is the call graph for this function:

Member Data Documentation

◆ decoder

GstElement* Audio::GstreamerMediaReader::decoder = nullptr
private

Autoplugger, which in turn wires up an audio decoder.

◆ is_network

const bool Audio::GstreamerMediaReader::is_network = false
protected

True if media is network streaming.

◆ media_source

GstElement* Audio::GstreamerMediaReader::media_source = nullptr
private

Source element. Reads file or network.

◆ url

const std::string Audio::GstreamerMediaReader::url
protected

Media URL or filename.


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