gstaudioclock

gstaudioclock — Helper object for implementing audio clocks

Synopsis


#include <gst/audio/gstaudioclock.h>


            GstAudioClock;
GstClockTime (*GstAudioClockGetTimeFunc)    (GstClock *clock,
                                             gpointer user_data);
GstClock*   gst_audio_clock_new             (gchar *name,
                                             GstAudioClockGetTimeFunc func,
                                             gpointer user_data);

Object Hierarchy


  GObject
   +----GstObject
         +----GstClock
               +----GstSystemClock
                     +----GstAudioClock

Description

GstAudioClock makes it easy for elements to implement a GstClock, they simply need to provide a function that returns the current clock time.

This object is internally used to implement the clock in GstBaseAudioSink.

Last reviewed on 2006-09-27 (0.10.12)

Details

GstAudioClock

typedef struct _GstAudioClock GstAudioClock;

Opaque GstAudioClock.


GstAudioClockGetTimeFunc ()

GstClockTime (*GstAudioClockGetTimeFunc)    (GstClock *clock,
                                             gpointer user_data);

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.

clock :clock the GstAudioClock the GstAudioClock GstAudioClockGstAudioClockuser_data :user_data user data user data Returns :Returns the current time or GST_CLOCK_TIME_NONE if the previous time should be used. the current time or GST_CLOCK_TIME_NONE if the previous time should be used. GST_CLOCK_TIME_NONEGST_CLOCK_TIME_NONE
clock : the GstAudioClock
user_data : user data
Returns : the current time or GST_CLOCK_TIME_NONE if the previous time should be used.

gst_audio_clock_new ()

GstClock*   gst_audio_clock_new             (gchar *name,
                                             GstAudioClockGetTimeFunc func,
                                             gpointer user_data);

Create a new GstAudioClock instance. Whenever the clock time should be calculated it will call func with user_data. When func returns GST_CLOCK_TIME_NONE, the clock will return the last reported time.

name :name the name of the clock the name of the clock func :func a function a function user_data :user_data user data user data Returns :Returns a new GstAudioClock casted to a GstClock. a new GstAudioClock casted to a GstClock. GstAudioClockGstAudioClockGstClockGstClock
name : the name of the clock
func : a function
user_data : user data
Returns : a new GstAudioClock casted to a GstClock.

See Also

GstBaseAudioSink, GstSystemClock