X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Finstance.c;h=757d8a6e3465ff7efc8e8719336728f5d9a64215;hb=3022037d61a5e41f1e89f53b53708fec33c9bac7;hp=62d955b8a4e29b764e222bc056a61108151d3886;hpb=888b62e244add3b4b495427cd3e789b9e4dca70e;p=melted_gui diff --git a/src/instance.c b/src/instance.c index 62d955b..757d8a6 100644 --- a/src/instance.c +++ b/src/instance.c @@ -36,6 +36,7 @@ #include "ui.h" #include "opts.h" #include "timecode.h" +#include "player.h" static gboolean on_main_window_delete_event( GtkWidget *widget, GdkEvent *event, gpointer user_data ) { @@ -115,11 +116,11 @@ void instance_init(instance_t* app) pthread_mutex_init(&app->library.lock, &attr); pthread_mutexattr_destroy(&attr); -#if 0 - /* create a status thread */ + /* run unit monitoring threads */ for(i = 0; i < app->players.count; i++) - app->players.item[i].thread = g_thread_create( - omnplay_thread_proc, &app->players.item[i], TRUE, NULL); + player_run(app, i); + +#if 0 /* attach buttons click */ for(i = 1; i < BUTTON_LAST; i++) @@ -159,9 +160,9 @@ void instance_release(instance_t* app) app->f_exit = 1; + /* stop unit monitoring threads */ for(i = 0; i < app->players.count; i++) - /* create a omneon status thread */ - g_thread_join(app->players.item[i].thread); + player_stop(app, i); /* destroy lock */ pthread_mutex_destroy(&app->players.lock);