X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fomnplay.cpp;h=4a7542989fe8254fdfc10a720d58c88fcd29f671;hb=7c1a2200d9071274ad16364be58bf82574748dd9;hp=b670129b8d5cb07eee15983ebab7d6004f867319;hpb=ed7ca5c41e345f28a10e70624e0e0ca709f3fb51;p=melted_gui diff --git a/src/omnplay.cpp b/src/omnplay.cpp index b670129..4a75429 100644 --- a/src/omnplay.cpp +++ b/src/omnplay.cpp @@ -31,32 +31,10 @@ #include "omnplay.h" #include "ui.h" #include "opts.h" +#include "timecode.h" #include "omplrclnt.h" -static char* frames2tc( int f, float fps, char* buf ) -{ - int tc[4] = { 0, 0, 0, 0 }; - float d; - int t; - - if ( fps && f >= 0) - { - d = f / fps; - t = d; - - tc[0] = (d - t) * fps; - tc[1] = t % 60; t /= 60; - tc[2] = t % 60; t /= 60; - tc[3] = t % 24; - } - - sprintf(buf, "%.2d:%.2d:%.2d:%.2d", tc[3], tc[2], tc[1], tc[0]); - - return buf; -} - - static gboolean on_main_window_delete_event( GtkWidget *widget, GdkEvent *event, gpointer user_data ) { gtk_exit(0); @@ -205,7 +183,11 @@ static gboolean omnplay_button_click(omnplay_instance_t* app, control_buttons_t case BUTTON_PLAYLIST_ITEM_DEL: case BUTTON_PLAYLIST_ITEM_EDIT: case BUTTON_PLAYLIST_LOAD: + omnplay_playlist_load(app); + break; case BUTTON_PLAYLIST_SAVE: + omnplay_playlist_save(app); + break; case BUTTON_PLAYLIST_BLOCK_SINGLE: case BUTTON_PLAYLIST_BLOCK_LOOP: case BUTTON_PLAYLIST_ITEM_UP: @@ -277,4 +259,7 @@ void omnplay_release(omnplay_instance_t* app) pthread_mutex_destroy(&app->players.item[i].lock); }; + + /* create lock */ + pthread_mutex_destroy(&app->playlist.lock); };