Fixed the lockup by not calling any gtk functions in the main thread.
authorWim Taymans <wim.taymans@gmail.com>
Sat, 19 Feb 2000 10:50:26 +0000 (10:50 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Sat, 19 Feb 2000 10:50:26 +0000 (10:50 +0000)
Original commit message from CVS:
Fixed the lockup by not calling any gtk functions in the main thread.
This is not good.

gst/elements/Makefile.am
gst/elements/gstqueue.c
plugins/elements/Makefile.am
plugins/elements/gstqueue.c
test/mp1parse.c

index a455576..059659a 100644 (file)
@@ -38,5 +38,7 @@ noinst_HEADERS =              \
        gstqueue.h              \
        gstsinesrc.h
 
+CFLAGS += -g
+
 libgstelements_la_LIBADD = $(GLIB_LIBS) $(GTK_LIBS) $(GHTTP_LIBS)
 libgstelements_la_LDFLAGS = -version-info $(STREAMER_CURRENT):$(STREAMER_REVISION):$(STREAMER_AGE)
index c0a6501..ad8209a 100644 (file)
@@ -103,7 +103,7 @@ static void gst_queue_init(GstQueue *queue) {
   queue->queue = NULL;
   queue->tail = NULL;
   queue->level_buffers = 0;
-  queue->max_buffers = 1;
+  queue->max_buffers = 10;
   queue->level_bytes = 0;
   queue->size_buffers = 0;
   queue->size_bytes = 0;
@@ -200,7 +200,7 @@ void gst_queue_push(GstConnection *connection) {
   gst_pad_push(queue->srcpad,buf);
   g_list_free(front);
   queue->level_buffers--;
-//  g_print("-");
+  //g_print("-");
 
   tosignal = queue->level_buffers < queue->max_buffers;
   GST_UNLOCK(queue);
index a455576..059659a 100644 (file)
@@ -38,5 +38,7 @@ noinst_HEADERS =              \
        gstqueue.h              \
        gstsinesrc.h
 
+CFLAGS += -g
+
 libgstelements_la_LIBADD = $(GLIB_LIBS) $(GTK_LIBS) $(GHTTP_LIBS)
 libgstelements_la_LDFLAGS = -version-info $(STREAMER_CURRENT):$(STREAMER_REVISION):$(STREAMER_AGE)
index c0a6501..ad8209a 100644 (file)
@@ -103,7 +103,7 @@ static void gst_queue_init(GstQueue *queue) {
   queue->queue = NULL;
   queue->tail = NULL;
   queue->level_buffers = 0;
-  queue->max_buffers = 1;
+  queue->max_buffers = 10;
   queue->level_bytes = 0;
   queue->size_buffers = 0;
   queue->size_bytes = 0;
@@ -200,7 +200,7 @@ void gst_queue_push(GstConnection *connection) {
   gst_pad_push(queue->srcpad,buf);
   g_list_free(front);
   queue->level_buffers--;
-//  g_print("-");
+  //g_print("-");
 
   tosignal = queue->level_buffers < queue->max_buffers;
   GST_UNLOCK(queue);
index 8a485af..da0d149 100644 (file)
@@ -151,9 +151,15 @@ int main(int argc,char *argv[]) {
 
   g_print("about to enter loop\n");
 
+       while (1) {
+         gst_src_push(GST_SRC(src));
+       }
+       // this does not work due to multithreading
+       /*
        g_idle_add(idle_func,src);
 
        gtk_main();
+       */
 }
 
 gboolean idle_func(gpointer data) {