From 927f261b1c66892a497219675891255264d6b5d6 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 18 Jun 2012 11:36:25 +0200 Subject: [PATCH] basesink: wait_eos() -> wait() Rename gst_base_sink_wait_eos() to gst_base_sink_wait() to avoid confusion and introspection problems with the ::wait_eos vmethod. Also this method can be used to wait for other things than EOS. Update the docs a little. --- libs/gst/base/gstbasesink.c | 18 ++++++++++-------- libs/gst/base/gstbasesink.h | 2 +- win32/common/libgstbase.def | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c index aa571291a7..3fd88fda76 100644 --- a/libs/gst/base/gstbasesink.c +++ b/libs/gst/base/gstbasesink.c @@ -2200,19 +2200,21 @@ preroll_failed: } /** - * gst_base_sink_wait_eos: + * gst_base_sink_wait: * @sink: the sink * @time: the running_time to be reached * @jitter: (out) (allow-none): the jitter to be filled with time diff, or NULL * - * This function will block until @time is reached. It is usually called by - * subclasses that use their own internal synchronisation but want to let the - * EOS be handled by the base class. + * This function will wait for preroll to complete and will then block until @time + * is reached. It is usually called by subclasses that use their own internal + * synchronisation but want to let some synchronization (like EOS) be handled + * by the base class. * - * This function should only be called with the PREROLL_LOCK held, like when - * receiving an EOS event in the ::event vmethod. + * This function should only be called with the PREROLL_LOCK held (like when + * receiving an EOS event in the ::event vmethod or when handling buffers in + * ::render). * - * The @time argument should be the running_time of when the EOS should happen + * The @time argument should be the running_time of when the timeout should happen * and will be adjusted with any latency and offset configured in the sink. * * Returns: #GstFlowReturn @@ -2220,7 +2222,7 @@ preroll_failed: * Since: 0.10.15 */ GstFlowReturn -gst_base_sink_wait_eos (GstBaseSink * sink, GstClockTime time, +gst_base_sink_wait (GstBaseSink * sink, GstClockTime time, GstClockTimeDiff * jitter) { GstClockReturn status; diff --git a/libs/gst/base/gstbasesink.h b/libs/gst/base/gstbasesink.h index bf7a41fc2e..accce3ad1c 100644 --- a/libs/gst/base/gstbasesink.h +++ b/libs/gst/base/gstbasesink.h @@ -246,7 +246,7 @@ guint64 gst_base_sink_get_throttle_time (GstBaseSink *sink); GstClockReturn gst_base_sink_wait_clock (GstBaseSink *sink, GstClockTime time, GstClockTimeDiff * jitter); -GstFlowReturn gst_base_sink_wait_eos (GstBaseSink *sink, GstClockTime time, +GstFlowReturn gst_base_sink_wait (GstBaseSink *sink, GstClockTime time, GstClockTimeDiff *jitter); G_END_DECLS diff --git a/win32/common/libgstbase.def b/win32/common/libgstbase.def index 236c4a7f9c..8319104038 100644 --- a/win32/common/libgstbase.def +++ b/win32/common/libgstbase.def @@ -56,8 +56,8 @@ EXPORTS gst_base_sink_set_sync gst_base_sink_set_throttle_time gst_base_sink_set_ts_offset + gst_base_sink_wait gst_base_sink_wait_clock - gst_base_sink_wait_eos gst_base_sink_wait_preroll gst_base_src_get_blocksize gst_base_src_get_do_timestamp