diff --git a/veejay-current/veejay-client/configure.ac b/veejay-current/veejay-client/configure.ac index bfd0c117..99d908fa 100644 --- a/veejay-current/veejay-client/configure.ac +++ b/veejay-current/veejay-client/configure.ac @@ -184,17 +184,17 @@ fi dnl Check for Veejay have_veejay=false -PKG_CHECK_MODULES( VEEJAY, [veejay >= 1.5.49 ], +PKG_CHECK_MODULES( VEEJAY, [veejay >= 1.5.50 ], [ AC_SUBST(VEEJAY_CFLAGS) AC_SUBST(VEEJAY_LIBS) have_veejay=true - AC_DEFINE(HAVE_VEEJAY,1, [Veejay installed])] + AC_DEFINE(HAVE_VEEJAY,1, [Veejay 1.5.50 installed])] , [have_veejay=false]) if test x$have_veejay != xtrue ; then - AC_MSG_ERROR([Cannot find veejay 1.5.49 or later]) + AC_MSG_ERROR([Cannot find veejay 1.5.50 or later]) fi have_pixbuf=false @@ -697,7 +697,7 @@ AC_MSG_NOTICE([ Good luck! You can be the first! ]) fi AC_MSG_NOTICE([]) AC_MSG_NOTICE([ Required dependencies:]) -AC_MSG_NOTICE([ - Veejay 1.5.28 : ${have_veejay}]) +AC_MSG_NOTICE([ - Veejay 1.5.50 : ${have_veejay}]) AC_MSG_NOTICE([ - POSIX Threads (pthread) : ${have_pthread}]) AC_MSG_NOTICE([ - GDK Pixbuf support : ${have_pixbuf}]) AC_MSG_NOTICE([ - Alsa support (midi sequencer) : ${have_alsa}]) diff --git a/veejay-current/veejay-client/src/callback.c b/veejay-current/veejay-client/src/callback.c index c2d9b276..f78386e4 100644 --- a/veejay-current/veejay-client/src/callback.c +++ b/veejay-current/veejay-client/src/callback.c @@ -490,24 +490,8 @@ void on_button_el_addsample_clicked(GtkWidget *w, gpointer *user_data) int sample_id = 0; int result_len = 0; multi_vims( VIMS_EDITLIST_ADD_SAMPLE, "%d %s", 0, filename ); - - gchar *result = recv_vims( 3, &result_len ); - if( result <= 0||result == NULL ) - { - gveejay_popup_err( "Error" , "Unable to load video file. Please check Veejay's console to find out why."); - } - else - { - sscanf( result, "%5d", &sample_id ); - - if(sample_id <= 0 ) - gveejay_popup_err( "Error", "Unable to load video file. Please check Veejay's console to find out why."); - else - vj_msg(VEEJAY_MSG_INFO, "Created new sample %d from file %s", sample_id, filename); - g_free(result); - } - g_free(filename ); } + void on_button_el_delfile_clicked(GtkWidget *w, gpointer *user_data) { int frame = _el_ref_start_frame( info->uc.selected_el_entry ); @@ -2589,22 +2573,6 @@ void on_sampleadd_clicked(GtkWidget *widget, gpointer user_data) int sample_id = 0; // new sample int result_len = 0; multi_vims( VIMS_EDITLIST_ADD_SAMPLE, "%d %s", 0, filename ); - - gchar *result = recv_vims( 3, &result_len ); - if( result <= 0||result == NULL ) - { - gveejay_popup_err( "Error", "Cannot open video file. Please check Veejay's console to find out why"); - } - else - { - sscanf( result, "%5d", &sample_id ); - if(sample_id <= 0) - gveejay_popup_err( "Error", "Cannot open video file. Please check Veejay's console to find out why"); - else - vj_msg(VEEJAY_MSG_INFO, "Created new sample %d from file %s", sample_id, filename); - g_free(result); - } - g_free(filename ); } } diff --git a/veejay-current/veejay-client/src/vj-api.c b/veejay-current/veejay-client/src/vj-api.c index 43d00ff9..b85c4044 100644 --- a/veejay-current/veejay-client/src/vj-api.c +++ b/veejay-current/veejay-client/src/vj-api.c @@ -1996,17 +1996,15 @@ static void gveejay_error_slot( int mode ) all VIMS commands that create a new stream or a new sample */ int gveejay_new_slot(int mode) { - int id = 0; +/* int id = 0; int result_len = 0; gchar *result = recv_vims( 3, &result_len ); -#ifdef STRICT_CHECKING - //@ err - assert( result_len >= 0 ); - assert( result != NULL ); -#endif + + veejay_msg(0 ," -> EXPECT NEW SLOT in [%s]" ,result ); + if(result_len <= 0 ) { - veejay_msg(0, "No reply from veejay-server, but expected new sample/slot identifier"); + veejay_msg(0, "Maybe you should restart me"); return 0; } @@ -2016,12 +2014,11 @@ int gveejay_new_slot(int mode) if( id <= 0 ) { - veejay_msg(0, "Error creating new sample slot"); // gveejay_error_slot( mode ); return 0; } - - return id; +*/ + return 1; } void gveejay_popup_err( const char *type, char *msg ) @@ -4233,6 +4230,9 @@ static void load_samplelist_info(gboolean with_reset_slotselection) if( with_reset_slotselection ) { reset_samplebank(); } + char line[300]; + char source[255]; + char descr[255]; char tmp[5]; int slen = 1; @@ -4259,8 +4259,6 @@ static void load_samplelist_info(gboolean with_reset_slotselection) offset += 3; if(len > 0) { - char line[300]; - char descr[255]; veejay_memset( line,0,sizeof(line)); veejay_memset( descr,0,sizeof(descr)); strncpy( line, fxtext + offset, len ); @@ -4327,9 +4325,6 @@ static void load_samplelist_info(gboolean with_reset_slotselection) offset += 3; if(len > 0) { - char line[300]; - char source[255]; - char descr[255]; veejay_memset(line,0,sizeof(line)); veejay_memset(descr,0,sizeof(descr)); strncpy( line, fxtext + offset, len ); @@ -4346,19 +4341,19 @@ static void load_samplelist_info(gboolean with_reset_slotselection) strncpy( descr, line + 22, values[6] ); switch( values[1] ) { - case STREAM_CALI :sprintf(source,"calibrate %d",values[0]); + case STREAM_CALI :snprintf(source,sizeof(source),"calibrate %d",values[0]); break; - case STREAM_VIDEO4LINUX :sprintf(source,"capture %d",values[0]);break; - case STREAM_WHITE :sprintf(source,"solid %d",values[0]); + case STREAM_VIDEO4LINUX :snprintf(source,sizeof(source),"capture %d",values[0]);break; + case STREAM_WHITE :snprintf(source,sizeof(source),"solid %d",values[0]); break; - case STREAM_MCAST :sprintf(source,"multicast %d",values[0]);break; - case STREAM_NETWORK :sprintf(source,"unicast %d",values[0]);break; - case STREAM_YUV4MPEG :sprintf(source,"y4n %d",values[0]);break; - case STREAM_DV1394 :sprintf(source,"dv1394 %d",values[0]);break; - case STREAM_PICTURE :sprintf(source,"image %d",values[0]);break; - case STREAM_GENERATOR :sprintf(source,"Z%d",values[0]);break; + case STREAM_MCAST :snprintf(source,sizeof(source),"multicast %d",values[0]);break; + case STREAM_NETWORK :snprintf(source,sizeof(source),"unicast %d",values[0]);break; + case STREAM_YUV4MPEG :snprintf(source,sizeof(source),"y4m %d",values[0]);break; + case STREAM_DV1394 :snprintf(source,sizeof(source),"dv1394 %d",values[0]);break; + case STREAM_PICTURE :snprintf(source,sizeof(source),"image %d",values[0]);break; + case STREAM_GENERATOR :snprintf(source,sizeof(source),"Z%d",values[0]);break; default: - sprintf(source,"??? %d", values[0]); + snprintf(source,sizeof(source),"??? %d", values[0]); } gchar *gsource = _utf8str( descr ); gchar *gtype = _utf8str( source );