mirror of
https://github.com/game-stop/veejay.git
synced 2025-12-19 22:30:06 +01:00
vims revisited, still not complete
git-svn-id: svn://code.dyne.org/veejay/trunk@573 eb8d1916-c9e9-0310-b8de-cf0c9472ead5
This commit is contained in:
@@ -111,7 +111,7 @@ typedef struct
|
||||
int audio_bps;
|
||||
int play_rate;
|
||||
|
||||
long video_frames;
|
||||
uint64_t video_frames;
|
||||
|
||||
long num_video_files;
|
||||
|
||||
@@ -2024,7 +2024,7 @@ void vj_el_frame_cache(int n )
|
||||
}
|
||||
}
|
||||
|
||||
uint64_t *vj_el_edit_copy( void *edl, long start, long end, uint64_t *len )
|
||||
uint64_t *vj_el_edit_copy( void *edl, uint64_t start, uint64_t end, uint64_t *len )
|
||||
{
|
||||
editlist *el = (editlist*) edl;
|
||||
uint64_t *res = NULL;
|
||||
@@ -2051,7 +2051,7 @@ uint64_t *vj_el_edit_copy( void *edl, long start, long end, uint64_t *len )
|
||||
return res;
|
||||
}
|
||||
|
||||
int vj_el_edit_del( void *edl, long start, long end )
|
||||
int vj_el_edit_del( void *edl, uint64_t start, uint64_t end )
|
||||
{
|
||||
editlist *el = (editlist*) edl;
|
||||
|
||||
@@ -2072,7 +2072,7 @@ int vj_el_edit_del( void *edl, long start, long end )
|
||||
return 1;
|
||||
}
|
||||
|
||||
int vj_el_edit_paste( void *edl, long destination, uint64_t *frame_list, uint64_t len)
|
||||
int vj_el_edit_paste( void *edl, uint64_t destination, uint64_t *frame_list, uint64_t len)
|
||||
{
|
||||
editlist *el = (editlist*) edl;
|
||||
|
||||
@@ -2091,7 +2091,7 @@ int vj_el_edit_paste( void *edl, long destination, uint64_t *frame_list, uint64
|
||||
return 1;
|
||||
}
|
||||
|
||||
int vj_el_get_num_frames(void *edl)
|
||||
uint64_t vj_el_get_num_frames(void *edl)
|
||||
{
|
||||
editlist *el = (editlist*) edl;
|
||||
return el->video_frames - 1;
|
||||
|
||||
@@ -72,7 +72,7 @@ int vj_el_framelist_clone( void *src, void *dst);
|
||||
char *vj_el_write_line_ascii( void *el, int *bytes_written );
|
||||
|
||||
void vj_el_deinit();
|
||||
|
||||
uint64_t vj_el_get_num_frames( void *edl);
|
||||
char vj_el_get_norm( void *edl );
|
||||
float vj_el_get_fps(void *edl);
|
||||
int vj_el_get_width( void *edl );
|
||||
@@ -83,5 +83,8 @@ int vj_el_get_audio_bps( void *edl );
|
||||
int vj_el_get_audio_chans( void *edl );
|
||||
|
||||
int vj_el_match( void *sv, void *edl);
|
||||
uint64_t *vj_el_edit_copy( void *edl, uint64_t start, uint64_t end, uint64_t *len );
|
||||
int vj_el_edit_del( void *edl, uint64_t start, uint64_t end );
|
||||
int vj_el_edit_paste( void *edl, uint64_t destination, uint64_t *frame_list, uint64_t len);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -71,6 +71,7 @@ static int n_chans_ = 0;
|
||||
static int bits_ = 0;
|
||||
static int display_ = 0;
|
||||
static int itu601_ = 0;
|
||||
static int dump_ = 0;
|
||||
|
||||
static void Usage(char *progname)
|
||||
{
|
||||
@@ -94,6 +95,7 @@ static void Usage(char *progname)
|
||||
fprintf(stderr, " -p/--port\t\t\n");
|
||||
fprintf(stderr, " -d/--display [num] 1=SDL, 2=OpenGL\t\t\n");
|
||||
fprintf(stderr, " -u/--itu601 [0|1]\n");
|
||||
fprintf(stderr, " -l/--list\n");
|
||||
|
||||
}
|
||||
|
||||
@@ -155,6 +157,8 @@ static int set_option(const char *name, char *value)
|
||||
info->port_offset = atoi(value);
|
||||
} else if(strcmp(name, "itu601") == 0 || strcmp(name,"u") == 0 ){
|
||||
info->itu601 = atoi(value);
|
||||
} else if(strcmp(name, "list") == 0 || strcmp(name,"l") == 0 ) {
|
||||
dump_ = 1;
|
||||
} else
|
||||
nerr++;
|
||||
|
||||
@@ -188,6 +192,7 @@ static int check_command_line_options(int argc, char *argv[])
|
||||
{"display",1,0,0},
|
||||
{"port",1,0,0},
|
||||
{"itu601",1,0,0},
|
||||
{"list",0,0,0},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
#endif
|
||||
@@ -201,12 +206,12 @@ static int check_command_line_options(int argc, char *argv[])
|
||||
#ifdef HAVE_GETOPT_LONG
|
||||
while ((n =
|
||||
getopt_long(argc, argv,
|
||||
"vs:c:a:t:b:f:w:h:n:i:m:j:p:P:r:n:B:d:u:",
|
||||
"lvs:c:a:t:b:f:w:h:n:i:m:j:p:P:r:n:B:d:u:",
|
||||
long_options, &option_index)) != EOF)
|
||||
#else
|
||||
while ((n =
|
||||
getopt(argc, argv,
|
||||
"vs:c:a:t:b:f:w:h:n:i:m:j:p:P:r:n:B:d:u:")) != EOF)
|
||||
"lvs:c:a:t:b:f:w:h:n:i:m:j:p:P:r:n:B:d:u:")) != EOF)
|
||||
#endif
|
||||
{
|
||||
switch (n) {
|
||||
@@ -388,7 +393,15 @@ int main(int argc, char **argv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(!veejay_main(info))
|
||||
if( dump_ )
|
||||
{
|
||||
vj_event_vevo_dump();
|
||||
veejay_quit(info);
|
||||
veejay_free(info);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(!veejay_main(info))
|
||||
{
|
||||
veejay_msg(VEEJAY_MSG_ERROR, "Cannot start main playback cycle");
|
||||
return 1;
|
||||
|
||||
@@ -58,19 +58,17 @@ enum {
|
||||
VIMS_RGB24_IMAGE = 333,
|
||||
|
||||
/* video controls */
|
||||
VIMS_VIDEO_PLAY_FORWARD = 10,
|
||||
VIMS_VIDEO_PLAY_BACKWARD = 11,
|
||||
VIMS_VIDEO_PLAY_STOP = 12,
|
||||
VIMS_VIDEO_SKIP_FRAME = 13,
|
||||
VIMS_VIDEO_PREV_FRAME = 14,
|
||||
VIMS_VIDEO_SKIP_SECOND = 15,
|
||||
VIMS_VIDEO_PREV_SECOND = 16,
|
||||
VIMS_VIDEO_GOTO_START = 17,
|
||||
VIMS_VIDEO_GOTO_END = 18,
|
||||
VIMS_VIDEO_SET_FRAME = 19,
|
||||
VIMS_VIDEO_SET_SPEED = 20,
|
||||
// VIMS_VIDEO_MCAST_START = 22,
|
||||
// VIMS_VIDEO_MCAST_STOP = 23,
|
||||
VIMS_SAMPLE_PLAY_FORWARD = 10,
|
||||
VIMS_SAMPLE_PLAY_BACKWARD = 11,
|
||||
VIMS_SAMPLE_PLAY_STOP = 12,
|
||||
VIMS_SAMPLE_SKIP_FRAME = 13,
|
||||
VIMS_SAMPLE_PREV_FRAME = 14,
|
||||
VIMS_SAMPLE_SKIP_SECOND = 15,
|
||||
VIMS_SAMPLE_PREV_SECOND = 16,
|
||||
VIMS_SAMPLE_GOTO_START = 17,
|
||||
VIMS_SAMPLE_GOTO_END = 18,
|
||||
VIMS_SAMPLE_SET_FRAME = 19,
|
||||
VIMS_SAMPLE_SET_SPEED = 20,
|
||||
|
||||
/* editlist commands */
|
||||
|
||||
@@ -78,37 +76,37 @@ enum {
|
||||
VIMS_SAMPLE_SELECT = 101,
|
||||
VIMS_SAMPLE_DEL = 120,
|
||||
VIMS_SAMPLE_SET_PROPERTIES = 103,
|
||||
VIMS_SAMPLE_LOAD_SAMPLELIST = 125,
|
||||
VIMS_SAMPLE_SAVE_SAMPLELIST = 126,
|
||||
VIMS_SAMPLE_LOAD = 125,
|
||||
VIMS_SAMPLE_SAVE = 126,
|
||||
VIMS_SAMPLE_DEL_ALL = 121,
|
||||
VIMS_SAMPLE_COPY = 127,
|
||||
VIMS_SAMPLE_REC_START = 130,
|
||||
VIMS_SAMPLE_REC_STOP = 131,
|
||||
VIMS_SAMPLE_CHAIN_ACTIVE = 112,
|
||||
|
||||
VIMS_EDITLIST_PASTE_AT = 50,
|
||||
VIMS_EDITLIST_COPY = 51,
|
||||
VIMS_EDITLIST_DEL = 52,
|
||||
VIMS_EDITLIST_CROP = 53,
|
||||
VIMS_EDITLIST_CUT = 54,
|
||||
VIMS_EDITLIST_ADD = 55,
|
||||
VIMS_EDITLIST_ADD_SAMPLE = 56,
|
||||
VIMS_EDITLIST_SAVE = 58,
|
||||
VIMS_EDITLIST_LOAD = 59,
|
||||
VIMS_SAMPLE_EDL_PASTE_AT = 50,
|
||||
VIMS_SAMPLE_EDL_COPY = 51,
|
||||
VIMS_SAMPLE_EDL_DEL = 52,
|
||||
VIMS_SAMPLE_EDL_CROP = 53,
|
||||
VIMS_SAMPLE_EDL_CUT = 54,
|
||||
VIMS_SAMPLE_EDL_ADD = 55,
|
||||
VIMS_SAMPLE_EDL_SAVE = 58,
|
||||
VIMS_SAMPLE_EDL_LOAD = 59,
|
||||
VIMS_SAMPLE_EDL_EXPORT = 56,
|
||||
|
||||
VIMS_SAMPLE_CHAIN_SET_ACTIVE = 353,
|
||||
VIMS_SAMPLE_CHAIN_CLEAR = 355,
|
||||
VIMS_SAMPLE_CHAIN_LIST = 358,
|
||||
VIMS_SAMPLE_CHAIN_SET_ENTRY = 359,
|
||||
VIMS_SAMPLE_CHAIN_ENTRY_SET_FX = 360,
|
||||
VIMS_SAMPLE_CHAIN_ENTRY_SET_PRESET = 361,
|
||||
VIMS_SAMPLE_CHAIN_ENTRY_SET_ACTIVE = 363,
|
||||
VIMS_SAMPLE_CHAIN_ENTRY_SET_VALUE = 366,
|
||||
VIMS_SAMPLE_CHAIN_ENTRY_SET_INPUT = 367,
|
||||
VIMS_SAMPLE_CHAIN_ENTRY_CLEAR = 369,
|
||||
VIMS_SAMPLE_CHAIN_ENTRY_SET_ALPHA = 370,
|
||||
|
||||
VIMS_CHAIN_SET_ACTIVE = 353,
|
||||
VIMS_CHAIN_CLEAR = 355,
|
||||
VIMS_CHAIN_LIST = 358,
|
||||
VIMS_CHAIN_SET_ENTRY = 359,
|
||||
VIMS_CHAIN_ENTRY_SET_FX = 360,
|
||||
VIMS_CHAIN_ENTRY_SET_PRESET = 361,
|
||||
VIMS_CHAIN_ENTRY_SET_ACTIVE = 363,
|
||||
VIMS_CHAIN_ENTRY_SET_VALUE = 366,
|
||||
VIMS_CHAIN_ENTRY_SET_INPUT = 367,
|
||||
VIMS_CHAIN_ENTRY_CLEAR = 369,
|
||||
VIMS_CHAIN_ENTRY_SET_ALPHA = 370,
|
||||
|
||||
VIMS_CHAIN_ENTRY_SET_STATE = 377,
|
||||
VIMS_SAMPLE_CHAIN_ENTRY_SET_STATE = 377,
|
||||
|
||||
VIMS_GET_FRAME = 42,
|
||||
|
||||
|
||||
@@ -53,8 +53,6 @@ static int _last_known_num_args = 0;
|
||||
/* define the function pointer to any event */
|
||||
typedef void (*vj_event)(void *ptr, const char format[], va_list ap);
|
||||
|
||||
void vj_event_create_effect_bundle(veejay_t * v,char *buf, int key_id, int key_mod );
|
||||
|
||||
/* struct for runtime initialization of event handlers */
|
||||
typedef struct {
|
||||
int list_id; // VIMS id
|
||||
@@ -934,16 +932,7 @@ void vj_event_lvd_parse_set_entry( veejay_t *v, const char *format[], va_list ap
|
||||
//@ -> atom types of fx_values and fx_chain
|
||||
}
|
||||
|
||||
void vj_event_commit_bundle( veejay_t *v, int key_num, int key_mod)
|
||||
{
|
||||
char bundle[4096];
|
||||
bzero(bundle,4096);
|
||||
vj_event_create_effect_bundle(v, bundle, key_num, key_mod );
|
||||
}
|
||||
|
||||
|
||||
//@ FIXME
|
||||
|
||||
void vj_event_none(void *ptr, const char format[], va_list ap)
|
||||
{
|
||||
veejay_msg(VEEJAY_MSG_INFO, "No event attached on this key");
|
||||
@@ -1429,10 +1418,6 @@ void vj_event_sample_copy(void *ptr, const char format[] , va_list ap)
|
||||
{
|
||||
}
|
||||
|
||||
void vj_event_sample_clear_all(void *ptr, const char format[], va_list ap)
|
||||
{
|
||||
}
|
||||
|
||||
void vj_event_chain_clear(void *ptr, const char format[], va_list ap)
|
||||
{
|
||||
int args[2];
|
||||
@@ -1616,30 +1601,72 @@ void vj_event_chain_entry_preset(void *ptr,const char format[], va_list ap)
|
||||
|
||||
void vj_event_el_cut(void *ptr, const char format[], va_list ap)
|
||||
{
|
||||
int args[2];
|
||||
veejay_t *v = (veejay_t*) ptr;
|
||||
char s[256];
|
||||
P_A(args, s, format, ap);
|
||||
|
||||
void *sample = which_sample( v, args );
|
||||
if( sample )
|
||||
{
|
||||
if(sample_edl_cut_to_buffer( sample, (uint64_t) args[1], (uint64_t) args[2] ))
|
||||
veejay_msg(VEEJAY_MSG_INFO, "Cut frames %d - %d to buffer",args[1],args[2]);
|
||||
else
|
||||
veejay_msg(VEEJAY_MSG_ERROR, "Unable to cut frames %d - %d",args[1],args[2]);
|
||||
}
|
||||
}
|
||||
|
||||
void vj_event_el_copy(void *ptr, const char format[], va_list ap)
|
||||
{
|
||||
int args[2];
|
||||
veejay_t *v = (veejay_t*) ptr;
|
||||
char s[256];
|
||||
P_A(args, s, format, ap);
|
||||
|
||||
void *sample = which_sample( v, args );
|
||||
if(sample)
|
||||
{
|
||||
if( sample_edl_copy( sample, (uint64_t) args[1],(uint64_t)args[2] ))
|
||||
veejay_msg(VEEJAY_MSG_INFO, "Copied frames %d - %d to buffer", args[1],args[2]);
|
||||
else
|
||||
veejay_msg(VEEJAY_MSG_INFO, "Unable to copy frames %d - %d",args[1],args[2]);
|
||||
}
|
||||
}
|
||||
|
||||
void vj_event_el_del(void *ptr, const char format[], va_list ap)
|
||||
{
|
||||
}
|
||||
int args[2];
|
||||
veejay_t *v = (veejay_t*) ptr;
|
||||
char s[256];
|
||||
P_A(args, s, format, ap);
|
||||
|
||||
void *sample = which_sample( v, args );
|
||||
if(sample)
|
||||
{
|
||||
if( sample_edl_delete( sample, (uint64_t) args[1],(uint64_t)args[2] ))
|
||||
veejay_msg(VEEJAY_MSG_INFO, "Copied frames %d - %d to buffer", args[1],args[2]);
|
||||
else
|
||||
veejay_msg(VEEJAY_MSG_INFO, "Unable to copy frames %d - %d",args[1],args[2]);
|
||||
}
|
||||
|
||||
void vj_event_el_crop(void *ptr, const char format[], va_list ap)
|
||||
{
|
||||
}
|
||||
|
||||
void vj_event_el_paste_at(void *ptr, const char format[], va_list ap)
|
||||
{
|
||||
}
|
||||
int args[2];
|
||||
veejay_t *v = (veejay_t*) ptr;
|
||||
char s[256];
|
||||
P_A(args, s, format, ap);
|
||||
|
||||
void vj_event_el_save_editlist(void *ptr, const char format[], va_list ap)
|
||||
{
|
||||
}
|
||||
void *sample = which_sample( v, args );
|
||||
if(sample)
|
||||
{
|
||||
if( sample_edl_paste_from_buffer( sample, (uint64_t) args[1] ) )
|
||||
veejay_msg( VEEJAY_MSG_INFO, "Pasted frames from buffer to position %d", args[1] );
|
||||
else
|
||||
veejay_msg(VEEJAY_MSG_INFO, "Unable to paste frames at position %d", args[1]);
|
||||
|
||||
void vj_event_el_load_editlist(void *ptr, const char format[], va_list ap)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1647,225 +1674,4 @@ void vj_event_el_add_video(void *ptr, const char format[], va_list ap)
|
||||
{
|
||||
}
|
||||
|
||||
void vj_event_create_effect_bundle(veejay_t * v, char *buf, int key_id, int key_mod )
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef USE_GDK_PIXBUF
|
||||
void vj_event_get_scaled_image ( void *ptr, const char format[], va_list ap )
|
||||
{
|
||||
/* send performer preview buffer ! */
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
void vj_event_send_sample ( void *ptr, const char format[], va_list ap)
|
||||
{
|
||||
// @ send sample info
|
||||
}
|
||||
|
||||
void vj_event_send_sample_list ( void *ptr, const char format[], va_list ap )
|
||||
{
|
||||
veejay_t *v = (veejay_t*)ptr;
|
||||
|
||||
//@ send list of samples (primary keys)
|
||||
}
|
||||
|
||||
void vj_event_send_log ( void *ptr, const char format[], va_list ap )
|
||||
{
|
||||
veejay_t *v = (veejay_t*) ptr;
|
||||
int num_lines = 0;
|
||||
int str_len = 0;
|
||||
char *messages = NULL;
|
||||
bzero( _s_print_buf,SEND_BUF);
|
||||
|
||||
messages = veejay_pop_messages( &num_lines, &str_len );
|
||||
|
||||
if(str_len == 0 || num_lines == 0 )
|
||||
sprintf(_s_print_buf, "%06d", 0);
|
||||
else
|
||||
sprintf(_s_print_buf, "%06d%s", str_len, messages );
|
||||
if(messages)
|
||||
free(messages);
|
||||
|
||||
SEND_LOG_MSG( v, _s_print_buf );
|
||||
}
|
||||
|
||||
void vj_event_send_frame ( void *ptr, const char format[], va_list ap )
|
||||
{
|
||||
veejay_t *v = (veejay_t*) ptr;
|
||||
}
|
||||
|
||||
|
||||
void vj_event_mcast_start ( void *ptr, const char format[], va_list ap )
|
||||
{
|
||||
veejay_t *v = (veejay_t*) ptr;
|
||||
/* if(!v->settings->use_vims_mcast)
|
||||
veejay_msg(VEEJAY_MSG_ERROR, "start veejay in multicast mode (see -V commandline option)");
|
||||
else
|
||||
{
|
||||
v->settings->mcast_frame_sender = 1;
|
||||
veejay_msg(VEEJAY_MSG_INFO, "Veejay started mcast frame sender");
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
void vj_event_mcast_stop ( void *ptr, const char format[], va_list ap )
|
||||
{
|
||||
/*veejay_t *v = (veejay_t*) ptr;
|
||||
if(!v->settings->use_vims_mcast)
|
||||
veejay_msg(VEEJAY_MSG_ERROR, "start veejay in multicast mode (see -V commandline option)");
|
||||
else
|
||||
{
|
||||
v->settings->mcast_frame_sender = 0;
|
||||
veejay_msg(VEEJAY_MSG_INFO, "Veejay stopped mcast frame sender");
|
||||
}*/
|
||||
}
|
||||
/*
|
||||
int vj_event_load_bundles(char *bundle_file)
|
||||
{
|
||||
FILE *fd;
|
||||
char *event_name, *event_msg;
|
||||
char buf[65535];
|
||||
int event_id=0;
|
||||
if(!bundle_file) return -1;
|
||||
fd = fopen(bundle_file, "r");
|
||||
bzero(buf,65535);
|
||||
if(!fd) return -1;
|
||||
while(fgets(buf,4096,fd))
|
||||
{
|
||||
buf[strlen(buf)-1] = 0;
|
||||
event_name = strtok(buf, "|");
|
||||
event_msg = strtok(NULL, "|");
|
||||
if(event_msg!=NULL && event_name!=NULL) {
|
||||
//veejay_msg(VEEJAY_MSG_INFO, "Event: %s , Msg [%s]",event_name,event_msg);
|
||||
event_id = atoi( event_name );
|
||||
if(event_id && event_msg)
|
||||
{
|
||||
vj_msg_bundle *m = vj_event_bundle_new( event_msg, event_id );
|
||||
if(m != NULL)
|
||||
{
|
||||
if( vj_event_bundle_store(m) )
|
||||
{
|
||||
veejay_msg(VEEJAY_MSG_INFO, "(VIMS) Registered a bundle as event %03d",event_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
fclose(fd);
|
||||
return 1;
|
||||
}
|
||||
|
||||
void vj_event_do_bundled_msg(void *ptr, const char format[], va_list ap)
|
||||
{
|
||||
veejay_t *v = (veejay_t*) ptr;
|
||||
int args[1];
|
||||
char s[1024];
|
||||
vj_msg_bundle *m;
|
||||
P_A( args, s , format, ap);
|
||||
//veejay_msg(VEEJAY_MSG_INFO, "Parsing message bundle as event");
|
||||
m = vj_event_bundle_get(args[0]);
|
||||
if(m)
|
||||
{
|
||||
vj_event_parse_bundle( v, m->bundle );
|
||||
}
|
||||
else
|
||||
{
|
||||
veejay_msg(VEEJAY_MSG_ERROR, "Requested event %d does not exist. ",args[0]);
|
||||
}
|
||||
}*/
|
||||
|
||||
/*
|
||||
void vj_event_bundled_msg_del(void *ptr, const char format[], va_list ap)
|
||||
{
|
||||
|
||||
int args[1];
|
||||
char *s = NULL;
|
||||
P_A(args,s,format,ap);
|
||||
if ( vj_event_bundle_del( args[0] ) == 0)
|
||||
{
|
||||
veejay_msg(VEEJAY_MSG_INFO,"Bundle %d deleted from event system",args[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
veejay_msg(VEEJAY_MSG_ERROR, "Bundle is %d is not known",args[0]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void vj_event_bundled_msg_add(void *ptr, const char format[], va_list ap)
|
||||
{
|
||||
|
||||
int args[2] = {0,0};
|
||||
char s[1024];
|
||||
bzero(s, 1024);
|
||||
P_A(args,s,format,ap);
|
||||
|
||||
if(args[0] == 0)
|
||||
{
|
||||
args[0] = vj_event_suggest_bundle_id();
|
||||
veejay_msg(VEEJAY_MSG_DEBUG, "(VIMS) suggested new Event id %d", args[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
veejay_msg(VEEJAY_MSG_DEBUG, "(VIMS) requested to add/replace %d", args[0]);
|
||||
}
|
||||
|
||||
if(args[0] < VIMS_BUNDLE_START|| args[0] > VIMS_BUNDLE_END )
|
||||
{
|
||||
// invalid bundle
|
||||
veejay_msg(VEEJAY_MSG_ERROR, "Customized events range from %d-%d", VIMS_BUNDLE_START, VIMS_BUNDLE_END);
|
||||
return;
|
||||
}
|
||||
// allocate new
|
||||
veejay_strrep( s, '_', ' ');
|
||||
vj_msg_bundle *m = vj_event_bundle_new(s, args[0]);
|
||||
if(!m)
|
||||
{
|
||||
veejay_msg(VEEJAY_MSG_ERROR, "Error adding bundle ?!");
|
||||
return;
|
||||
}
|
||||
|
||||
// bye existing bundle
|
||||
if( vj_event_bundle_exists(args[0]))
|
||||
{
|
||||
veejay_msg(VEEJAY_MSG_DEBUG,"(VIMS) Bundle exists - replace ");
|
||||
vj_event_bundle_del( args[0] );
|
||||
}
|
||||
|
||||
if( vj_event_bundle_store(m))
|
||||
{
|
||||
veejay_msg(VEEJAY_MSG_INFO, "(VIMS) Registered Bundle %d in VIMS",args[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
veejay_msg(VEEJAY_MSG_ERROR, "(VIMS) Error in Bundle %d '%s'",args[0],s );
|
||||
}
|
||||
}*/
|
||||
|
||||
#ifdef USE_GDK_PIXBUF
|
||||
void vj_event_screenshot(void *ptr, const char format[], va_list ap)
|
||||
{
|
||||
}
|
||||
#else
|
||||
#ifdef HAVE_JPEG
|
||||
void vj_event_screenshot(void *ptr, const char format[], va_list ap)
|
||||
{
|
||||
int args[4];
|
||||
char filename[1024];
|
||||
bzero(filename,1024);
|
||||
P_A(args, filename, format, ap );
|
||||
veejay_t *v = (veejay_t*) ptr;
|
||||
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void vj_event_quick_bundle( void *ptr, const char format[], va_list ap)
|
||||
{
|
||||
vj_event_commit_bundle( (veejay_t*) ptr,0,0);
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,6 @@ void vj_event_play_reverse ( void *ptr, const char format[], va_list ap );
|
||||
void vj_event_play_speed ( void *ptr, const char format[], va_list ap );
|
||||
void vj_event_play_stop ( void *ptr, const char format[], va_list ap );
|
||||
void vj_event_prev_second ( void *ptr, const char format[], va_list ap );
|
||||
void vj_event_sample_clear_all ( void *ptr, const char format[], va_list ap );
|
||||
void vj_event_sample_copy ( void *ptr, const char format[], va_list ap );
|
||||
void vj_event_sample_del ( void *ptr, const char format[], va_list ap );
|
||||
void vj_event_sample_load_list ( void *ptr, const char format[], va_list ap );
|
||||
@@ -70,14 +69,7 @@ void vj_event_set_frame ( void *ptr, const char format[], va_list ap );
|
||||
void vj_event_set_screen_size ( void *ptr, const char format[], va_list ap );
|
||||
#endif
|
||||
void vj_event_send_sample_list ( void *ptr, const char format[], va_list ap );
|
||||
void vj_event_send_log ( void *ptr, const char format[], va_list ap );
|
||||
void vj_event_send_frame ( void *ptr, const char fomrat[], va_list ap );
|
||||
void vj_event_sample_new ( void *ptr, const char format[], va_list ap );
|
||||
void vj_event_do_bundled_msg ( void *ptr, const char format[], va_list ap );
|
||||
void vj_event_bundled_msg_del ( void *ptr, const char format[], va_list ap );
|
||||
void vj_event_bundled_msg_add ( void *ptr, const char format[], va_list ap );
|
||||
void vj_event_read_file ( void *ptr, const char format[], va_list ap );
|
||||
void vj_event_screenshot ( void *ptr, const char format[], va_list ap );
|
||||
void vj_event_quit ( void *ptr, const char format[], va_list ap );
|
||||
void vj_event_set_volume ( void *ptr, const char format[], va_list ap );
|
||||
void vj_event_debug_level ( void *ptr, const char format[], va_list ap );
|
||||
@@ -85,14 +77,6 @@ void vj_event_debug_level ( void *ptr, const char format[], va_list ap );
|
||||
void vj_event_bezerk ( void *ptr, const char format[], va_list ap );
|
||||
void vj_event_fullscreen ( void *ptr, const char format[], va_list ap );
|
||||
|
||||
void vj_event_send_vimslist ( void *ptr, const char format[], va_list ap );
|
||||
void vj_event_send_bundles (void *ptr, const char format[], va_list ap);
|
||||
|
||||
void vj_event_mcast_start( void *ptr, const char format[], va_list ap);
|
||||
void vj_event_mcast_stop( void *ptr, const char format[], va_list ap);
|
||||
|
||||
void vj_event_get_scaled_image( void *ptr, const char format[], va_list ap);
|
||||
|
||||
void vj_event_chain_entry_set_active( void *ptr, const char format[], va_list ap );
|
||||
void vj_event_chain_entry_set(void *ptr, const char format[], va_list ap);
|
||||
void vj_event_chain_entry_clear( void *ptr, const char format[], va_list ap );
|
||||
|
||||
@@ -96,7 +96,7 @@ static void dump_event_stderr(vevo_port_t *event)
|
||||
|
||||
if(fmt) free(fmt);
|
||||
free(name);
|
||||
|
||||
veejay_msg(VEEJAY_MSG_INFO," ");
|
||||
}
|
||||
|
||||
int vj_event_vevo_list_size(void)
|
||||
@@ -383,135 +383,162 @@ void vj_init_vevo_events(void)
|
||||
NULL );
|
||||
|
||||
|
||||
index_map_[VIMS_VIDEO_PLAY_FORWARD] = _new_event(
|
||||
NULL,
|
||||
VIMS_VIDEO_PLAY_FORWARD,
|
||||
index_map_[VIMS_SAMPLE_PLAY_FORWARD] = _new_event(
|
||||
"%d",
|
||||
VIMS_SAMPLE_PLAY_FORWARD,
|
||||
"Play forward",
|
||||
vj_event_play_forward,
|
||||
0,
|
||||
VIMS_ALLOW_ANY,
|
||||
NULL );
|
||||
|
||||
index_map_[VIMS_VIDEO_PLAY_BACKWARD] = _new_event(
|
||||
NULL,
|
||||
VIMS_VIDEO_PLAY_BACKWARD,
|
||||
"Play backward",
|
||||
vj_event_play_reverse,
|
||||
0,
|
||||
VIMS_ALLOW_ANY,
|
||||
NULL );
|
||||
|
||||
index_map_[VIMS_VIDEO_PLAY_STOP] = _new_event(
|
||||
NULL,
|
||||
VIMS_VIDEO_PLAY_STOP,
|
||||
"Play stop",
|
||||
vj_event_play_stop,
|
||||
0,
|
||||
VIMS_ALLOW_ANY,
|
||||
NULL );
|
||||
|
||||
index_map_[VIMS_VIDEO_SKIP_FRAME] = _new_event(
|
||||
"%d",
|
||||
VIMS_VIDEO_SKIP_FRAME,
|
||||
"Skip N frames forward",
|
||||
vj_event_inc_frame,
|
||||
1,
|
||||
VIMS_ALLOW_ANY,
|
||||
SAMPLE_ID_HELP,
|
||||
0,
|
||||
NULL );
|
||||
|
||||
index_map_[VIMS_SAMPLE_PLAY_BACKWARD] = _new_event(
|
||||
"%d",
|
||||
VIMS_SAMPLE_PLAY_BACKWARD,
|
||||
"Play backward",
|
||||
vj_event_play_reverse,
|
||||
1,
|
||||
VIMS_ALLOW_ANY,
|
||||
SAMPLE_ID_HELP,
|
||||
0,
|
||||
NULL );
|
||||
|
||||
index_map_[VIMS_SAMPLE_PLAY_STOP] = _new_event(
|
||||
"%d",
|
||||
VIMS_SAMPLE_PLAY_STOP,
|
||||
"Play stop",
|
||||
vj_event_play_stop,
|
||||
1,
|
||||
VIMS_ALLOW_ANY,
|
||||
SAMPLE_ID_HELP,
|
||||
0,
|
||||
NULL );
|
||||
|
||||
index_map_[VIMS_SAMPLE_SKIP_FRAME] = _new_event(
|
||||
"%d %d",
|
||||
VIMS_SAMPLE_SKIP_FRAME,
|
||||
"Skip N frames forward",
|
||||
vj_event_inc_frame,
|
||||
2,
|
||||
VIMS_ALLOW_ANY,
|
||||
SAMPLE_ID_HELP,
|
||||
0,
|
||||
"Number of frames", // param label
|
||||
1, // default
|
||||
NULL );
|
||||
|
||||
index_map_[VIMS_VIDEO_PREV_FRAME] = _new_event(
|
||||
"%d",
|
||||
VIMS_VIDEO_PREV_FRAME,
|
||||
index_map_[VIMS_SAMPLE_PREV_FRAME] = _new_event(
|
||||
"%d %d",
|
||||
VIMS_SAMPLE_PREV_FRAME,
|
||||
"Skip N frames backward",
|
||||
vj_event_dec_frame,
|
||||
1,
|
||||
2,
|
||||
VIMS_ALLOW_ANY,
|
||||
SAMPLE_ID_HELP,
|
||||
0,
|
||||
"Number of frames",
|
||||
1,
|
||||
NULL );
|
||||
|
||||
index_map_[VIMS_VIDEO_SKIP_SECOND] = _new_event(
|
||||
"%d",
|
||||
VIMS_VIDEO_SKIP_SECOND,
|
||||
index_map_[VIMS_SAMPLE_SKIP_SECOND] = _new_event(
|
||||
"%d %d",
|
||||
VIMS_SAMPLE_SKIP_SECOND,
|
||||
"Skip N seconds forward",
|
||||
vj_event_next_second,
|
||||
1,
|
||||
2,
|
||||
VIMS_ALLOW_ANY,
|
||||
SAMPLE_ID_HELP,
|
||||
0,
|
||||
"Number of seconds",
|
||||
1,
|
||||
NULL );
|
||||
|
||||
index_map_[VIMS_VIDEO_PREV_SECOND] = _new_event(
|
||||
"%d",
|
||||
VIMS_VIDEO_PREV_SECOND,
|
||||
index_map_[VIMS_SAMPLE_PREV_SECOND] = _new_event(
|
||||
"%d %d",
|
||||
VIMS_SAMPLE_PREV_SECOND,
|
||||
"Skip N seconds backward",
|
||||
vj_event_prev_second,
|
||||
1,
|
||||
2,
|
||||
VIMS_ALLOW_ANY,
|
||||
SAMPLE_ID_HELP,
|
||||
0,
|
||||
"Number of seconds",
|
||||
1,
|
||||
NULL );
|
||||
|
||||
index_map_[VIMS_VIDEO_GOTO_START] = _new_event(
|
||||
NULL,
|
||||
VIMS_VIDEO_GOTO_START,
|
||||
index_map_[VIMS_SAMPLE_GOTO_START] = _new_event(
|
||||
"%d",
|
||||
VIMS_SAMPLE_GOTO_START,
|
||||
"Go to starting position",
|
||||
vj_event_goto_start,
|
||||
0,
|
||||
VIMS_ALLOW_ANY,
|
||||
NULL );
|
||||
|
||||
index_map_[VIMS_VIDEO_GOTO_END] = _new_event(
|
||||
NULL,
|
||||
VIMS_VIDEO_GOTO_END,
|
||||
"Go to ending position",
|
||||
vj_event_goto_end,
|
||||
0,
|
||||
VIMS_ALLOW_ANY,
|
||||
NULL );
|
||||
|
||||
index_map_[VIMS_VIDEO_SET_SPEED] = _new_event(
|
||||
"%d",
|
||||
VIMS_VIDEO_SET_SPEED,
|
||||
"Change trickplay speed",
|
||||
vj_event_play_speed,
|
||||
1,
|
||||
VIMS_ALLOW_ANY,
|
||||
SAMPLE_ID_HELP,
|
||||
0,
|
||||
NULL );
|
||||
|
||||
index_map_[VIMS_SAMPLE_GOTO_END] = _new_event(
|
||||
"%d",
|
||||
VIMS_SAMPLE_GOTO_END,
|
||||
"Go to ending position",
|
||||
vj_event_goto_end,
|
||||
1,
|
||||
VIMS_ALLOW_ANY,
|
||||
SAMPLE_ID_HELP,
|
||||
0,
|
||||
NULL );
|
||||
|
||||
index_map_[VIMS_SAMPLE_SET_SPEED] = _new_event(
|
||||
"%d %d",
|
||||
VIMS_SAMPLE_SET_SPEED,
|
||||
"Change trickplay speed",
|
||||
vj_event_play_speed,
|
||||
2,
|
||||
VIMS_ALLOW_ANY,
|
||||
SAMPLE_ID_HELP,
|
||||
0,
|
||||
"Frame step",
|
||||
1,
|
||||
NULL );
|
||||
|
||||
index_map_[VIMS_VIDEO_SET_FRAME] = _new_event(
|
||||
"%d",
|
||||
VIMS_VIDEO_SET_FRAME,
|
||||
index_map_[VIMS_SAMPLE_SET_FRAME] = _new_event(
|
||||
"%d %d",
|
||||
VIMS_SAMPLE_SET_FRAME,
|
||||
"Set current frame number",
|
||||
vj_event_set_frame,
|
||||
1,
|
||||
2,
|
||||
VIMS_REQUIRE_ALL_PARAMS,
|
||||
SAMPLE_ID_HELP,
|
||||
0,
|
||||
"Frame number",
|
||||
0,
|
||||
NULL );
|
||||
|
||||
#ifdef HAVE_XML2
|
||||
index_map_[VIMS_SAMPLE_LOAD_SAMPLELIST] = _new_event(
|
||||
"%s",
|
||||
VIMS_SAMPLE_LOAD_SAMPLELIST,
|
||||
index_map_[VIMS_SAMPLE_LOAD] = _new_event(
|
||||
"%d %s",
|
||||
VIMS_SAMPLE_LOAD,
|
||||
"Load samples from file",
|
||||
vj_event_sample_load_list,
|
||||
1,
|
||||
2,
|
||||
VIMS_REQUIRE_ALL_PARAMS,
|
||||
SAMPLE_ID_HELP,
|
||||
0,
|
||||
"Filename",
|
||||
NULL,
|
||||
NULL );
|
||||
index_map_[VIMS_SAMPLE_SAVE_SAMPLELIST] = _new_event(
|
||||
"%s",
|
||||
VIMS_SAMPLE_SAVE_SAMPLELIST,
|
||||
|
||||
index_map_[VIMS_SAMPLE_SAVE] = _new_event(
|
||||
"%d %s",
|
||||
VIMS_SAMPLE_SAVE,
|
||||
"Save samples to file",
|
||||
vj_event_sample_save_list,
|
||||
1,
|
||||
2,
|
||||
VIMS_REQUIRE_ALL_PARAMS,
|
||||
SAMPLE_ID_HELP,
|
||||
0,
|
||||
"Filename",
|
||||
NULL,
|
||||
NULL );
|
||||
@@ -529,15 +556,6 @@ void vj_init_vevo_events(void)
|
||||
0,
|
||||
NULL );
|
||||
|
||||
index_map_[VIMS_SAMPLE_DEL_ALL] = _new_event(
|
||||
NULL,
|
||||
VIMS_SAMPLE_DEL_ALL,
|
||||
"Delete all samples (caution!)",
|
||||
vj_event_sample_clear_all,
|
||||
0,
|
||||
VIMS_ALLOW_ANY,
|
||||
NULL );
|
||||
|
||||
index_map_[VIMS_SAMPLE_COPY] = _new_event(
|
||||
"%d",
|
||||
VIMS_SAMPLE_COPY,
|
||||
@@ -560,9 +578,9 @@ void vj_init_vevo_events(void)
|
||||
0,
|
||||
NULL );
|
||||
|
||||
index_map_[VIMS_CHAIN_CLEAR] = _new_event(
|
||||
index_map_[VIMS_SAMPLE_CHAIN_CLEAR] = _new_event(
|
||||
"%d",
|
||||
VIMS_CHAIN_CLEAR,
|
||||
VIMS_SAMPLE_CHAIN_CLEAR,
|
||||
"Reset Effect Chain",
|
||||
vj_event_chain_clear,
|
||||
1,
|
||||
@@ -571,9 +589,9 @@ void vj_init_vevo_events(void)
|
||||
0,
|
||||
NULL );
|
||||
|
||||
index_map_[VIMS_CHAIN_ENTRY_SET_ACTIVE] = _new_event(
|
||||
index_map_[VIMS_SAMPLE_CHAIN_ENTRY_SET_ACTIVE] = _new_event(
|
||||
"%d %d %d",
|
||||
VIMS_CHAIN_ENTRY_SET_ACTIVE,
|
||||
VIMS_SAMPLE_CHAIN_ENTRY_SET_ACTIVE,
|
||||
"Activate or deactivate processing of a fx slot",
|
||||
vj_event_chain_entry_set_active,
|
||||
3,
|
||||
@@ -586,9 +604,9 @@ void vj_init_vevo_events(void)
|
||||
1,
|
||||
NULL );
|
||||
|
||||
index_map_[VIMS_CHAIN_ENTRY_SET_FX] = _new_event(
|
||||
index_map_[VIMS_SAMPLE_CHAIN_ENTRY_SET_FX] = _new_event(
|
||||
"%d %d %s",
|
||||
VIMS_CHAIN_ENTRY_SET_FX,
|
||||
VIMS_SAMPLE_CHAIN_ENTRY_SET_FX,
|
||||
"Put an Effect on a Entry",
|
||||
vj_event_chain_entry_set,
|
||||
3,
|
||||
@@ -601,9 +619,9 @@ void vj_init_vevo_events(void)
|
||||
NULL,
|
||||
NULL );
|
||||
|
||||
index_map_[VIMS_CHAIN_ENTRY_CLEAR] = _new_event(
|
||||
index_map_[VIMS_SAMPLE_CHAIN_ENTRY_CLEAR] = _new_event(
|
||||
"%d %d",
|
||||
VIMS_CHAIN_ENTRY_CLEAR,
|
||||
VIMS_SAMPLE_CHAIN_ENTRY_CLEAR,
|
||||
"Clear an entry",
|
||||
vj_event_chain_entry_clear,
|
||||
2,
|
||||
@@ -614,9 +632,9 @@ void vj_init_vevo_events(void)
|
||||
0,
|
||||
NULL );
|
||||
|
||||
index_map_[VIMS_CHAIN_ENTRY_SET_INPUT] = _new_event(
|
||||
index_map_[VIMS_SAMPLE_CHAIN_ENTRY_SET_INPUT] = _new_event(
|
||||
"%d %d %d %d",
|
||||
VIMS_CHAIN_ENTRY_SET_INPUT,
|
||||
VIMS_SAMPLE_CHAIN_ENTRY_SET_INPUT,
|
||||
"Set Input Channel",
|
||||
vj_event_chain_entry_set_input,
|
||||
4,
|
||||
@@ -631,9 +649,9 @@ void vj_init_vevo_events(void)
|
||||
0,
|
||||
NULL );
|
||||
|
||||
index_map_[VIMS_CHAIN_ENTRY_SET_VALUE] = _new_event(
|
||||
index_map_[VIMS_SAMPLE_CHAIN_ENTRY_SET_VALUE] = _new_event(
|
||||
"%d %d %d %s",
|
||||
VIMS_CHAIN_ENTRY_SET_VALUE,
|
||||
VIMS_SAMPLE_CHAIN_ENTRY_SET_VALUE,
|
||||
"Set Input parameter value",
|
||||
vj_event_chain_entry_set_parameter_value,
|
||||
4,
|
||||
@@ -648,9 +666,9 @@ void vj_init_vevo_events(void)
|
||||
NULL,
|
||||
NULL );
|
||||
|
||||
index_map_[VIMS_CHAIN_ENTRY_SET_ALPHA] = _new_event(
|
||||
index_map_[VIMS_SAMPLE_CHAIN_ENTRY_SET_ALPHA] = _new_event(
|
||||
"%d %d %d",
|
||||
VIMS_CHAIN_ENTRY_SET_ALPHA,
|
||||
VIMS_SAMPLE_CHAIN_ENTRY_SET_ALPHA,
|
||||
"Set opacity of an entry",
|
||||
vj_event_chain_entry_set_alpha,
|
||||
3,
|
||||
@@ -663,110 +681,68 @@ void vj_init_vevo_events(void)
|
||||
256,
|
||||
NULL );
|
||||
|
||||
|
||||
#ifdef USE_DISPLAY
|
||||
index_map_[VIMS_RESIZE_SCREEN] = _new_event(
|
||||
"%d %d %d %d",
|
||||
VIMS_RESIZE_SCREEN,
|
||||
"(OUT) Resize video display",
|
||||
vj_event_set_screen_size,
|
||||
4,
|
||||
VIMS_REQUIRE_ALL_PARAMS,
|
||||
"Width",
|
||||
0,
|
||||
"Height",
|
||||
0,
|
||||
"X offset",
|
||||
0,
|
||||
"Y offset",
|
||||
0,
|
||||
NULL );
|
||||
#endif
|
||||
index_map_[VIMS_EDITLIST_PASTE_AT] = _new_event(
|
||||
"%d",
|
||||
VIMS_EDITLIST_PASTE_AT,
|
||||
index_map_[VIMS_SAMPLE_EDL_PASTE_AT] = _new_event(
|
||||
"%d %d",
|
||||
VIMS_SAMPLE_EDL_PASTE_AT,
|
||||
"Paste frames from buffer at frame into edit descision list",
|
||||
vj_event_el_paste_at,
|
||||
1,
|
||||
2,
|
||||
VIMS_REQUIRE_ALL_PARAMS,
|
||||
"EDL position",
|
||||
SAMPLE_ID_HELP,
|
||||
0,
|
||||
"Position to insert frames",
|
||||
0,
|
||||
NULL );
|
||||
index_map_[VIMS_EDITLIST_CUT] = _new_event(
|
||||
"%d %d",
|
||||
VIMS_EDITLIST_CUT,
|
||||
|
||||
index_map_[VIMS_SAMPLE_EDL_CUT] = _new_event(
|
||||
"%d %d %d",
|
||||
VIMS_SAMPLE_EDL_CUT,
|
||||
"Cut frames from edit descision list to buffer",
|
||||
vj_event_el_cut,
|
||||
2,
|
||||
VIMS_REQUIRE_ALL_PARAMS,
|
||||
"EDL start position",
|
||||
3,
|
||||
VIMS_REQUIRE_ALL_PARAMS,
|
||||
SAMPLE_ID_HELP,
|
||||
0,
|
||||
"Starting position",
|
||||
0,
|
||||
"EDL end position",
|
||||
"Ending position",
|
||||
0,
|
||||
NULL );
|
||||
index_map_[VIMS_EDITLIST_COPY] = _new_event(
|
||||
"%d %d",
|
||||
VIMS_EDITLIST_COPY,
|
||||
|
||||
index_map_[VIMS_SAMPLE_EDL_COPY] = _new_event(
|
||||
"%d %d %d",
|
||||
VIMS_SAMPLE_EDL_COPY,
|
||||
"Copy frames from edit descision list to buffer",
|
||||
vj_event_el_copy,
|
||||
2,
|
||||
3,
|
||||
VIMS_REQUIRE_ALL_PARAMS,
|
||||
"EDL start position",
|
||||
SAMPLE_ID_HELP,
|
||||
0,
|
||||
"EDL end position",
|
||||
"Starting position",
|
||||
0,
|
||||
"Ending position",
|
||||
0,
|
||||
NULL );
|
||||
index_map_[VIMS_EDITLIST_CROP] = _new_event(
|
||||
|
||||
index_map_[VIMS_SAMPLE_EDL_DEL] = _new_event(
|
||||
"%d %d",
|
||||
VIMS_EDITLIST_CROP,
|
||||
"Crop frames from edit descision list to buffer",
|
||||
vj_event_el_crop,
|
||||
2,
|
||||
VIMS_REQUIRE_ALL_PARAMS,
|
||||
"EDL start position",
|
||||
0,
|
||||
"EDL end position",
|
||||
0,
|
||||
NULL );
|
||||
index_map_[VIMS_EDITLIST_DEL] = _new_event(
|
||||
"%d %d",
|
||||
VIMS_EDITLIST_DEL,
|
||||
VIMS_SAMPLE_EDL_DEL,
|
||||
"Delete frames from editlist (no undo!)",
|
||||
vj_event_el_del,
|
||||
2,
|
||||
3,
|
||||
VIMS_REQUIRE_ALL_PARAMS,
|
||||
"EDL start position",
|
||||
SAMPLE_ID_HELP,
|
||||
0,
|
||||
"EDL end position",
|
||||
"Starting position",
|
||||
0,
|
||||
"Ending position",
|
||||
0,
|
||||
NULL );
|
||||
index_map_[VIMS_EDITLIST_SAVE] = _new_event(
|
||||
"%d %d %s",
|
||||
VIMS_EDITLIST_SAVE,
|
||||
"Save (selection of) edit descision list to new file",
|
||||
vj_event_el_save_editlist,
|
||||
3,
|
||||
VIMS_LONG_PARAMS | VIMS_ALLOW_ANY,
|
||||
"EDL start position (0=start position)",
|
||||
0,
|
||||
"EDL end position (0=end position)",
|
||||
0,
|
||||
"Filename",
|
||||
NULL,
|
||||
NULL );
|
||||
index_map_[VIMS_EDITLIST_LOAD] = _new_event(
|
||||
|
||||
|
||||
index_map_[VIMS_SAMPLE_EDL_ADD] = _new_event(
|
||||
"%s",
|
||||
VIMS_EDITLIST_LOAD,
|
||||
"Load edit descision list from file",
|
||||
vj_event_el_load_editlist,
|
||||
1,
|
||||
VIMS_LONG_PARAMS | VIMS_REQUIRE_ALL_PARAMS,
|
||||
"Filename",
|
||||
NULL,
|
||||
NULL );
|
||||
index_map_[VIMS_EDITLIST_ADD] = _new_event(
|
||||
"%s",
|
||||
VIMS_EDITLIST_ADD,
|
||||
VIMS_SAMPLE_EDL_ADD,
|
||||
"Add video file to edit descision list",
|
||||
vj_event_el_add_video,
|
||||
1,
|
||||
@@ -774,166 +750,7 @@ void vj_init_vevo_events(void)
|
||||
"Filename",
|
||||
NULL,
|
||||
NULL );
|
||||
index_map_[VIMS_SAMPLE_LIST] = _new_event(
|
||||
"%d",
|
||||
VIMS_SAMPLE_LIST,
|
||||
"GUI: Get a list of all samples (unadvised!)",
|
||||
vj_event_send_sample_list,
|
||||
1,
|
||||
VIMS_ALLOW_ANY,
|
||||
"sample offset",
|
||||
0,
|
||||
NULL );
|
||||
/* index_map_[VIMS_BUNDLE] = _new_event(
|
||||
"%d",
|
||||
VIMS_BUNDLE,
|
||||
"Execute VIMS bundle",
|
||||
vj_event_do_bundled_msg,
|
||||
1,
|
||||
VIMS_REQUIRE_ALL_PARAMS,
|
||||
"Bundle ID",
|
||||
0,
|
||||
NULL );*/
|
||||
/*
|
||||
#ifdef HAVE_XML2
|
||||
index_map_[VIMS_BUNDLE_FILE] = _new_event(
|
||||
"%s",
|
||||
VIMS_BUNDLE_FILE,
|
||||
"Veejay load action file",
|
||||
vj_event_read_file,
|
||||
1,
|
||||
VIMS_LONG_PARAMS | VIMS_REQUIRE_ALL_PARAMS,
|
||||
"Filename",
|
||||
NULL ,
|
||||
NULL );
|
||||
#endif
|
||||
index_map_[VIMS_BUNDLE_DEL] = _new_event(
|
||||
"%d",
|
||||
VIMS_BUNDLE_DEL,
|
||||
"Delete a VIMS bundle",
|
||||
vj_event_bundled_msg_del,
|
||||
1,
|
||||
VIMS_REQUIRE_ALL_PARAMS,
|
||||
"Bundle ID",
|
||||
0,
|
||||
NULL );
|
||||
index_map_[VIMS_BUNDLE_LIST] = _new_event(
|
||||
NULL,
|
||||
VIMS_BUNDLE_LIST,
|
||||
"GUI: Get all bundles",
|
||||
vj_event_send_bundles,
|
||||
0,
|
||||
VIMS_ALLOW_ANY,
|
||||
NULL );
|
||||
index_map_[VIMS_VIMS_LIST] = _new_event(
|
||||
NULL,
|
||||
VIMS_VIMS_LIST,
|
||||
"GUI: Get all VIMS events",
|
||||
vj_event_send_vimslist,
|
||||
0,
|
||||
VIMS_ALLOW_ANY,
|
||||
NULL );
|
||||
index_map_[VIMS_BUNDLE_ADD] = _new_event(
|
||||
"%d %s",
|
||||
VIMS_BUNDLE_ADD,
|
||||
"Add a new bundle to the event list",
|
||||
vj_event_bundled_msg_add,
|
||||
2,
|
||||
VIMS_LONG_PARAMS | VIMS_REQUIRE_ALL_PARAMS,
|
||||
"Bundle ID (0=new, 1=overwrite existing)",
|
||||
0,
|
||||
"VIMS text",
|
||||
0,
|
||||
NULL );
|
||||
index_map_[VIMS_BUNDLE_CAPTURE] = _new_event(
|
||||
NULL,
|
||||
VIMS_BUNDLE_CAPTURE,
|
||||
"Capture Effect Chain to a new Bundle",
|
||||
vj_event_quick_bundle,
|
||||
0,
|
||||
VIMS_ALLOW_ANY,
|
||||
NULL );*/
|
||||
index_map_[VIMS_LOG] = _new_event(
|
||||
NULL,
|
||||
VIMS_LOG,
|
||||
"GUI: Get console output",
|
||||
vj_event_send_log,
|
||||
0,
|
||||
VIMS_ALLOW_ANY,
|
||||
NULL );
|
||||
/*
|
||||
#ifdef USE_DISPLAY
|
||||
index_map_[VIMS_BUNDLE_ATTACH_KEY] = _new_event(
|
||||
"%d %d %d %s",
|
||||
VIMS_BUNDLE_ATTACH_KEY,
|
||||
"Attach/Detach a Key to VIMS Event",
|
||||
vj_event_attach_detach_key,
|
||||
4,
|
||||
VIMS_ALLOW_ANY,
|
||||
"VIMS ID",
|
||||
0,
|
||||
"XK Key symbol",
|
||||
0,
|
||||
"XK Key modifier (0=none,1=alt,2=ctrl,3=shift)",
|
||||
0,
|
||||
"VIMS message",
|
||||
NULL,
|
||||
NULL );
|
||||
|
||||
#endif
|
||||
*/
|
||||
#ifdef USE_GDK_PIXBUF
|
||||
index_map_[VIMS_RGB24_IMAGE] = _new_event(
|
||||
"%d %d",
|
||||
VIMS_REQUIRE_ALL_PARAMS,
|
||||
"GUI: Get preview image (raw RGB24)",
|
||||
vj_event_get_scaled_image,
|
||||
2,
|
||||
VIMS_REQUIRE_ALL_PARAMS,
|
||||
"Width",
|
||||
0,
|
||||
"Height",
|
||||
0,
|
||||
NULL );
|
||||
index_map_[VIMS_SCREENSHOT] = _new_event(
|
||||
"%d %d %s",
|
||||
VIMS_SCREENSHOT,
|
||||
"Save output frame to file",
|
||||
vj_event_screenshot,
|
||||
3,
|
||||
VIMS_LONG_PARAMS | VIMS_REQUIRE_ALL_PARAMS,
|
||||
"Width",
|
||||
0,
|
||||
"Height",
|
||||
0,
|
||||
"Filename",
|
||||
NULL,
|
||||
NULL );
|
||||
#else
|
||||
#ifdef HAVE_JPEG
|
||||
index_map_[VIMS_SCREENSHOT] = _new_event(
|
||||
"%d %d %s",
|
||||
VIMS_SCREENSHOT,
|
||||
"Save output frame to file",
|
||||
vj_event_screenshot,
|
||||
3,
|
||||
VIMS_LONG_PARAMS | VIMS_REQUIRE_ALL_PARAMS,
|
||||
"Width",
|
||||
0,
|
||||
"Height",
|
||||
0,
|
||||
"Filename",
|
||||
NULL,
|
||||
#endif
|
||||
#endif
|
||||
index_map_[VIMS_QUIT] = _new_event(
|
||||
NULL,
|
||||
VIMS_QUIT,
|
||||
"Quit Veejay (caution!)",
|
||||
vj_event_quit,
|
||||
0,
|
||||
VIMS_ALLOW_ANY,
|
||||
NULL );
|
||||
index_map_[VIMS_SET_VOLUME] = _new_event(
|
||||
"%d",
|
||||
VIMS_SET_VOLUME,
|
||||
@@ -960,32 +777,24 @@ void vj_init_vevo_events(void)
|
||||
0,
|
||||
VIMS_ALLOW_ANY,
|
||||
NULL );
|
||||
/*index_map_[VIMS_VIDEO_MCAST_START] = _new_event(
|
||||
NULL,
|
||||
VIMS_VIDEO_MCAST_START,
|
||||
"Start built-in UDP mcast server (YUV planar)",
|
||||
vj_event_mcast_start,
|
||||
|
||||
#ifdef USE_DISPLAY
|
||||
index_map_[VIMS_RESIZE_SCREEN] = _new_event(
|
||||
"%d %d %d %d",
|
||||
VIMS_RESIZE_SCREEN,
|
||||
"(OUT) Resize video display",
|
||||
vj_event_set_screen_size,
|
||||
4,
|
||||
VIMS_REQUIRE_ALL_PARAMS,
|
||||
"Width",
|
||||
0,
|
||||
VIMS_ALLOW_ANY,
|
||||
NULL );
|
||||
index_map_[VIMS_VIDEO_MCAST_STOP] = _new_event(
|
||||
NULL,
|
||||
VIMS_VIDEO_MCAST_STOP,
|
||||
"Stop built-in UDP mcast server",
|
||||
vj_event_mcast_stop,
|
||||
"Height",
|
||||
0,
|
||||
VIMS_ALLOW_ANY ,
|
||||
NULL );
|
||||
*/
|
||||
index_map_[VIMS_GET_FRAME] = _new_event(
|
||||
NULL,
|
||||
VIMS_GET_FRAME,
|
||||
"TCP: Send a frame to a connected veejay client",
|
||||
vj_event_send_frame,
|
||||
"X offset",
|
||||
0,
|
||||
"Y offset",
|
||||
0,
|
||||
VIMS_ALLOW_ANY,
|
||||
NULL );
|
||||
#ifdef HAVE_SDL
|
||||
index_map_[VIMS_FULLSCREEN] = _new_event(
|
||||
"%d",
|
||||
VIMS_FULLSCREEN,
|
||||
@@ -996,8 +805,16 @@ void vj_init_vevo_events(void)
|
||||
"On = 1, Off=0",
|
||||
1,
|
||||
NULL );
|
||||
#endif
|
||||
|
||||
#endif
|
||||
index_map_[VIMS_QUIT] = _new_event(
|
||||
NULL,
|
||||
VIMS_QUIT,
|
||||
"Quit Veejay (caution!)",
|
||||
vj_event_quit,
|
||||
0,
|
||||
VIMS_ALLOW_ANY,
|
||||
NULL );
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1276,6 +1276,150 @@ int sample_append_file( const char *filename, long n1, long n2, long n3 )
|
||||
return 1;
|
||||
}
|
||||
|
||||
int sample_edl_copy( void *current_sample, uint64_t start, uint64_t end )
|
||||
{
|
||||
sample_runtime_data *srd = (sample_runtime_data*) current_sample;
|
||||
uint64_t n = vj_el_get_num_frames( srd->data );
|
||||
if( start < 0 || start >= n || end < 0 || end >= n )
|
||||
{
|
||||
veejay_msg(0, "Invalid start or end position");
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64_t len = 0;
|
||||
void *frames = (void*) vj_el_edit_copy( srd->data,start,end,&len );
|
||||
|
||||
if(!frames || len <= 0 )
|
||||
{
|
||||
veejay_msg(0, "EDL is empty");
|
||||
}
|
||||
|
||||
void *prevlist = NULL;
|
||||
if( vevo_property_get( srd->info_port, "edl_buffer", 0, &prevlist ) == VEVO_NO_ERROR )
|
||||
{
|
||||
free(prevlist);
|
||||
}
|
||||
|
||||
int error = vevo_property_set( srd->info_port, "edl_buffer", VEVO_ATOM_TYPE_VOIDPTR,1,&frames );
|
||||
#ifdef STRICT_CHECKING
|
||||
assert( error == VEVO_NO_ERROR );
|
||||
#endif
|
||||
|
||||
error = vevo_property_set( srd->info_port, "edl_buffer_len", VEVO_ATOM_TYPE_UINT64,1,&len );
|
||||
#ifdef STRICT_CHECKING
|
||||
assert( error == VEVO_NO_ERROR );
|
||||
#endif
|
||||
veejay_msg(2, "Copied frames %ld - %ld to buffer", start,end);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int sample_edl_delete( void *current_sample, uint64_t start, uint64_t end )
|
||||
{
|
||||
sample_runtime_data *srd = (sample_runtime_data*) current_sample;
|
||||
uint64_t n = vj_el_get_num_frames( srd->data );
|
||||
if( start < 0 || start >= n || end < 0 || end >= n )
|
||||
{
|
||||
veejay_msg(0, "Invalid start or end position");
|
||||
return 0;
|
||||
}
|
||||
int success = vj_el_edit_del( srd->data, start, end );
|
||||
if(success)
|
||||
{
|
||||
veejay_msg(0, "Deleted frames %ld - %ld from EDL",start,end);
|
||||
sampleinfo_t *sit = srd->info;
|
||||
n = vj_el_get_num_frames(srd->data);
|
||||
if( sit->start_pos > n )
|
||||
sit->start_pos = 0;
|
||||
if( sit->end_pos > n )
|
||||
sit->end_pos = n;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sample_edl_paste_from_buffer( void *current_sample, uint64_t insert_at )
|
||||
{
|
||||
sample_runtime_data *srd = (sample_runtime_data*) current_sample;
|
||||
|
||||
void *prevlist = NULL;
|
||||
if( vevo_property_get( srd->info_port, "edl_buffer", 0, &prevlist ) != VEVO_NO_ERROR )
|
||||
{
|
||||
veejay_msg(0, "Nothing in buffer to paste");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if( insert_at < 0 || insert_at >= vj_el_get_num_frames( srd->data ) )
|
||||
{
|
||||
veejay_msg(0, "Cannot paste beyond last frame of EDL");
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64_t *fl = (uint64_t*) prevlist;
|
||||
uint64_t len = 0;
|
||||
|
||||
int error = vevo_property_get( srd->info_port, "edl_buffer_len", 0, &len );
|
||||
#ifdef STRICT_CHECKING
|
||||
assert( error == VEVO_NO_ERROR );
|
||||
#endif
|
||||
int n = vj_el_edit_paste( srd->data, insert_at, fl, len );
|
||||
|
||||
if( n <= 0 )
|
||||
{
|
||||
veejay_msg(0, "Cannot paste buffer at position %ld", insert_at );
|
||||
return 0;
|
||||
}
|
||||
|
||||
veejay_msg(1, "Pasted %ld frames from buffer to position %ld", len, insert_at );
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int sample_edl_cut_to_buffer( void *current_sample, uint64_t start_pos, uint64_t end_pos )
|
||||
{
|
||||
sample_runtime_data *srd = (sample_runtime_data*) current_sample;
|
||||
sampleinfo_t *sit = srd->info;
|
||||
|
||||
|
||||
if(srd->type != VJ_TAG_TYPE_NONE )
|
||||
{
|
||||
veejay_msg(0, "This sample has no EDL");
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64_t len = 0;
|
||||
void *frames = (void*) vj_el_edit_copy( srd->data,start_pos,end_pos,&len );
|
||||
|
||||
if(!frames || len <= 0 )
|
||||
{
|
||||
veejay_msg(0, "EDL is empty");
|
||||
}
|
||||
|
||||
void *prevlist = NULL;
|
||||
if( vevo_property_get( srd->info_port, "edl_buffer", 0, &prevlist ) == VEVO_NO_ERROR )
|
||||
{
|
||||
free(prevlist);
|
||||
}
|
||||
|
||||
int error = vevo_property_set( srd->info_port, "edl_buffer", VEVO_ATOM_TYPE_VOIDPTR,1,&frames );
|
||||
#ifdef STRICT_CHECKING
|
||||
assert( error == VEVO_NO_ERROR );
|
||||
#endif
|
||||
|
||||
error = vevo_property_set( srd->info_port, "edl_buffer_len", VEVO_ATOM_TYPE_UINT64,1,&len );
|
||||
|
||||
int n = vj_el_edit_del( srd->data, start_pos,end_pos );
|
||||
|
||||
uint64_t last = vj_el_get_num_frames( srd->data );
|
||||
|
||||
if( sit->start_pos > last )
|
||||
sit->start_pos = 0;
|
||||
if( sit->end_pos > last )
|
||||
sit->end_pos = last;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void sample_increase_frame( void *current_sample )
|
||||
{
|
||||
@@ -1860,12 +2004,6 @@ void sample_process_fx_chain( void *srd )
|
||||
}
|
||||
}
|
||||
|
||||
static void edl_copy( void *sample, uint64_t start, uint64_t end )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
static void sample_get_position_info(void *port , uint64_t *start, uint64_t *end, int *loop, int *speed)
|
||||
{
|
||||
vevo_property_get( port, "start_pos", 0,start );
|
||||
|
||||
@@ -114,4 +114,11 @@ void *sample_get_fx_port_channels_ptr( int id, int fx_entry );
|
||||
|
||||
int sample_get_key_ptr( void *sample );
|
||||
|
||||
int sample_edl_delete( void *current_sample, uint64_t start, uint64_t end );
|
||||
|
||||
int sample_edl_paste_from_buffer( void *current_sample, uint64_t insert_at );
|
||||
|
||||
int sample_edl_cut_to_buffer( void *current_sample, uint64_t start_pos, uint64_t end_pos );
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user