X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fomnplay.h;h=2355c8b70bd64f04ae62a49748a6157f63259b6c;hb=f8c05bd2d69d49990c1fe56fa4fd1517bdf82cf0;hp=9a95c21337134d53823712707ee56dff09c0a131;hpb=8c2cc339159f5e4a7e5d1edf0de373c2946e93a9;p=omnplay diff --git a/src/omnplay.h b/src/omnplay.h index 9a95c21..2355c8b 100644 --- a/src/omnplay.h +++ b/src/omnplay.h @@ -25,16 +25,65 @@ extern "C" { #endif /* __cplusplus */ +typedef enum control_buttons +{ + BUTTON_PLAYLIST_ITEM_ADD = 1, + BUTTON_PLAYLIST_ITEM_DEL, + BUTTON_PLAYLIST_ITEM_EDIT, + + BUTTON_PLAYLIST_LOAD, + BUTTON_PLAYLIST_SAVE, + + BUTTON_PLAYLIST_BLOCK_SINGLE, + BUTTON_PLAYLIST_BLOCK_LOOP, + + BUTTON_PLAYLIST_ITEM_UP, + BUTTON_PLAYLIST_ITEM_DOWN, + + BUTTON_PLAYER_CUE, + BUTTON_PLAYER_PLAY, + BUTTON_PLAYER_PAUSE, + BUTTON_PLAYER_STOP, + + BUTTON_LIBRARY_ADD, + BUTTON_LIBRARY_REFRESH, + + BUTTON_LAST +} control_buttons_t; + +#define MAX_PLAYERS 4 + +typedef struct omnplay_player +{ + char name[PATH_MAX]; + char host[PATH_MAX]; + void* handle; + pthread_t thread; + pthread_mutex_t lock; + GtkWidget *label_status, *label_state, *label_tc_cur, *label_tc_rem, *label_clip; +} +omnplay_player_t; typedef struct omnplay_instance { GtkWidget *window; + GtkWidget *playlist; + GtkWidget *library; + GtkWidget *buttons[BUTTON_LAST + 1]; + struct + { + omnplay_player_t item[MAX_PLAYERS]; + int count; + char path[PATH_MAX]; + } players; + int f_exit; } omnplay_instance_t; omnplay_instance_t* omnplay_create(int argc, char** argv); void omnplay_init(omnplay_instance_t* app); -void omnplay_close(omnplay_instance_t* app); +void omnplay_release(omnplay_instance_t* app); +void omnplay_destroy(omnplay_instance_t* app); #ifdef __cplusplus };