diff options
author | David Schleef <ds@schleef.org> | 2012-07-02 17:32:14 -0700 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-07-03 09:09:14 +0200 |
commit | 963e6e33977ade5003c50a61e5520960b0ed7013 (patch) | |
tree | e01622c1edaffe3c35ec9cced3939a9af0f13ff3 /gst/inter | |
parent | e5c55ad554ebc80cea7ab0ba5c49d833c7189599 (diff) | |
download | gstreamer-plugins-bad-963e6e33977ade5003c50a61e5520960b0ed7013.tar.gz |
inter: Increase the inter audio surface buffering
Diffstat (limited to 'gst/inter')
-rw-r--r-- | gst/inter/gstinteraudiosink.c | 9 | ||||
-rw-r--r-- | gst/inter/gstinteraudiosrc.c | 6 |
2 files changed, 8 insertions, 7 deletions
diff --git a/gst/inter/gstinteraudiosink.c b/gst/inter/gstinteraudiosink.c index c4ddf7677..11ce1bfd8 100644 --- a/gst/inter/gstinteraudiosink.c +++ b/gst/inter/gstinteraudiosink.c @@ -332,10 +332,11 @@ gst_inter_audio_sink_render (GstBaseSink * sink, GstBuffer * buffer) g_mutex_lock (interaudiosink->surface->mutex); n = gst_adapter_available (interaudiosink->surface->audio_adapter) / 4; - if (n > (800 * 2 * 2)) { - GST_INFO ("flushing 800 samples"); - gst_adapter_flush (interaudiosink->surface->audio_adapter, 800 * 4); - n -= 800; +#define SIZE 1600 + if (n > (1600 * 3)) { + GST_WARNING ("flushing 800 samples"); + gst_adapter_flush (interaudiosink->surface->audio_adapter, (SIZE / 2) * 4); + n -= (SIZE / 2); } gst_adapter_push (interaudiosink->surface->audio_adapter, gst_buffer_ref (buffer)); diff --git a/gst/inter/gstinteraudiosrc.c b/gst/inter/gstinteraudiosrc.c index eccc748fa..3e64eefc9 100644 --- a/gst/inter/gstinteraudiosrc.c +++ b/gst/inter/gstinteraudiosrc.c @@ -393,8 +393,8 @@ gst_inter_audio_src_create (GstBaseSrc * src, guint64 offset, guint size, g_mutex_lock (interaudiosrc->surface->mutex); n = gst_adapter_available (interaudiosrc->surface->audio_adapter) / 4; - if (n > SIZE * 2) { - GST_DEBUG ("flushing %d samples", SIZE / 2); + if (n > SIZE * 3) { + GST_WARNING ("flushing %d samples", SIZE / 2); gst_adapter_flush (interaudiosrc->surface->audio_adapter, (SIZE / 2) * 4); n -= (SIZE / 2); } @@ -409,7 +409,7 @@ gst_inter_audio_src_create (GstBaseSrc * src, guint64 offset, guint size, if (n < SIZE) { GstBuffer *newbuf = gst_buffer_new_and_alloc (SIZE * 4); - GST_DEBUG ("creating %d samples of silence", SIZE - n); + GST_WARNING ("creating %d samples of silence", SIZE - n); memset (GST_BUFFER_DATA (newbuf) + n * 4, 0, SIZE * 4 - n * 4); if (buffer) { memcpy (GST_BUFFER_DATA (newbuf), GST_BUFFER_DATA (buffer), n * 4); |