Commit ceb88a77 authored by Wim Taymans's avatar Wim Taymans
Browse files

Added audiosource base classes.

Original commit message from CVS:
Added audiosource base classes.
Ported alsasrc, still very basic.
parent a46a991d
2005-07-06 Wim Taymans <wim@fluendo.com>
* ext/alsa/Makefile.am:
* ext/alsa/gstalsaplugin.c: (plugin_init):
* ext/alsa/gstalsasink.c: (gst_alsasink_open):
* ext/alsa/gstalsasrc.c: (gst_alsasrc_get_type),
(gst_alsasrc_dispose), (gst_alsasrc_base_init),
(gst_alsasrc_class_init), (gst_alsasrc_init),
(gst_alsasrc_getcaps), (set_hwparams), (set_swparams),
(alsasrc_parse_spec), (gst_alsasrc_open), (gst_alsasrc_close),
(xrun_recovery), (gst_alsasrc_read), (gst_alsasrc_delay),
(gst_alsasrc_reset):
* ext/alsa/gstalsasrc.h:
* gst-libs/gst/audio/Makefile.am:
* gst-libs/gst/audio/gstaudiosink.c:
(gst_audioringbuffer_get_type), (gst_audioringbuffer_class_init),
(gst_audioringbuffer_start):
* gst-libs/gst/audio/gstaudiosrc.c: (gst_audioringbuffer_get_type),
(gst_audioringbuffer_class_init), (audioringbuffer_thread_func),
(gst_audioringbuffer_init), (gst_audioringbuffer_dispose),
(gst_audioringbuffer_finalize), (gst_audioringbuffer_acquire),
(gst_audioringbuffer_release), (gst_audioringbuffer_start),
(gst_audioringbuffer_stop), (gst_audioringbuffer_delay),
(gst_audiosrc_base_init), (gst_audiosrc_class_init),
(gst_audiosrc_init), (gst_audiosrc_create_ringbuffer):
* gst-libs/gst/audio/gstaudiosrc.h:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_baseaudiosink_class_init), (gst_baseaudiosink_dispose),
(gst_baseaudiosink_get_time), (gst_baseaudiosink_setcaps),
(gst_baseaudiosink_preroll), (gst_baseaudiosink_render):
* gst-libs/gst/audio/gstbaseaudiosrc.c:
(gst_baseaudiosrc_base_init), (gst_baseaudiosrc_class_init),
(gst_baseaudiosrc_init), (gst_baseaudiosrc_get_clock),
(gst_baseaudiosrc_get_time), (gst_baseaudiosrc_set_property),
(gst_baseaudiosrc_get_property), (gst_baseaudiosrc_fixate),
(gst_baseaudiosrc_setcaps), (gst_baseaudiosrc_get_times),
(gst_baseaudiosrc_event), (gst_baseaudiosrc_create),
(gst_baseaudiosrc_create_ringbuffer), (gst_baseaudiosrc_callback),
(gst_baseaudiosrc_change_state):
* gst-libs/gst/audio/gstbaseaudiosrc.h:
* gst-libs/gst/audio/gstringbuffer.c: (build_linear_format),
(gst_ringbuffer_debug_spec_caps), (gst_ringbuffer_debug_spec_buff),
(gst_ringbuffer_parse_caps), (gst_ringbuffer_start),
(gst_ringbuffer_pause), (gst_ringbuffer_stop),
(gst_ringbuffer_samples_done), (gst_ringbuffer_set_sample),
(wait_segment), (gst_ringbuffer_commit), (gst_ringbuffer_read),
(gst_ringbuffer_prepare_read), (gst_ringbuffer_advance):
* gst-libs/gst/audio/gstringbuffer.h:
Added audiosource base classes.
Ported alsasrc, still very basic.
2005-07-06 Wim Taymans <wim@fluendo.com>
 
