Fixed the lockup by not calling any gtk functions in the main thread.

Original commit message from CVS:
Fixed the lockup by not calling any gtk functions in the main thread.
This is not good.
This commit is contained in:
Wim Taymans 2000-02-19 10:50:26 +00:00
parent 95adba8f9d
commit a14849fea8
5 changed files with 14 additions and 4 deletions

View 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)

View 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);

View 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)

View 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);

View 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) {