gboolean synced;
};
+typedef struct
+{
+ GstClockEntry entry;
+ GWeakRef clock;
+} GstClockEntryImpl;
+
+#define GST_CLOCK_ENTRY_CLOCK_WEAK_REF(entry) (&((GstClockEntryImpl *)(entry))->clock)
+
/* seqlocks */
#define read_seqbegin(clock) \
g_atomic_int_get (&clock->priv->post_count);
{
GstClockEntry *entry;
- entry = g_slice_new (GstClockEntry);
+ entry = (GstClockEntry *) g_slice_new (GstClockEntryImpl);
/* FIXME: add tracer hook for struct allocations such as clock entries */
entry->_clock = clock;
#endif
#endif
- g_weak_ref_init (&entry->ABI.abi.clock, clock);
+ g_weak_ref_init (GST_CLOCK_ENTRY_CLOCK_WEAK_REF (entry), clock);
entry->type = type;
entry->time = time;
entry->interval = interval;
if (entry->destroy_data)
entry->destroy_data (entry->user_data);
- g_weak_ref_clear (&entry->ABI.abi.clock);
+ g_weak_ref_clear (GST_CLOCK_ENTRY_CLOCK_WEAK_REF (entry));
/* FIXME: add tracer hook for struct allocations such as clock entries */
- g_slice_free (GstClockEntry, id);
+ g_slice_free (GstClockEntryImpl, (GstClockEntryImpl *) id);
}
/**
entry = (GstClockEntry *) id;
requested = GST_CLOCK_ENTRY_TIME (entry);
- clock = g_weak_ref_get (&entry->ABI.abi.clock);
+ clock = g_weak_ref_get (GST_CLOCK_ENTRY_CLOCK_WEAK_REF (entry));
if (G_UNLIKELY (clock == NULL))
goto invalid_entry;
entry = (GstClockEntry *) id;
requested = GST_CLOCK_ENTRY_TIME (entry);
- clock = g_weak_ref_get (&entry->ABI.abi.clock);
+ clock = g_weak_ref_get (GST_CLOCK_ENTRY_CLOCK_WEAK_REF (entry));
if (G_UNLIKELY (clock == NULL))
goto invalid_entry;
g_return_if_fail (id != NULL);
entry = (GstClockEntry *) id;
- clock = g_weak_ref_get (&entry->ABI.abi.clock);
+ clock = g_weak_ref_get (GST_CLOCK_ENTRY_CLOCK_WEAK_REF (entry));
if (G_UNLIKELY (clock == NULL))
goto invalid_entry;
g_return_val_if_fail (id != NULL, NULL);
entry = (GstClockEntry *) id;
- return g_weak_ref_get (&entry->ABI.abi.clock);
+ return g_weak_ref_get (GST_CLOCK_ENTRY_CLOCK_WEAK_REF (entry));
}
/**
g_return_val_if_fail (clock != NULL, FALSE);
entry = (GstClockEntry *) id;
- entry_clock = g_weak_ref_get (&entry->ABI.abi.clock);
+ entry_clock = g_weak_ref_get (GST_CLOCK_ENTRY_CLOCK_WEAK_REF (entry));
if (entry_clock == clock)
ret = TRUE;