* ext/theora/theoradec.c: (theora_dec_src_getcaps),
......
......@@ -3,7 +3,8 @@ plugin_LTLIBRARIES = libgstalsa.la
libgstalsa_la_SOURCES = \
gstalsaplugin.c \
gstalsasink.c
gstalsasink.c \
gstalsasrc.c
# port alsa stuff then add the _SOURCES above
EXTRA_DIST = \
......@@ -11,8 +12,7 @@ EXTRA_DIST = \
gstalsamixertrack.c \
gstalsamixeroptions.c \
gstalsa.c \
gstalsaclock.c \
gstalsasrc.c
gstalsaclock.c
libgstalsa_la_CFLAGS = $(GST_CFLAGS) $(ALSA_CFLAGS)
libgstalsa_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) \
......
......@@ -60,10 +60,10 @@ plugin_init (GstPlugin * plugin)
if (!gst_element_register (plugin, "alsamixer", GST_RANK_NONE,
GST_TYPE_ALSA_MIXER))
return FALSE;
if (!gst_element_register (plugin, "alsasrc", GST_RANK_NONE,
GST_TYPE_ALSA_SRC))
return FALSE;
*/
if (!gst_element_register (plugin, "alsasrc", GST_RANK_NONE,
GST_TYPE_ALSA_SRC))
return FALSE;
if (!gst_element_register (plugin, "alsasink", GST_RANK_NONE,
GST_TYPE_ALSA_SINK))
return FALSE;
......
This diff is collapsed.
/*
* Copyright (C) 2001 CodeFactory AB
* Copyright (C) 2001 Thomas Nyberg <thomas@codefactory.se>
* Copyright (C) 2001-2002 Andy Wingo <apwingo@eos.ncsu.edu>
* Copyright (C) 2003 Benjamin Otte <in7y118@public.uni-hamburg.de>
/* GStreamer
* Copyright (C) 2005 Wim Taymans <wim@fluendo.com>
*
* gstalsasrc.h:
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
......@@ -11,45 +10,62 @@
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_ALSA_SRC_H__
#define __GST_ALSA_SRC_H__
#include "gstalsamixer.h"
#ifndef __GST_ALSASRC_H__
#define __GST_ALSASRC_H__
#include <gst/gst.h>
#include <gst/audio/gstaudiosrc.h>
#include <alsa/asoundlib.h>
G_BEGIN_DECLS
#define GST_ALSA_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, GST_TYPE_ALSA_SRC, GstAlsaSrc))
#define GST_ALSA_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST(klass, GST_TYPE_ALSA_SRC, GstAlsaSrcClass))
#define GST_IS_ALSA_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE(obj, GST_TYPE_ALSA_SRC))
#define GST_IS_ALSA_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE(klass, GST_TYPE_ALSA_SRC))
#define GST_TYPE_ALSA_SRC (gst_alsa_src_get_type())
#define GST_TYPE_ALSA_SRC (gst_alsasrc_get_type())
#define GST_ALSA_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ALSA_SRC,GstAlsaSrc))
#define GST_ALSA_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ALSA_SRC,GstAlsaSrcClass))
#define GST_IS_ALSA_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ALSA_SRC))
#define GST_IS_ALSA_SRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ALSA_SRC))
typedef struct _GstAlsaSrc GstAlsaSrc;
typedef struct _GstAlsaSrcClass GstAlsaSrcClass;
struct _GstAlsaSrc {
GstAlsaMixer parent;
GstBuffer *buf[GST_ALSA_MAX_TRACKS];
snd_pcm_status_t *status;
GstClockTime base_time; /* FIXME: move this up ? already present in element ? */
GstAudioSrc src;
gchar *device;
snd_pcm_t *handle;
snd_pcm_hw_params_t *hwparams;
snd_pcm_sw_params_t *swparams;
snd_pcm_access_t access;
snd_pcm_format_t format;
guint rate;
guint channels;
gint bytes_per_sample;
guint buffer_time;
guint period_time;
snd_pcm_uframes_t buffer_size;
snd_pcm_uframes_t period_size;
};
struct _GstAlsaSrcClass {
GstAlsaMixerClass parent_class;
GstAudioSrcClass parent_class;
};
GType gst_alsa_src_get_type (void);
gboolean gst_alsa_src_factory_init (GstPlugin *plugin);
GType gst_alsasrc_get_type(void);
G_END_DECLS
#endif /* __GST_ALSA_SRC_H__ */
#endif /* __GST_ALSASRC_H__ */
......@@ -17,7 +17,9 @@ CLEANFILES = gstaudiofilterexample.c \
libgstaudio_@GST_MAJORMINOR@_la_SOURCES = audio.c gstaudioclock.c \
multichannel.c \
gstaudiosink.c \
gstaudiosrc.c \
gstbaseaudiosink.c \
gstbaseaudiosrc.c \
gstringbuffer.c
nodist_libgstaudio_@GST_MAJORMINOR@_la_SOURCES = $(built_sources) $(built_headers)
......@@ -27,7 +29,9 @@ libgstaudio_@GST_MAJORMINOR@include_HEADERS = \
gstaudioclock.h \
gstaudiofilter.h \
gstaudiosink.h \
gstaudiosrc.h \
gstbaseaudiosink.h \
gstbaseaudiosrc.h \
gstringbuffer.h \
multichannel.h
......
......@@ -73,12 +73,12 @@ static GstRingBufferClass *ring_parent_class = NULL;
static gboolean gst_audioringbuffer_acquire (GstRingBuffer * buf,
GstRingBufferSpec * spec);
static gboolean gst_audioringbuffer_release (GstRingBuffer * buf);
static gboolean gst_audioringbuffer_play (GstRingBuffer * buf);
static gboolean gst_audioringbuffer_start (GstRingBuffer * buf);
static gboolean gst_audioringbuffer_stop (GstRingBuffer * buf);
static guint gst_audioringbuffer_delay (GstRingBuffer * buf);
/* ringbuffer abstract base class */
GType
static GType
gst_audioringbuffer_get_type (void)
{
static GType ringbuffer_type = 0;
......@@ -98,7 +98,7 @@ gst_audioringbuffer_get_type (void)
};
ringbuffer_type =
g_type_register_static (GST_TYPE_RINGBUFFER, "GstAudioRingBuffer",
g_type_register_static (GST_TYPE_RINGBUFFER, "GstAudioSinkRingBuffer",
&ringbuffer_info, 0);
}
return ringbuffer_type;
......@@ -124,8 +124,8 @@ gst_audioringbuffer_class_init (GstAudioRingBufferClass * klass)
GST_DEBUG_FUNCPTR (gst_audioringbuffer_acquire);
gstringbuffer_class->release =
GST_DEBUG_FUNCPTR (gst_audioringbuffer_release);
gstringbuffer_class->play = GST_DEBUG_FUNCPTR (gst_audioringbuffer_play);
gstringbuffer_class->resume = GST_DEBUG_FUNCPTR (gst_audioringbuffer_play);
gstringbuffer_class->start = GST_DEBUG_FUNCPTR (gst_audioringbuffer_start);
gstringbuffer_class->resume = GST_DEBUG_FUNCPTR (gst_audioringbuffer_start);
gstringbuffer_class->stop = GST_DEBUG_FUNCPTR (gst_audioringbuffer_stop);
gstringbuffer_class->delay = GST_DEBUG_FUNCPTR (gst_audioringbuffer_delay);
......@@ -136,7 +136,7 @@ typedef guint (*WriteFunc) (GstAudioSink * sink, gpointer data, guint length);
/* this internal thread does nothing else but write samples to the audio device.
* It will write each segment in the ringbuffer and will update the play
* pointer.
* The play/stop methods control the thread.
* The start/stop methods control the thread.
*/
static void
audioringbuffer_thread_func (GstRingBuffer * buf)
......@@ -307,13 +307,13 @@ gst_audioringbuffer_release (GstRingBuffer * buf)
}
static gboolean
gst_audioringbuffer_play (GstRingBuffer * buf)
gst_audioringbuffer_start (GstRingBuffer * buf)
{
GstAudioSink *sink;
sink = GST_AUDIOSINK (GST_OBJECT_PARENT (buf));
GST_DEBUG ("play, sending signal");
GST_DEBUG ("start, sending signal");
GST_AUDIORINGBUFFER_SIGNAL (buf);
return TRUE;
......
/* GStreamer
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
* 2005 Wim Taymans <wim@fluendo.com>
*
* gstaudiosrc.c: simple audio src base class
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include <string.h>
#include "gstaudiosrc.h"
GST_DEBUG_CATEGORY_STATIC (gst_audiosrc_debug);
#define GST_CAT_DEFAULT gst_audiosrc_debug
#define GST_TYPE_AUDIORINGBUFFER \
(gst_audioringbuffer_get_type())
#define GST_AUDIORINGBUFFER(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUDIORINGBUFFER,GstAudioRingBuffer))
#define GST_AUDIORINGBUFFER_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUDIORINGBUFFER,GstAudioRingBufferClass))
#define GST_AUDIORINGBUFFER_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_AUDIORINGBUFFER, GstAudioRingBufferClass))
#define GST_IS_AUDIORINGBUFFER(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIORINGBUFFER))
#define GST_IS_AUDIORINGBUFFER_CLASS(obj)\
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIORINGBUFFER))
typedef struct _GstAudioRingBuffer GstAudioRingBuffer;
typedef struct _GstAudioRingBufferClass GstAudioRingBufferClass;
#define GST_AUDIORINGBUFFER_GET_COND(buf) (((GstAudioRingBuffer *)buf)->cond)
#define GST_AUDIORINGBUFFER_WAIT(buf) (g_cond_wait (GST_AUDIORINGBUFFER_GET_COND (buf), GST_GET_LOCK (buf)))
#define GST_AUDIORINGBUFFER_SIGNAL(buf) (g_cond_signal (GST_AUDIORINGBUFFER_GET_COND (buf)))
#define GST_AUDIORINGBUFFER_BROADCAST(buf)(g_cond_broadcast (GST_AUDIORINGBUFFER_GET_COND (buf)))
struct _GstAudioRingBuffer
{
GstRingBuffer object;
gboolean running;
gint queuedseg;
GCond *cond;
};
struct _GstAudioRingBufferClass
{
GstRingBufferClass parent_class;
};
static void gst_audioringbuffer_class_init (GstAudioRingBufferClass * klass);
static void gst_audioringbuffer_init (GstAudioRingBuffer * ringbuffer);
static void gst_audioringbuffer_dispose (GObject * object);
static void gst_audioringbuffer_finalize (GObject * object);
static GstRingBufferClass *ring_parent_class = NULL;
static gboolean gst_audioringbuffer_acquire (GstRingBuffer * buf,
GstRingBufferSpec * spec);
static gboolean gst_audioringbuffer_release (GstRingBuffer * buf);
static gboolean gst_audioringbuffer_start (GstRingBuffer * buf);
static gboolean gst_audioringbuffer_stop (GstRingBuffer * buf);
static guint gst_audioringbuffer_delay (GstRingBuffer * buf);
/* ringbuffer abstract base class */
static GType
gst_audioringbuffer_get_type (void)
{
static GType ringbuffer_type = 0;
if (!ringbuffer_type) {
static const GTypeInfo ringbuffer_info = {
sizeof (GstAudioRingBufferClass),
NULL,
NULL,
(GClassInitFunc) gst_audioringbuffer_class_init,
NULL,
NULL,
sizeof (GstAudioRingBuffer),
0,
(GInstanceInitFunc) gst_audioringbuffer_init,
NULL
};
ringbuffer_type =
g_type_register_static (GST_TYPE_RINGBUFFER, "GstAudioSrcRingBuffer",
&ringbuffer_info, 0);
}
return ringbuffer_type;
}
static void
gst_audioringbuffer_class_init (GstAudioRingBufferClass * klass)
{
GObjectClass *gobject_class;
GstObjectClass *gstobject_class;
GstRingBufferClass *gstringbuffer_class;
gobject_class = (GObjectClass *) klass;
gstobject_class = (GstObjectClass *) klass;
gstringbuffer_class = (GstRingBufferClass *) klass;
ring_parent_class = g_type_class_ref (GST_TYPE_RINGBUFFER);
gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_audioringbuffer_dispose);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_audioringbuffer_finalize);
gstringbuffer_class->acquire =
GST_DEBUG_FUNCPTR (gst_audioringbuffer_acquire);
gstringbuffer_class->release =
GST_DEBUG_FUNCPTR (gst_audioringbuffer_release);
gstringbuffer_class->start = GST_DEBUG_FUNCPTR (gst_audioringbuffer_start);
gstringbuffer_class->resume = GST_DEBUG_FUNCPTR (gst_audioringbuffer_start);
gstringbuffer_class->stop = GST_DEBUG_FUNCPTR (gst_audioringbuffer_stop);
gstringbuffer_class->delay = GST_DEBUG_FUNCPTR (gst_audioringbuffer_delay);
}
typedef guint (*ReadFunc) (GstAudioSrc * src, gpointer data, guint length);
/* this internal thread does nothing else but read samples from the audio device.
* It will read each segment in the ringbuffer and will update the play
* pointer.
* The start/stop methods control the thread.
*/
static void
audioringbuffer_thread_func (GstRingBuffer * buf)
{
GstAudioSrc *src;
GstAudioSrcClass *csrc;
GstAudioRingBuffer *abuf = GST_AUDIORINGBUFFER (buf);
ReadFunc readfunc;
src = GST_AUDIOSRC (GST_OBJECT_PARENT (buf));
csrc = GST_AUDIOSRC_GET_CLASS (src);
GST_DEBUG ("enter thread");
readfunc = csrc->read;
if (readfunc == NULL)
goto no_function;
while (TRUE) {
gint left, len;
guint8 *readptr;
gint readseg;
if (gst_ringbuffer_prepare_read (buf, &readseg, &readptr, &len)) {
gint read = 0;
left = len;
do {
GST_DEBUG ("transfer %d bytes to segment %d", left, readseg);
read = readfunc (src, readptr + read, left);
GST_DEBUG ("transfered %d bytes", read);
if (read < 0 || read > left) {
GST_WARNING ("error reading data (reason: %s), skipping segment\n",
strerror (errno));
break;
}
left -= read;
} while (left > 0);
/* we read one segment */
gst_ringbuffer_advance (buf, 1);
} else {
GST_LOCK (abuf);
if (!abuf->running)
goto stop_running;
GST_DEBUG ("signal wait");
GST_AUDIORINGBUFFER_SIGNAL (buf);
GST_DEBUG ("wait for action");
GST_AUDIORINGBUFFER_WAIT (buf);
GST_DEBUG ("got signal");
if (!abuf->running)
goto stop_running;
GST_DEBUG ("continue running");
GST_UNLOCK (abuf);
}
}
GST_DEBUG ("exit thread");
return;
/* ERROR */
no_function:
{
GST_DEBUG ("no write function, exit thread");
return;
}
stop_running:
{
GST_UNLOCK (abuf);
GST_DEBUG ("stop running, exit thread");
return;
}
}
static void
gst_audioringbuffer_init (GstAudioRingBuffer * ringbuffer)
{
ringbuffer->running = FALSE;
ringbuffer->queuedseg = 0;
ringbuffer->cond = g_cond_new ();
}
static void
gst_audioringbuffer_dispose (GObject * object)
{
G_OBJECT_CLASS (ring_parent_class)->dispose (object);
}
static void
gst_audioringbuffer_finalize (GObject * object)
{
G_OBJECT_CLASS (ring_parent_class)->finalize (object);
}
static gboolean
gst_audioringbuffer_acquire (GstRingBuffer * buf, GstRingBufferSpec * spec)
{
GstAudioSrc *src;
GstAudioSrcClass *csrc;
GstAudioRingBuffer *abuf;
gboolean result = FALSE;
src = GST_AUDIOSRC (GST_OBJECT_PARENT (buf));
csrc = GST_AUDIOSRC_GET_CLASS (src);
if (csrc->open)
result = csrc->open (src, spec);
if (!result)
goto could_not_open;
/* allocate one more segment as we need some headroom */
spec->segtotal++;
buf->data = gst_buffer_new_and_alloc (spec->segtotal * spec->segsize);
memset (GST_BUFFER_DATA (buf->data), 0, GST_BUFFER_SIZE (buf->data));
abuf = GST_AUDIORINGBUFFER (buf);
abuf->running = TRUE;
src->thread =
g_thread_create ((GThreadFunc) audioringbuffer_thread_func, buf, TRUE,
NULL);
GST_AUDIORINGBUFFER_WAIT (buf);
return result;
could_not_open:
{
return FALSE;
}
}
/* function is called with LOCK */
static gboolean
gst_audioringbuffer_release (GstRingBuffer * buf)
{
GstAudioSrc *src;
GstAudioSrcClass *csrc;
GstAudioRingBuffer *abuf;
gboolean result = FALSE;
src = GST_AUDIOSRC (GST_OBJECT_PARENT (buf));
csrc = GST_AUDIOSRC_GET_CLASS (src);
abuf = GST_AUDIORINGBUFFER (buf);
abuf->running = FALSE;
GST_AUDIORINGBUFFER_SIGNAL (buf);
GST_UNLOCK (buf);
/* join the thread */
g_thread_join (src->thread);
GST_LOCK (buf);
/* free the buffer */
gst_buffer_unref (buf->data);
buf->data = NULL;
if (csrc->close)
result = csrc->close (src);
return result;
}
static gboolean
gst_audioringbuffer_start (GstRingBuffer * buf)
{
GstAudioSrc *src;
src = GST_AUDIOSRC (GST_OBJECT_PARENT (buf));
GST_DEBUG ("start, sending signal");
GST_AUDIORINGBUFFER_SIGNAL (buf);
return TRUE;
}
static gboolean
gst_audioringbuffer_stop (GstRingBuffer * buf)
{
GstAudioSrc *src;
GstAudioSrcClass *csrc;
src = GST_AUDIOSRC (GST_OBJECT_PARENT (buf));
csrc = GST_AUDIOSRC_GET_CLASS (src);
/* unblock any pending writes to the audio device */
if (csrc->reset) {
GST_DEBUG ("reset...");
csrc->reset (src);
GST_DEBUG ("reset done");
}
GST_DEBUG ("stop, waiting...");
GST_AUDIORINGBUFFER_WAIT (buf);
GST_DEBUG ("stoped");
return TRUE;
}
static guint
gst_audioringbuffer_delay (GstRingBuffer * buf)
{
GstAudioSrc *src;
GstAudioSrcClass *csrc;
guint res = 0;
src = GST_AUDIOSRC (GST_OBJECT_PARENT (buf));
csrc = GST_AUDIOSRC_GET_CLASS (src);
if (csrc->delay)
res = csrc->delay (src);
return res;
}
/* AudioSrc signals and args */
enum
{
/* FILL ME */
LAST_SIGNAL
};
enum
{
ARG_0,
};
#define _do_init(bla) \