diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-05-13 16:09:20 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-05-13 16:22:58 +0200 |
commit | 3d19b7514722a2ee0578f55f411fa5e6ac6d7050 (patch) | |
tree | 61272be4e2ffcef05b1a1473821c8669f76a919a /libs/gst/base/gstadapter.h | |
parent | 8ceff30ca9a7e5958355de93c8f2411893de383a (diff) |
adapter: add method to keep track of timestamps
Keep track of the timestamp and offset associated with the current head of the
adapter.
API: GstAdapter::gst_adapter_prev_timestamp()
Diffstat (limited to 'libs/gst/base/gstadapter.h')
-rw-r--r-- | libs/gst/base/gstadapter.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libs/gst/base/gstadapter.h b/libs/gst/base/gstadapter.h index 1b3416903..34fa395da 100644 --- a/libs/gst/base/gstadapter.h +++ b/libs/gst/base/gstadapter.h @@ -63,7 +63,13 @@ struct _GstAdapter { /* Remember where the end of our buffer list is to * speed up the push */ GSList *buflist_end; - gpointer _gst_reserved[GST_PADDING - 1]; + union { + struct { + GstClockTime timestamp; + guint64 distance; + } ABI; + gpointer _gst_reserved[GST_PADDING - 1]; + } abidata; }; struct _GstAdapterClass { @@ -88,6 +94,8 @@ GstBuffer* gst_adapter_take_buffer (GstAdapter *adapter, guint nbytes); guint gst_adapter_available (GstAdapter *adapter); guint gst_adapter_available_fast (GstAdapter *adapter); +GstClockTime gst_adapter_prev_timestamp (GstAdapter *adapter, guint64 *distance); + G_END_DECLS #endif /* __GST_ADAPTER_H__ */ |