From 95adba8f9da1d08a01c9be074610fc17b98f2189 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 18 Feb 2000 23:48:45 +0000 Subject: [PATCH] Set the default buffer size to 1 to avoid the strange lockups... Original commit message from CVS: Set the default buffer size to 1 to avoid the strange lockups... --- gst/elements/gstqueue.c | 2 +- plugins/elements/gstqueue.c | 2 +- test/mp1parse.c | 12 ------------ 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/gst/elements/gstqueue.c b/gst/elements/gstqueue.c index 4ead691ed3..c0a6501bb2 100644 --- a/gst/elements/gstqueue.c +++ b/gst/elements/gstqueue.c @@ -103,7 +103,7 @@ static void gst_queue_init(GstQueue *queue) { queue->queue = NULL; queue->tail = NULL; queue->level_buffers = 0; - queue->max_buffers = 10; + queue->max_buffers = 1; queue->level_bytes = 0; queue->size_buffers = 0; queue->size_bytes = 0; diff --git a/plugins/elements/gstqueue.c b/plugins/elements/gstqueue.c index 4ead691ed3..c0a6501bb2 100644 --- a/plugins/elements/gstqueue.c +++ b/plugins/elements/gstqueue.c @@ -103,7 +103,7 @@ static void gst_queue_init(GstQueue *queue) { queue->queue = NULL; queue->tail = NULL; queue->level_buffers = 0; - queue->max_buffers = 10; + queue->max_buffers = 1; queue->level_bytes = 0; queue->size_buffers = 0; queue->size_bytes = 0; diff --git a/test/mp1parse.c b/test/mp1parse.c index 9cf5774526..8a485af591 100644 --- a/test/mp1parse.c +++ b/test/mp1parse.c @@ -10,16 +10,10 @@ void eof(GstSrc *src) { exit(0); } -void mp1parse_info_chain(GstPad *pad,GstBuffer *buf) { - //g_print("sink : got buffer of size %d\n",GST_BUFFER_SIZE(buf)); - gst_buffer_unref(buf); -} - void new_pad_created(GstElement *parse,GstPad *pad,GstElement *pipeline) { GstElement *parse_audio, *parse_video, *decode, *decode_video, *play, *show; GstElement *audio_queue, *video_queue; GstElement *audio_thread, *video_thread; - GstPad *infopad; GtkWidget *appwindow; @@ -68,8 +62,6 @@ void new_pad_created(GstElement *parse,GstPad *pad,GstElement *pipeline) { gst_element_set_state(GST_ELEMENT(audio_thread),GST_STATE_PLAYING); } else if (strncmp(gst_pad_get_name(pad), "video_", 6) == 0) { //} else if (0) { - infopad = gst_pad_new("sink",GST_PAD_SINK); - gst_pad_set_chain_function(infopad,mp1parse_info_chain); // construct internal pipeline elements parse_video = gst_elementfactory_make("mp1videoparse","parse_video"); @@ -78,10 +70,6 @@ void new_pad_created(GstElement *parse,GstPad *pad,GstElement *pipeline) { g_return_if_fail(decode_video != NULL); show = gst_elementfactory_make("videosink","show"); g_return_if_fail(show != NULL); - g_print("setting size\n"); - //gtk_object_set(GTK_OBJECT(show),"width",384,NULL); - //gtk_object_set(GTK_OBJECT(show),"height",288,NULL); - appwindow = gnome_app_new("MPEG1 player","MPEG1 player"); gnome_app_set_contents(GNOME_APP(appwindow),