From d1c3b073991ddbd77338bbb83cd05881f2fc9255 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Wed, 28 Sep 2005 13:18:11 +0000 Subject: [PATCH] gst/sine/gstsinesrc.c (gst_sinesrc_unlock): Actually implement unlocking. Original commit message from CVS: 2005-09-28 Andy Wingo * gst/sine/gstsinesrc.c (gst_sinesrc_unlock): Actually implement unlocking. --- ChangeLog | 3 +++ gst/sine/gstsinesrc.c | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/ChangeLog b/ChangeLog index c8cc438..ecd6b9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2005-09-28 Andy Wingo + * gst/sine/gstsinesrc.c (gst_sinesrc_unlock): Actually implement + unlocking. + * gst/tcp/gsttcpclientsink.c (gst_tcpclientsink_base_init): Actually add the pad template. (gst_tcpclientsink_get_type): We're a base sink. Woot, works. diff --git a/gst/sine/gstsinesrc.c b/gst/sine/gstsinesrc.c index 7969c60..4a76837 100644 --- a/gst/sine/gstsinesrc.c +++ b/gst/sine/gstsinesrc.c @@ -71,6 +71,7 @@ static void gst_sinesrc_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gst_sinesrc_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); +static gboolean gst_sinesrc_unlock (GstBaseSrc * bsrc); static gboolean gst_sinesrc_setcaps (GstBaseSrc * basesrc, GstCaps * caps); static void gst_sinesrc_src_fixate (GstPad * pad, GstCaps * caps); @@ -128,6 +129,7 @@ gst_sinesrc_class_init (GstSineSrcClass * klass) gstbasesrc_class->set_caps = GST_DEBUG_FUNCPTR (gst_sinesrc_setcaps); gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_sinesrc_start); gstbasesrc_class->create = GST_DEBUG_FUNCPTR (gst_sinesrc_create); + gstbasesrc_class->unlock = GST_DEBUG_FUNCPTR (gst_sinesrc_unlock); } static void @@ -256,6 +258,19 @@ gst_sinesrc_wait (GstSineSrc * src, GstClockTime time) return ret; } +static gboolean +gst_sinesrc_unlock (GstBaseSrc * bsrc) +{ + GstSineSrc *src = GST_SINESRC (bsrc); + + GST_LOCK (src); + if (src->clock_id) + gst_clock_id_unschedule (src->clock_id); + GST_UNLOCK (src); + + return TRUE; +} + static GstFlowReturn gst_sinesrc_create (GstBaseSrc * basesrc, guint64 offset, guint length, GstBuffer ** buffer) -- 2.7.4