GstClock

Name

GstClock -- Clocking and synchronisation.

Synopsis


#include <gst/gst.h>


typedef     GstClockTime;
typedef     GstClockTimeDiff;
#define     GST_CLOCK_DIFF                  (s, e)
struct      GstClock;
void        gst_clock_reset                 (GstClock *clock);
GstClockReturn gst_clock_wait               (GstClock *clock,
                                             GstClockTime time);

Description

GstClock provides an easy way to synchonize against a global clock.

Details

GstClockTime

typedef guint64 	GstClockTime;


GstClockTimeDiff

typedef gint64 		GstClockTimeDiff;


GST_CLOCK_DIFF()

#define GST_CLOCK_DIFF(s, e) 	(GstClockTimeDiff)((s)-(e))

Calculate the difference between to timestamps. This does not create and absolute difference so the result might be negative if the first timestamp is less than the second timestamp.

s :first timestamp
e :second timestamp


struct GstClock

struct GstClock {
  GstObject 	 object;

  GstClockTime	 start_time;
  gdouble 	 speed;
  gboolean 	 active;

  GMutex	*active_mutex;
  GCond		*active_cond;
};


gst_clock_reset ()

void        gst_clock_reset                 (GstClock *clock);

clock : 


gst_clock_wait ()

GstClockReturn gst_clock_wait               (GstClock *clock,
                                             GstClockTime time);

clock : 
time : 
Returns :