gstreamermm: Gst::AudioSrc Class Reference

gstreamermm 0.10.11

- Main Page
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Related Functions
Gst::AudioSrc Class Reference
gstreamermm Base Classes

A simple base class for audio sources. More...

Inheritance diagram for Gst::AudioSrc:
[legend]
Collaboration diagram for Gst::AudioSrc:
[legend]

List of all members.

## Public Member Functions
virtual | ~AudioSrc ()
GstAudioSrc* | gobj ()
| Provides access to the underlying C GObject.
const GstAudioSrc* | gobj () const
| Provides access to the underlying C GObject.
GstAudioSrc* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
virtual bool | open_vfunc ()
| vfunc to open the device.
virtual bool | prepare_vfunc (Gst::RingBufferSpec& spec)
| vfunc to configure device with spec.
virtual bool | unprepare_vfunc ()
| vfunc to undo the configuration.
virtual bool | close_vfunc ()
| vfunc to close the device.
virtual guint | read_vfunc (const void* data, guint length)
| vfunc to read samples to the audio device.
virtual guint | get_delay_vfunc () const
| vfunc to get the number of samples queued in the device.
virtual void | reset_vfunc ()
| vfunc to unblock a read to the device and reset.
## Static Public Member Functions
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system.
## Related Functions
(Note that these are not member functions.)
Glib::RefPtr< Gst::AudioSrc > | wrap (GstAudioSrc* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

A simple base class for audio sources.

This is the most simple base class for audio sources that only requires subclasses to implement a set of simple virtual functions:

- open_vfunc() - Open the device.
- prepare_vfunc() - Configure the device with the specified format.
- read_vfunc() - Read samples from the device.
- reset_vfunc() - Unblock reads and flush the device.
- get_delay_vfunc() - Get the number of samples written but not yet played by the device.
- unprepare_vfunc() - Undo operations done by prepare.
- close_vfunc() - Close the device.

All scheduling of samples and timestamps is done in this base class together with Gst::BaseAudioSrc using a default implementation of a Gst::RingBuffer that uses threads.

Last reviewed on 2006-09-27 (0.10.12)

## Constructor & Destructor Documentation

virtual Gst::AudioSrc::~AudioSrc | ( |  | ) | `[virtual]`

## Member Function Documentation

virtual bool Gst::AudioSrc::close_vfunc | ( |  | ) | `[virtual]`

vfunc to close the device.

virtual guint Gst::AudioSrc::get_delay_vfunc | ( |  | ) | const`[virtual]`

vfunc to get the number of samples queued in the device.

static GType Gst::AudioSrc::get_type | ( |  | ) | `[static]`

Get the GType for this class, for use with the underlying GObject type system.

Reimplemented from Gst::BaseAudioSrc.

Reimplemented in Gst::AlsaSrc.

GstAudioSrc* Gst::AudioSrc::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GObject.

Reimplemented from Gst::BaseAudioSrc.

Reimplemented in Gst::AlsaSrc.

const GstAudioSrc* Gst::AudioSrc::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GObject.

Reimplemented from Gst::BaseAudioSrc.

Reimplemented in Gst::AlsaSrc.

GstAudioSrc* Gst::AudioSrc::gobj_copy | ( |  | ) |

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

Reimplemented from Gst::BaseAudioSrc.

Reimplemented in Gst::AlsaSrc.

virtual bool Gst::AudioSrc::open_vfunc | ( |  | ) | `[virtual]`

vfunc to open the device.

virtual bool Gst::AudioSrc::prepare_vfunc | ( | Gst::RingBufferSpec& | spec | ) | `[virtual]`

vfunc to configure device with spec.

virtual guint Gst::AudioSrc::read_vfunc | ( | const void * | data,
|  | guint | length
| ) |  | `[virtual]`

vfunc to read samples to the audio device.

virtual void Gst::AudioSrc::reset_vfunc | ( |  | ) | `[virtual]`

vfunc to unblock a read to the device and reset.

virtual bool Gst::AudioSrc::unprepare_vfunc | ( |  | ) | `[virtual]`

vfunc to undo the configuration.

## Friends And Related Function Documentation

Glib::RefPtr< Gst::AudioSrc > wrap | ( | GstAudioSrc * | object,
|  | bool | take_copy = `false`
| ) |  | `[related]`

A Glib::wrap() method for this object.

Parameters:

  object | The C instance.
  take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns:
  A C++ instance that wraps this C instance.

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

- gstreamermm/audiosrc.h