mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 11:32:38 +00:00
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:
parent
95adba8f9d
commit
a14849fea8
5 changed files with 14 additions and 4 deletions
|
@ -38,5 +38,7 @@ noinst_HEADERS = \
|
||||||
gstqueue.h \
|
gstqueue.h \
|
||||||
gstsinesrc.h
|
gstsinesrc.h
|
||||||
|
|
||||||
|
CFLAGS += -g
|
||||||
|
|
||||||
libgstelements_la_LIBADD = $(GLIB_LIBS) $(GTK_LIBS) $(GHTTP_LIBS)
|
libgstelements_la_LIBADD = $(GLIB_LIBS) $(GTK_LIBS) $(GHTTP_LIBS)
|
||||||
libgstelements_la_LDFLAGS = -version-info $(STREAMER_CURRENT):$(STREAMER_REVISION):$(STREAMER_AGE)
|
libgstelements_la_LDFLAGS = -version-info $(STREAMER_CURRENT):$(STREAMER_REVISION):$(STREAMER_AGE)
|
||||||
|
|
|
@ -103,7 +103,7 @@ static void gst_queue_init(GstQueue *queue) {
|
||||||
queue->queue = NULL;
|
queue->queue = NULL;
|
||||||
queue->tail = NULL;
|
queue->tail = NULL;
|
||||||
queue->level_buffers = 0;
|
queue->level_buffers = 0;
|
||||||
queue->max_buffers = 1;
|
queue->max_buffers = 10;
|
||||||
queue->level_bytes = 0;
|
queue->level_bytes = 0;
|
||||||
queue->size_buffers = 0;
|
queue->size_buffers = 0;
|
||||||
queue->size_bytes = 0;
|
queue->size_bytes = 0;
|
||||||
|
@ -200,7 +200,7 @@ void gst_queue_push(GstConnection *connection) {
|
||||||
gst_pad_push(queue->srcpad,buf);
|
gst_pad_push(queue->srcpad,buf);
|
||||||
g_list_free(front);
|
g_list_free(front);
|
||||||
queue->level_buffers--;
|
queue->level_buffers--;
|
||||||
// g_print("-");
|
//g_print("-");
|
||||||
|
|
||||||
tosignal = queue->level_buffers < queue->max_buffers;
|
tosignal = queue->level_buffers < queue->max_buffers;
|
||||||
GST_UNLOCK(queue);
|
GST_UNLOCK(queue);
|
||||||
|
|
|
@ -38,5 +38,7 @@ noinst_HEADERS = \
|
||||||
gstqueue.h \
|
gstqueue.h \
|
||||||
gstsinesrc.h
|
gstsinesrc.h
|
||||||
|
|
||||||
|
CFLAGS += -g
|
||||||
|
|
||||||
libgstelements_la_LIBADD = $(GLIB_LIBS) $(GTK_LIBS) $(GHTTP_LIBS)
|
libgstelements_la_LIBADD = $(GLIB_LIBS) $(GTK_LIBS) $(GHTTP_LIBS)
|
||||||
libgstelements_la_LDFLAGS = -version-info $(STREAMER_CURRENT):$(STREAMER_REVISION):$(STREAMER_AGE)
|
libgstelements_la_LDFLAGS = -version-info $(STREAMER_CURRENT):$(STREAMER_REVISION):$(STREAMER_AGE)
|
||||||
|
|
|
@ -103,7 +103,7 @@ static void gst_queue_init(GstQueue *queue) {
|
||||||
queue->queue = NULL;
|
queue->queue = NULL;
|
||||||
queue->tail = NULL;
|
queue->tail = NULL;
|
||||||
queue->level_buffers = 0;
|
queue->level_buffers = 0;
|
||||||
queue->max_buffers = 1;
|
queue->max_buffers = 10;
|
||||||
queue->level_bytes = 0;
|
queue->level_bytes = 0;
|
||||||
queue->size_buffers = 0;
|
queue->size_buffers = 0;
|
||||||
queue->size_bytes = 0;
|
queue->size_bytes = 0;
|
||||||
|
@ -200,7 +200,7 @@ void gst_queue_push(GstConnection *connection) {
|
||||||
gst_pad_push(queue->srcpad,buf);
|
gst_pad_push(queue->srcpad,buf);
|
||||||
g_list_free(front);
|
g_list_free(front);
|
||||||
queue->level_buffers--;
|
queue->level_buffers--;
|
||||||
// g_print("-");
|
//g_print("-");
|
||||||
|
|
||||||
tosignal = queue->level_buffers < queue->max_buffers;
|
tosignal = queue->level_buffers < queue->max_buffers;
|
||||||
GST_UNLOCK(queue);
|
GST_UNLOCK(queue);
|
||||||
|
|
|
@ -151,9 +151,15 @@ int main(int argc,char *argv[]) {
|
||||||
|
|
||||||
g_print("about to enter loop\n");
|
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);
|
g_idle_add(idle_func,src);
|
||||||
|
|
||||||
gtk_main();
|
gtk_main();
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean idle_func(gpointer data) {
|
gboolean idle_func(gpointer data) {
|
||||||
|
|
Loading…
Reference in a new issue