X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gst%2Fgstclock.h;h=de6faaa41ea0ceb26a4db9d788a38ec2d3e6845e;hb=066b515985897495cae32fca5b7eeeec260c40c9;hp=6272221127abdadbc77ad382dfc091972d4ab578;hpb=252327f87a420a4f019a5731c6a214809c9a12cc;p=platform%2Fupstream%2Fgstreamer.git diff --git a/gst/gstclock.h b/gst/gstclock.h index 6272221..de6faaa 100644 --- a/gst/gstclock.h +++ b/gst/gstclock.h @@ -35,9 +35,6 @@ G_BEGIN_DECLS #define GST_CLOCK_GET_CLASS(clock) (G_TYPE_INSTANCE_GET_CLASS ((clock), GST_TYPE_CLOCK, GstClockClass)) #define GST_CLOCK_CAST(clock) ((GstClock*)(clock)) -#define GST_CLOCK_SLAVE_LOCK(clock) g_mutex_lock (&GST_CLOCK_CAST (clock)->slave_lock) -#define GST_CLOCK_SLAVE_UNLOCK(clock) g_mutex_unlock (&GST_CLOCK_CAST (clock)->slave_lock) - /** * GstClockTime: * @@ -243,13 +240,6 @@ G_STMT_START { \ GST_CLOCK_TIME_IS_VALID (t) ? \ (guint) (((GstClockTime)(t)) % GST_SECOND) : 999999999 -/** - * GST_CLOCK_ENTRY_TRACE_NAME: - * - * The name used for tracing clock entry allocations. - */ -#define GST_CLOCK_ENTRY_TRACE_NAME "GstClockEntry" - typedef struct _GstClockEntry GstClockEntry; typedef struct _GstClock GstClock; typedef struct _GstClockClass GstClockClass; @@ -372,6 +362,7 @@ struct _GstClockEntry { gboolean unscheduled; gboolean woken_up; + /*< private >*/ gpointer _gst_reserved[GST_PADDING]; }; @@ -409,38 +400,6 @@ typedef enum { #define GST_CLOCK_FLAGS(clock) GST_OBJECT_FLAGS(clock) /** - * GST_CLOCK_GET_COND: - * @clock: the clock to query - * - * Gets the #GCond that gets signalled when the entries of the clock - * changed. - */ -#define GST_CLOCK_GET_COND(clock) (&GST_CLOCK_CAST(clock)->entries_changed) -/** - * GST_CLOCK_WAIT: - * @clock: the clock to wait on - * - * Wait on the clock until the entries changed. - */ -#define GST_CLOCK_WAIT(clock) g_cond_wait(GST_CLOCK_GET_COND(clock),GST_OBJECT_GET_LOCK(clock)) -/** - * GST_CLOCK_TIMED_WAIT: - * @clock: the clock to wait on - * @tv: a #GTimeVal to wait. - * - * Wait on the clock until the entries changed or the specified timeout - * occurred. - */ -#define GST_CLOCK_TIMED_WAIT(clock,tv) g_cond_timed_wait(GST_CLOCK_GET_COND(clock),GST_OBJECT_GET_LOCK(clock),tv) -/** - * GST_CLOCK_BROADCAST: - * @clock: the clock to broadcast - * - * Signal that the entries in the clock have changed. - */ -#define GST_CLOCK_BROADCAST(clock) g_cond_broadcast(GST_CLOCK_GET_COND(clock)) - -/** * GstClock: * * #GstClock base structure. The values of this structure are @@ -449,33 +408,6 @@ typedef enum { struct _GstClock { GstObject object; - GMutex slave_lock; /* order: SLAVE_LOCK, OBJECT_LOCK */ - - /*< protected >*/ /* with LOCK */ - GstClockTime internal_calibration; - GstClockTime external_calibration; - GstClockTime rate_numerator; - GstClockTime rate_denominator; - GstClockTime last_time; - GList *entries; - GCond entries_changed; - - /*< private >*/ /* with LOCK */ - GstClockTime resolution; - gboolean stats; - - /* for master/slave clocks */ - GstClock *master; - - /* with SLAVE_LOCK */ - gboolean filling; - gint window_size; - gint window_threshold; - gint time_index; - GstClockTime timeout; - GstClockTime *times; - GstClockID clockid; - /*< private >*/ GstClockPrivate *priv; @@ -539,6 +471,11 @@ void gst_clock_get_calibration (GstClock *clock, GstClo /* master/slave clocks */ gboolean gst_clock_set_master (GstClock *clock, GstClock *master); GstClock* gst_clock_get_master (GstClock *clock); + +void gst_clock_set_timeout (GstClock *clock, + GstClockTime timeout); +GstClockTime gst_clock_get_timeout (GstClock *clock); + gboolean gst_clock_add_observation (GstClock *clock, GstClockTime slave, GstClockTime master, gdouble *r_squared);