Gnash  0.8.11dev
Static Public Member Functions | List of all members
gnash::media::gst::GstUtil Class Reference

Generalized Gstreamer utilities for pipeline configuration. More...

#include <GstUtil.h>

Static Public Member Functions

static GstElement * get_audiosink_element ()
 Returns a pointer to GstElement representing a user-configurable audio sink, or NULL if such a sink could not be created. More...
 
static bool check_missing_plugins (GstCaps *caps)
 Check for missing plugins and try to install them if necessary. More...
 

Detailed Description

Generalized Gstreamer utilities for pipeline configuration.

Warning
This class is not guaranteed to be thread-safe.

Member Function Documentation

§ check_missing_plugins()

bool gnash::media::gst::GstUtil::check_missing_plugins ( GstCaps *  caps)
static

Check for missing plugins and try to install them if necessary.

The installation, if applicable, will happen synchronously!

Parameters
capsIndicates the type of media to search for.
Returns
if there is a decoder available to decode the passed type, or if we succeeded in installing one, returns true. Otherwise, returns false.

References _, gnash::log_error(), and swfdec_gst_get_element_factory().

Referenced by gnash::media::gst::AudioDecoderGst::~AudioDecoderGst(), and gnash::media::gst::VideoDecoderGst::~VideoDecoderGst().

§ get_audiosink_element()

GstElement * gnash::media::gst::GstUtil::get_audiosink_element ( )
static

Returns a pointer to GstElement representing a user-configurable audio sink, or NULL if such a sink could not be created.

get_audiosink_element() tries the following strategies to get an audiosink:

  1. Looks into ~/.gnashrc for a pipeline description given by the property GSTAudioSink
  2. If none (or invalid) is found, tries "autoaudiosink"
  3. If autoaudiosink comes up blank, tries "gconfaudiosink"
  4. If gconfaudiosink can't produce a non-NULL element, the method returns NULL.

A pipeline description is specified in one of two ways in ~/.gnashrc:

  1. A "trivial" pipeline is simply the name of an element, like "fakesink"
  2. A "non-trivial" pipeline is a full sub-pipeline specification, given in a way that complies with the gst-launch manual page. The audiosink's sub-pipeline must accept x/raw-{int,float} data and feed it into a sink. The entire audiosink will be placed in a GstBin named "gnashrcsink" with a number based on the number of gnashrcsinks that have been allocated so far.

References _, gnash::RcInitFile::getDefaultInstance(), gnash::RcInitFile::getGstAudioSink(), gnash::log_debug(), gnash::log_error(), and gnash::key::o.


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