[clutter-gst/broken/pbo-upload: 7/7] sink: add a new buffer is the list is empty
- From: Damien Lespiau <dlespiau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter-gst/broken/pbo-upload: 7/7] sink: add a new buffer is the list is empty
- Date: Thu, 27 Oct 2011 14:13:19 +0000 (UTC)
commit a473ac59a67007473ed5bfaa7ee06449d40e1dc3
Author: Damien Lespiau <damien lespiau intel com>
Date: Wed Mar 31 19:42:22 2010 +0100
sink: add a new buffer is the list is empty
clutter-gst/clutter-gst-video-sink.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/clutter-gst/clutter-gst-video-sink.c b/clutter-gst/clutter-gst-video-sink.c
index f83f4fd..df4254d 100644
--- a/clutter-gst/clutter-gst-video-sink.c
+++ b/clutter-gst/clutter-gst-video-sink.c
@@ -413,7 +413,13 @@ clutter_gst_buffer_new (ClutterGstVideoSink *sink,
ClutterGstVideoSinkPrivate *priv = sink->priv;
ClutterGstBuffer *new_buffer;
guchar *map;
+ static guint last_size = 0;
+ if (size == 0)
+ size = last_size;
+ else
+ last_size = size;
+
new_buffer =
(ClutterGstBuffer *) gst_mini_object_new (CLUTTER_GST_TYPE_BUFFER);
@@ -689,6 +695,13 @@ memory_management:
g_cond_signal (request->wait_for_buffer);
}
+ if (priv->buffer_pool == NULL)
+ {
+ ClutterGstBuffer *new_buffer;
+ new_buffer = clutter_gst_buffer_new (sink, 0);
+ priv->buffer_pool = g_slist_prepend (priv->buffer_pool, new_buffer);
+ }
+
g_mutex_unlock (priv->pool_lock);
GST_DEBUG_OBJECT (sink, "dispatch end");
@@ -1628,6 +1641,7 @@ clutter_gst_video_sink_buffer_alloc (GstBaseSink *bsink,
request = clutter_gst_buffer_request_new (size);
clutter_gst_video_sink_queue_buffer_request (sink, request);
+ printf ("waiting\n");
GST_DEBUG_OBJECT (sink,
"(%d) (req%d) waiting for new buffer\n",
i,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]