mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
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.
This commit is contained in:
parent
1798f52625
commit
2e2623748d
5 changed files with 36 additions and 3 deletions
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
|||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue