mvcp protocol support embedded from melted project
[melted_gui] / src / instance.c
index 62d955b..757d8a6 100644 (file)
@@ -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);