Commit 2e262374 authored by Wim Taymans's avatar Wim Taymans
Browse files

gst-libs/gst/audio/: Fix compilation error.

Original commit message from CVS:
* gst-libs/gst/audio/gstaudiosink.c: (gst_audioringbuffer_init):
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_baseaudiosink_class_init), (gst_baseaudiosink_dispose),
(gst_baseaudiosink_change_state):
* gst-libs/gst/audio/gstbaseaudiosink.h:
* gst-libs/gst/audio/gstringbuffer.c:
(gst_ringbuffer_set_callback):
Fix compilation error.
Ringbuffer starts out as not running.
Free our clock in dispose.
When releasing the ringbuffer we need to renegotiate so
clear the pad caps.
parent 1798f526
2005-06-29 Wim Taymans <wim@fluendo.com>
* gst-libs/gst/audio/gstaudiosink.c: (gst_audioringbuffer_init):
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_baseaudiosink_class_init), (gst_baseaudiosink_dispose),
(gst_baseaudiosink_change_state):
* gst-libs/gst/audio/gstbaseaudiosink.h:
* gst-libs/gst/audio/gstringbuffer.c:
(gst_ringbuffer_set_callback):
Fix compilation error.
Ringbuffer starts out as not running.
Free our clock in dispose.
When releasing the ringbuffer we need to renegotiate so
clear the pad caps.
2005-06-29 Thomas Vander Stichele <thomas at apestaart dot org>
 
* autogen.sh:
......
......@@ -217,7 +217,7 @@ stop_running:
static void
gst_audioringbuffer_init (GstAudioRingBuffer * ringbuffer)
{
ringbuffer->running = TRUE;
ringbuffer->running = FALSE;
ringbuffer->queuedseg = 0;
ringbuffer->cond = g_cond_new ();
......
......@@ -49,6 +49,8 @@ enum
GST_BOILERPLATE_FULL (GstBaseAudioSink, gst_baseaudiosink, GstBaseSink,
GST_TYPE_BASESINK, _do_init);
static void gst_baseaudiosink_dispose (GObject * object);
static void gst_baseaudiosink_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
static void gst_baseaudiosink_get_property (GObject * object, guint prop_id,
......@@ -92,6 +94,7 @@ gst_baseaudiosink_class_init (GstBaseAudioSinkClass * klass)
GST_DEBUG_FUNCPTR (gst_baseaudiosink_set_property);
gobject_class->get_property =
GST_DEBUG_FUNCPTR (gst_baseaudiosink_get_property);
gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_baseaudiosink_dispose);
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_BUFFER_TIME,
g_param_spec_int64 ("buffer-time", "Buffer Time",
......@@ -124,6 +127,20 @@ gst_baseaudiosink_init (GstBaseAudioSink * baseaudiosink)
(GstAudioClockGetTimeFunc) gst_baseaudiosink_get_time, baseaudiosink);
}
static void
gst_baseaudiosink_dispose (GObject * object)
{
GstBaseAudioSink *sink;
sink = GST_BASEAUDIOSINK (object);
if (sink->clock)
gst_object_unref (sink->clock);
sink->clock = NULL;
G_OBJECT_CLASS (parent_class)->dispose (object);
}
static GstClock *
gst_baseaudiosink_get_clock (GstElement * elem)
{
......@@ -557,6 +574,7 @@ gst_baseaudiosink_change_state (GstElement * element)
gst_ringbuffer_release (sink->ringbuffer);
gst_object_unref (sink->ringbuffer);
sink->ringbuffer = NULL;
gst_pad_set_caps (GST_BASESINK_PAD (sink), NULL);
break;
case GST_STATE_READY_TO_NULL:
break;
......
......@@ -64,7 +64,7 @@ G_BEGIN_DECLS
#define GST_IS_BASEAUDIOSINK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_BASEAUDIOSINK))
#define GST_BASEAUDIOSINK_CLOCK(obj) (GST_BASEAUDIOSINK (obj)->clock)
#define GST_BASEAUDIOSINK_PAD(obj) (GST_BASEAUDIOSINK (obj)->sinkpad)
#define GST_BASEAUDIOSINK_PAD(obj) (GST_BASESINK (obj)->sinkpad)
typedef struct _GstBaseAudioSink GstBaseAudioSink;
typedef struct _GstBaseAudioSinkClass GstBaseAudioSinkClass;
......
......@@ -125,7 +125,7 @@ gst_ringbuffer_set_callback (GstRingBuffer * buf, GstRingBufferCallback cb,
GST_LOCK (buf);
buf->callback = cb;
buf->cb_data = data;
buf->cb_data = user_data;
GST_UNLOCK (buf);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment