X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fomnplay.h;h=c3b96c87fff413a2f7942a4804fe37fb262b1a14;hb=6a0af0e7bba391e04e5aac228b6b2743894c60e5;hp=123d6a1fc64513561f92add77d415b8936540b9d;hpb=7c1a2200d9071274ad16364be58bf82574748dd9;p=omnplay diff --git a/src/omnplay.h b/src/omnplay.h index 123d6a1..c3b96c8 100644 --- a/src/omnplay.h +++ b/src/omnplay.h @@ -51,35 +51,36 @@ typedef enum control_buttons BUTTON_LAST } control_buttons_t; -#define OMNPLAY_PLAYLIST_BLOCK_BEGIN (1 << 0) // 1 -#define OMNPLAY_PLAYLIST_BLOCK_BODY 0 // 0 -#define OMNPLAY_PLAYLIST_BLOCK_END (1 << 1) // 2 -#define OMNPLAY_PLAYLIST_BLOCK_LOOP (1 << 2) // 4 +#define OMNPLAY_PLAYLIST_BLOCK_BEGIN 1 +#define OMNPLAY_PLAYLIST_BLOCK_BODY 0 +#define OMNPLAY_PLAYLIST_BLOCK_END 2 +#define OMNPLAY_PLAYLIST_BLOCK_LOOP 4 typedef enum playlist_item_type { + // 1 OMNPLAY_PLAYLIST_ITEM_BLOCK_BEGIN = OMNPLAY_PLAYLIST_BLOCK_BEGIN, - + // 0 OMNPLAY_PLAYLIST_ITEM_BLOCK_BODY = OMNPLAY_PLAYLIST_BLOCK_BODY, - + // 2 OMNPLAY_PLAYLIST_ITEM_BLOCK_END = OMNPLAY_PLAYLIST_BLOCK_END, - - OMNPLAY_PLAYLIST_ITEM_BLOCK_SINGLE = OMNPLAY_PLAYLIST_BLOCK_END | \ - OMNPLAY_PLAYLIST_BLOCK_BODY | \ + // 3 + OMNPLAY_PLAYLIST_ITEM_BLOCK_SINGLE = OMNPLAY_PLAYLIST_BLOCK_BEGIN | + OMNPLAY_PLAYLIST_BLOCK_BODY | OMNPLAY_PLAYLIST_BLOCK_END, - - OMNPLAY_PLAYLIST_ITEM_LOOP_BEGIN = OMNPLAY_PLAYLIST_BLOCK_BEGIN | \ + // 5 + OMNPLAY_PLAYLIST_ITEM_LOOP_BEGIN = OMNPLAY_PLAYLIST_BLOCK_BEGIN | OMNPLAY_PLAYLIST_BLOCK_LOOP, - - OMNPLAY_PLAYLIST_ITEM_LOOP_BODY = OMNPLAY_PLAYLIST_BLOCK_BODY | \ + // 4 + OMNPLAY_PLAYLIST_ITEM_LOOP_BODY = OMNPLAY_PLAYLIST_BLOCK_BODY | OMNPLAY_PLAYLIST_BLOCK_LOOP, - - OMNPLAY_PLAYLIST_ITEM_LOOP_END = OMNPLAY_PLAYLIST_BLOCK_END | \ + // 6 + OMNPLAY_PLAYLIST_ITEM_LOOP_END = OMNPLAY_PLAYLIST_BLOCK_END | OMNPLAY_PLAYLIST_BLOCK_LOOP, - - OMNPLAY_PLAYLIST_ITEM_LOOP_SINGLE = OMNPLAY_PLAYLIST_BLOCK_END | \ - OMNPLAY_PLAYLIST_BLOCK_BODY | \ - OMNPLAY_PLAYLIST_BLOCK_END | \ + // 7 + OMNPLAY_PLAYLIST_ITEM_LOOP_SINGLE = OMNPLAY_PLAYLIST_BLOCK_BEGIN | + OMNPLAY_PLAYLIST_BLOCK_BODY | + OMNPLAY_PLAYLIST_BLOCK_END | OMNPLAY_PLAYLIST_BLOCK_LOOP, } playlist_item_type_t; @@ -93,6 +94,8 @@ typedef struct playlist_item int dur; int player; playlist_item_type_t type; + int omn_idx; + int omn_offset; } playlist_item_t; #define MAX_PLAYERS 4 @@ -106,11 +109,10 @@ typedef struct omnplay_player 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; struct omnplay_instance *app; int playlist_start; - int playlist_count; + int playlist_length; } omnplay_player_t; typedef struct omnplay_instance @@ -124,6 +126,7 @@ typedef struct omnplay_instance omnplay_player_t item[MAX_PLAYERS]; int count; char path[PATH_MAX]; + pthread_mutex_t lock; } players; int f_exit; struct @@ -134,6 +137,7 @@ typedef struct omnplay_instance int ver_prev; pthread_mutex_t lock; char* path; + GdkPixbuf *block_icons[8]; } playlist; } omnplay_instance_t; @@ -144,6 +148,8 @@ void omnplay_destroy(omnplay_instance_t* app); void omnplay_playlist_load(omnplay_instance_t* app); void omnplay_playlist_save(omnplay_instance_t* app); void omnplay_playlist_draw(omnplay_instance_t* app); +void omnplay_playlist_draw_item(omnplay_instance_t* app, int idx); +void omnplay_playlist_draw_item_rem(omnplay_instance_t* app, int idx, char* rem); #ifdef __cplusplus };