#include <clock.h>
Public Types | |
typedef sigc::slot< bool, const Glib::RefPtr<Clock> &, ClockTime, const Glib::RefPtr<ClockID >&> | SlotClock |
For example, bool on_clock(const Glib::RefPtr<Gst::Clock>& clock, ClockTime time, const Glib::RefPtr<Gst::ClockID>& id); The clock function return value is currently unused (see GstClockCallback). | |
Public Member Functions | |
void | reference () const |
void | unreference () const |
GstClockEntry* | gobj () |
Provides access to the underlying C instance. | |
const GstClockEntry* | gobj () const |
Provides access to the underlying C instance. | |
GstClockEntry* | gobj_copy () const |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
ClockTime | get_time () const |
Get the time of the clock ID. | |
ClockReturn | wait (ClockTimeDiff& jitter) |
Perform a blocking wait on id. | |
ClockReturn | wait () |
ClockReturn | wait_async (const SlotClock& slot) |
Register a slot on the given Gst::ClockID id with the given slot. | |
void | unschedule () |
Cancel an outstanding request with id. | |
Protected Member Functions | |
ClockID () | |
void | operator delete (void*, size_t) |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr<Gst::ClockID> | wrap (GstClockEntry* object, bool take_copy=false) |
A Glib::wrap() method for this object. |
typedef sigc::slot<bool, const Glib::RefPtr<Clock>&, ClockTime, const Glib::RefPtr<ClockID>&> Gst::ClockID::SlotClock |
For example, bool on_clock(const Glib::RefPtr<Gst::Clock>& clock, ClockTime time, const Glib::RefPtr<Gst::ClockID>& id); The clock function return value is currently unused (see GstClockCallback).
Gst::ClockID::ClockID | ( | ) | [protected] |
void Gst::ClockID::reference | ( | ) | const |
void Gst::ClockID::unreference | ( | ) | const |
GstClockEntry* Gst::ClockID::gobj | ( | ) |
Provides access to the underlying C instance.
const GstClockEntry* Gst::ClockID::gobj | ( | ) | const |
Provides access to the underlying C instance.
GstClockEntry* Gst::ClockID::gobj_copy | ( | ) | const |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
void Gst::ClockID::operator delete | ( | void * | , | |
size_t | ||||
) | [protected] |
ClockTime Gst::ClockID::get_time | ( | ) | const |
Get the time of the clock ID.
ClockReturn Gst::ClockID::wait | ( | ClockTimeDiff& | jitter | ) |
Perform a blocking wait on id.
id should have been created with new_single_shot_id() or new_periodic_id() and should not have been unscheduled with a call to gst_clock_id_unschedule().
If the jitter argument is not 0
and this function returns Gst::CLOCK_OK or Gst::CLOCK_EARLY, it will contain the difference against the clock and the time of id when this method was called. Positive values indicate how late id was relative to the clock (in which case this function will return Gst::CLOCK_EARLY). Negative values indicate how much time was spent waiting on the clock before this function returned.
jitter | A pointer that will contain the jitter, can be 0 . |
ClockReturn Gst::ClockID::wait | ( | ) |
ClockReturn Gst::ClockID::wait_async | ( | const SlotClock& | slot | ) |
Register a slot on the given Gst::ClockID id with the given slot.
When passing a Gst::ClockID with an invalid time to this function, the slot will be called immediatly with a time set to Gst::CLOCK_TIME_NONE. The slot will be called when the time of id has been reached.
slot | The slot to callback. |
void Gst::ClockID::unschedule | ( | ) |
Cancel an outstanding request with id.
This can either be an outstanding async notification or a pending sync notification. After this call, id cannot be used anymore to receive sync or async notifications, you need to create a new Gst::ClockID.
MT safe.
Glib::RefPtr<Gst::ClockID> wrap | ( | GstClockEntry * | object, | |
bool | take_copy = false | |||
) | [related] |
A Glib::wrap() method for this object.
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. |