# Gst::AudioClock Class Reference

A Helper object for implementing audio clocks. More...

Inherits Gst::SystemClock.

Collaboration diagram for Gst::AudioClock:
[legend]

List of all members.

## Public Types

typedef sigc::slot < Gst::ClockTime, const Glib::RefPtr< Gst::Clock >& > | SlotGetTime
| For example, Gst::ClockTime on_get_time(const Glib::RefPtr<Gst::Clock>& clock);.

## Public Member Functions

virtual | ~AudioClock ()
GstAudioClock* | gobj ()
| Provides access to the underlying C GObject.
const GstAudioClock* | gobj () const
| Provides access to the underlying C GObject.
GstAudioClock* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

## Static Public Member Functions

static Glib::RefPtr< AudioClock > | create (const Glib::ustring& name, const SlotGetTime& time_slot)
| Create a new Gst::AudioClock instance.

## Protected Member Functions

| AudioClock (const Glib::ustring& name, const SlotGetTime& time_slot)

## Related Functions

(Note that these are not member functions.)
Glib::RefPtr< Gst::AudioClock > | wrap (GstAudioClock* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

A Helper object for implementing audio clocks.

Gst::AudioClock makes it easy for elements to implement a Gst::Clock, they simply need to provide a slot that returns the current clock time.

This object is internally used to implement the clock in Gst::BaseAudioSink.

Last reviewed on 2006-09-27 (0.10.12).

## Member Typedef Documentation

typedef sigc::slot< Gst::ClockTime, const Glib::RefPtr<Gst::Clock>& > Gst::AudioClock::SlotGetTime

For example, Gst::ClockTime on_get_time(const Glib::RefPtr<Gst::Clock>& clock);.

This function will be called whenever the current clock time needs to be calculated. If this function returns Gst::CLOCK_TIME_NONE, the last reported time will be returned by the clock.

Parameters:

  | clock | The Gst::AudioClock.

## Constructor & Destructor Documentation

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

Gst::AudioClock::AudioClock | ( | const Glib::ustring & | name,
|  | const SlotGetTime & | time_slot |
| ) |  |  | `[protected]`

## Member Function Documentation

static Glib::RefPtr<AudioClock> Gst::AudioClock::create | ( | const Glib::ustring & | name,
|  | const SlotGetTime & | time_slot |
| ) |  |  | `[static]`

Create a new Gst::AudioClock instance.

Whenever the clock time should be calculated it will call time_slot. When time_slot returns Gst::CLOCK_TIME_NONE, the clock will return the last reported time.

Parameters:

  | name | The name of the clock.
  | time_slot | A slot that returns the time.

Returns:
  a new Gst::AudioClock.

const GstAudioClock* Gst::AudioClock::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GObject.

Reimplemented from Gst::SystemClock.

GstAudioClock* Gst::AudioClock::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GObject.

Reimplemented from Gst::SystemClock.

GstAudioClock* Gst::AudioClock::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::SystemClock.

## Friends And Related Function Documentation

Glib::RefPtr< Gst::AudioClock > wrap | ( | GstAudioClock * | 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/audioclock.h