diff --git a/veejay-current/veejay-client/configure.ac b/veejay-current/veejay-client/configure.ac index a7aec4ec..b6635a7f 100644 --- a/veejay-current/veejay-client/configure.ac +++ b/veejay-current/veejay-client/configure.ac @@ -201,6 +201,21 @@ if test x$with_pixbuf != xno ; then [have_pixbuf=false]) fi +have_sdl=false +if test x$with_sdl != xno ; then + PKG_CHECK_MODULES(SDL, [sdl >= 1.2], + [ + AC_SUBST(SDL_CFLAGS) + AC_SUBST(SDL_LIBS) + have_sdl=true + AC_DEFINE(HAVE_SDL,1,[use sdl keybindings])], + [have_sdl=false]) +fi + +if test x$have_sdl != xtrue ; then + AC_MSG_WARN([Cannot find SDL, reloaded will not be able to map keybindings]) +fi + dnl ******************************************************************** dnl Check to see if __progname is provided by the system dnl ******************************************************************** @@ -522,12 +537,18 @@ fi AC_MSG_RESULT($CFLAGS) -PKG_CHECK_MODULES(LIBAVUTIL,[libavutil >= 49.7], have_avutil=true,have_avutil=false]) +PKG_CHECK_MODULES(LIBAVUTIL,[libavutil >= 49.7], have_avutil=true,have_avutil=false) if test x$have_avutil = xfalse; then AC_MSG_ERROR([libavutil not found.]) fi +PKG_CHECK_MODULES( LIBX11, x11, have_x11=true,have_x11=false) +if test x$have_x11 = xfalse; +then + AC_MSG_ERROR([libx11 not found.]) +fi + FFMPEG_CFLAGS="${LIBAVUTIL_CFLAGS}" AC_SUBST(FFMPEG_CFLAGS) dnl ********************************************************************** diff --git a/veejay-current/veejay-client/src/Makefile.am b/veejay-current/veejay-client/src/Makefile.am index 0a706424..8bd63ea2 100644 --- a/veejay-current/veejay-client/src/Makefile.am +++ b/veejay-current/veejay-client/src/Makefile.am @@ -1,8 +1,8 @@ ## Process this file with automake to produce Makefile.in MAINTAINERCLEANFILES = Makefile.in AM_CFLAGS=$(OP_CFLAGS) -INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src $(VEEJAY_CFLAGS) $(GTK_CFLAGS) \ - $(GLIB_CFLAGS) $(FFMPEG_CFLAGS) $(GLADE_CFLAGS) -DGNOMELOCALEDIR=\""$(datadir)/locale"\" -DRELOADED_DATADIR=\""$(reloaded_datadir)"\" + INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src $(VEEJAY_CFLAGS) $(GTK_CFLAGS) \ + $(GLIB_CFLAGS) $(FFMPEG_CFLAGS) $(GLADE_CFLAGS) -DGNOMELOCALEDIR=\""$(datadir)/locale"\" -DRELOADED_DATADIR=\""$(reloaded_datadir)"\" RELOADED_BIN=reloaded reloaded_SOURCES = gtkcolorsel.c gtkknob.c cellrendererspin.c gtktimeselection.c vj-midi.c curve.c utils.c tracksources.c gveejay.c keyboard.c sequence.c multitrack.c vj-api.c mjpeg_logging.c mpegconsts.c mpegtimecode.c yuv4mpeg.c yuv4mpeg_ratio.c ${reloaded_headers} @@ -11,5 +11,5 @@ bin_PROGRAMS = $(RELOADED_BIN) EXTRA_DIST = common.h curve.h fastintfns.h format_codes.h keyboard.h mjpeg_logging.h mjpeg_types.h mpegconsts.h mpegtimecode.h multitrack.h sequence.h tracksources.h utils.h videodev_mjpeg.h vj-api.h vmidi.h yuv4mpeg.h yuv4mpeg_intern.h cellrendererspin.h gtkcolorsel.h gtkhsv.h gtkknob.h gtktimeselection.h callback.c reloaded_LDFLAGS = $(VEEJAY_LIBS) $(GTK_LIBS) $(GLIB_LIBS) \ -$(GLADE_LIBS) $(ALSA_LIBS) -lgthread-2.0 -export-dynamic +$(GLADE_LIBS) $(ALSA_LIBS) $(LIBM_LIBS) $(LIBX11_LIBS) -lgthread-2.0 -export-dynamic diff --git a/veejay-current/veejay-client/src/callback.c b/veejay-current/veejay-client/src/callback.c index 012a7782..4c77e724 100644 --- a/veejay-current/veejay-client/src/callback.c +++ b/veejay-current/veejay-client/src/callback.c @@ -1357,6 +1357,7 @@ void on_vims_take_clicked(GtkWidget *widget, gpointer user_data) } void on_button_key_detach_clicked(GtkWidget *widget, gpointer user) { +#ifdef HAVE_SDL int key_val = info->uc.pressed_key; int key_mod = info->uc.pressed_mod; @@ -1374,10 +1375,12 @@ void on_button_key_detach_clicked(GtkWidget *widget, gpointer user) else vj_msg(VEEJAY_MSG_INFO, "Key binding %s released", strkey ); } +#endif } void on_vims_key_clicked( GtkWidget *widget, gpointer user_data) { +#ifdef HAVE_SDL char which_vims[128]; sprintf(which_vims, "Press a key to bind VIMS %03d", info->uc.selected_vims_entry ); @@ -1409,6 +1412,7 @@ void on_vims_key_clicked( GtkWidget *widget, gpointer user_data) event_id, sdlkey_by_id(key_val) ); } } +#endif } diff --git a/veejay-current/veejay-client/src/keyboard.c b/veejay-current/veejay-client/src/keyboard.c index 8dbd1192..36b253ae 100644 --- a/veejay-current/veejay-client/src/keyboard.c +++ b/veejay-current/veejay-client/src/keyboard.c @@ -16,8 +16,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - +#include #include +#ifdef HAVE_SDL #include "keyboard.h" static struct { @@ -327,4 +328,5 @@ gboolean key_snooper(GtkWidget *w, GdkEventKey *event, gpointer user_data) { return FALSE; } +#endif // gtk_key_snooper_install diff --git a/veejay-current/veejay-client/src/vj-api.c b/veejay-current/veejay-client/src/vj-api.c index ef978e7d..93918ea3 100644 --- a/veejay-current/veejay-client/src/vj-api.c +++ b/veejay-current/veejay-client/src/vj-api.c @@ -54,7 +54,9 @@ #include #include #include +#ifdef HAVE_SDL #include +#endif #include #include #include @@ -1577,9 +1579,22 @@ void about_dialog() char blob[1024]; char *os_str = produce_os_str(); - sprintf(blob, "Veejay - A visual instrument and realtime video sampler for GNU/Linux\n%s", os_str ); + const gchar *donate = +{ + "You can donate cryptocoins!\n"\ + "Bitcoin: 1PUNRsv8vDt1upTx9tTpY5sH8mHW1DTrKJ\n"\ + "Devcoin: 1DtYKQx6kLnCxX5S8atf6b3dD42A2UavvE\n"\ + "Litecoin: LcccLQCB7DbqGj9u52urRjVi43yYz7WeND\n"\ + "Feathercoin: 6i4G4C9jEZuL6R7vSspZ6JMAUP2zb6M1Yu\n" + +}; + + sprintf(blob, "Veejay - A visual instrument and realtime video sampler for GNU/Linux\n%s\n%s", os_str, donate ); + free(os_str); + + const gchar *license = { "This program is Free Software; You can redistribute it and/or modify\n" \ @@ -1628,6 +1643,7 @@ gboolean dialogkey_snooper( GtkWidget *w, GdkEventKey *event, gpointer user_data { return FALSE; } +#ifdef HAVE_SDL if(event->type == GDK_KEY_PRESS) { gchar tmp[100]; @@ -1648,11 +1664,11 @@ gboolean dialogkey_snooper( GtkWidget *w, GdkEventKey *event, gpointer user_data g_free(utf8_text); } } - +#endif return FALSE; } - -gboolean key_handler( GtkWidget *w, GdkEventKey *event, gpointer user_data) +#ifdef HAVE_SDL +static gboolean key_handler( GtkWidget *w, GdkEventKey *event, gpointer user_data) { if(event->type != GDK_KEY_PRESS) return FALSE; @@ -1667,7 +1683,7 @@ gboolean key_handler( GtkWidget *w, GdkEventKey *event, gpointer user_data) } return FALSE; } - +#endif static int check_format_string( char *args, char *format ) { if(!format || !args ) @@ -1735,7 +1751,7 @@ prompt_keydialog(const char *title, char *msg) gtk_container_add( GTK_CONTAINER(hbox1), arglabel ); gtk_container_add( GTK_CONTAINER(hbox1), pentry ); } - +#ifdef HAVE_SDL if( info->uc.selected_vims_entry ) { char tmp[100]; @@ -1757,7 +1773,7 @@ prompt_keydialog(const char *title, char *msg) gtk_entry_set_text( GTK_ENTRY(keyentry), tmp ); } } - +#endif gtk_container_add( GTK_CONTAINER( GTK_DIALOG( dialog )->vbox ), hbox1 ); gtk_container_add( GTK_CONTAINER( GTK_DIALOG( dialog )->vbox ), hbox2 ); @@ -4464,15 +4480,16 @@ gboolean int m=0; gchar *key = NULL; gchar *mod = NULL; - +#ifdef HAVE_SDL gtk_tree_model_get(model,&iter, VIMS_KEY, &key, -1); gtk_tree_model_get(model,&iter, VIMS_MOD, &mod, -1); - +#endif if(sscanf( vimsid, "%d", &event_id )) { +#ifdef HAVE_SDL k = sdlkey_by_name( key ); m = sdlmod_by_name( mod ); - +#endif info->uc.selected_vims_entry = event_id; if( event_id >= VIMS_BUNDLE_START && event_id < VIMS_BUNDLE_END ) @@ -4486,7 +4503,7 @@ gboolean if( n_params > 0 && text ) info->uc.selected_vims_args = strdup( text ); - + info->uc.selected_vims_accel[0] = m; info->uc.selected_vims_accel[1] = k; @@ -4805,8 +4822,13 @@ static void reload_bundles() gchar *g_descr = NULL; gchar *g_format = NULL; gchar *g_content = NULL; +#ifdef HAVE_SDL gchar *g_keyname = sdlkey_by_id( val[1] ); gchar *g_keymod = sdlmod_by_id( val[2] ); +#else + gchar *g_keyname = "N/A"; + gchar *g_keymod = ""; +#endif gchar *g_vims[5]; sprintf( (char*) g_vims, "%03d", val[0] ); @@ -7312,7 +7334,9 @@ gboolean is_alive( int *do_sync ) else { info->watch.state = STATE_PLAYING; +#ifdef HAVE_SDL info->key_id = gtk_key_snooper_install( key_handler , NULL); +#endif multrack_audoadd( info->mt, remote, port ); *do_sync = 1; if( user_preview ) { diff --git a/veejay-current/veejay-server/configure.ac b/veejay-current/veejay-server/configure.ac index a133ec7b..7184a5a2 100644 --- a/veejay-current/veejay-server/configure.ac +++ b/veejay-current/veejay-server/configure.ac @@ -1,12 +1,12 @@ dnl Process this file with autoconf to produce a configure script. dnl AC_INIT -AC_INIT([veejay],[1.5.29],[http://www.veejayhq.net]) +AC_INIT([veejay],[1.5.30],[http://www.veejayhq.net]) AC_PREREQ(2.57) AC_CONFIG_SRCDIR([veejay/veejay.c]) VEEJAY_MAJOR_VERSION=1 VEEJAY_MINOR_VERSION=5 -VEEJAY_MICRO_VERSION=29 +VEEJAY_MICRO_VERSION=30 VEEJAY_VERSION=$VEEJAY_MAJOR_VERSION.$VEEJAY_MINOR_VERSION.$VEEJAY_MICRO_VERSION VEEJAY_CODENAME="Veejay Classic - build $VEEJAY_MINOR_VERSION $VEEJAY_MICRO_VERSION" AC_CONFIG_HEADERS([config.h]) @@ -808,13 +808,21 @@ dnl ******************************************************************** dnl Check for the SDL library (for software playback) dnl (defines SDL_CFLAGS and SDL_LIBS) dnl ******************************************************************** +dnl have_sdl=false +dnl if test x$with_sdl != xno ; then +dnl AM_PATH_SDL(1.2.3,[ +dnl have_sdl=true +dnl AC_DEFINE(HAVE_SDL,, [SDL library present])],,) +dnl fi + have_sdl=false if test x$with_sdl != xno ; then -AM_PATH_SDL(1.2.3,[ - have_sdl=true - AC_DEFINE(HAVE_SDL,, [SDL library present])],,) +PKG_CHECK_MODULES( SDL, sdl >= 1.2, have_sdl=true,have_sdl=false) +if test x$have_sdl = xfalse ; then + AC_MSG_ERROR([Could not find SDL 1.2 library!]) +fi +AC_DEFINE(HAVE_SDL,1,[SDL library is installed]) fi - have_liblo=false PKG_CHECK_MODULES( LIBLO, liblo >= 0.26,have_liblo=true,have_liblo=false) if test x$have_liblo = xfalse ; then diff --git a/veejay-current/veejay-server/libel/lav_io.c b/veejay-current/veejay-server/libel/lav_io.c index 93922708..b2e03145 100644 --- a/veejay-current/veejay-server/libel/lav_io.c +++ b/veejay-current/veejay-server/libel/lav_io.c @@ -1853,8 +1853,7 @@ const char *lav_strerror(void) return AVI_strerror(); default: /* No or unknown video format */ - if(errno) strerror(errno); - else sprintf(error_string,"No or unknown video format"); + sprintf(error_string,"No or unknown video format"); return error_string; } } diff --git a/veejay-current/veejay-server/libstream/v4l2utils.c b/veejay-current/veejay-server/libstream/v4l2utils.c index facb82d2..3bf58db9 100644 --- a/veejay-current/veejay-server/libstream/v4l2utils.c +++ b/veejay-current/veejay-server/libstream/v4l2utils.c @@ -1171,13 +1171,15 @@ static int v4l2_pull_frame_intern( v4l2info *v ) if(!v->is_jpeg) v4l2_set_output_pointers( v,src ); - +#ifdef HAVE_JPEG if( v->is_jpeg == 1 ) { length = decode_jpeg_raw( src, n, 0,0, v->info->width,v->info->height,v->info->data[0],v->info->data[1],v->info->data[2] ); if( length == 0 ) { //@ success length = 1; } - } else if( v->is_jpeg == 2 ) { + } else +#endif + if( v->is_jpeg == 2 ) { AVPacket pkt; memset( &pkt, 0, sizeof(AVPacket)); pkt.data = src; @@ -1282,13 +1284,15 @@ int v4l2_pull_frame(void *vv,VJFrame *dst) if(!v->is_jpeg) v4l2_set_output_pointers( v,src ); - +#ifdef HAVE_JPEG if( v->is_jpeg == 1 ) { length = decode_jpeg_raw( src, n, 0,0, v->info->width,v->info->height,v->info->data[0],v->info->data[1],v->info->data[2] ); if( length == 0 ) { //@ success length = 1; } - } else if( v->is_jpeg == 2 ) { + } else +#endif + if( v->is_jpeg == 2 ) { AVPacket pkt; memset( &pkt, 0, sizeof(AVPacket)); pkt.data = src; diff --git a/veejay-current/veejay-server/veejay/liblavplayvj.c b/veejay-current/veejay-server/veejay/liblavplayvj.c index 6a3a381e..cc2bb976 100644 --- a/veejay-current/veejay-server/veejay/liblavplayvj.c +++ b/veejay-current/veejay-server/veejay/liblavplayvj.c @@ -1083,13 +1083,12 @@ static int veejay_screen_update(veejay_t * info ) vj_perform_get_primary_frame(info,frame); +#ifdef HAVE_SDL if(check_vp) { if( info->video_out == 0 ) { - if(!vj_sdl_lock( info->sdl[0] ) ) return 0; - composite_blit_yuyv( info->composite,frame, vj_sdl_get_yuv_overlay(info->sdl[0]),settings->composite); if(!vj_sdl_unlock( info->sdl[0]) ) return 0; @@ -1098,7 +1097,7 @@ static int veejay_screen_update(veejay_t * info ) skip_update = 1; } } - +#endif if( info->shm && vj_shm_get_status(info->shm) == 1 ) { int plane_sizes[4] = { info->effect_frame1->len, info->effect_frame1->uv_len, @@ -1139,7 +1138,8 @@ static int veejay_screen_update(veejay_t * info ) } #endif #endif - + +#ifdef HAVE_SDL if(skip_update) { if(info->video_out == 0 ) { for(i = 0 ; i < MAX_SDL_OUT; i ++ ) @@ -1157,7 +1157,7 @@ static int veejay_screen_update(veejay_t * info ) */ return 1; } - +#endif switch (info->video_out) { #ifdef HAVE_SDL @@ -1361,8 +1361,7 @@ void veejay_pipe_write_status(veejay_t * info) 0, 0, 0, - mstatus, - 0 ); + mstatus); break; case VJ_PLAYBACK_MODE_TAG: if( vj_tag_sprint_status( info->uc->sample_id,cache_used,info->seq->active,info->seq->current, info->real_fps, @@ -2453,7 +2452,7 @@ int veejay_init(veejay_t * info, int x, int y,char *arg, int def_tags, int gen_t if (seteuid(getuid()) < 0) { /* fixme: get rid of sys_errlist and use sys_strerror */ - veejay_msg(VEEJAY_MSG_ERROR, "Can't set effective user-id: %s", sys_errlist[errno]); + veejay_msg(VEEJAY_MSG_ERROR, "Can't set effective user-id: %s", strerror(errno)); return -1; } if(info->load_action_file ) { diff --git a/veejay-current/veejay-server/veejay/veejay.c b/veejay-current/veejay-server/veejay/veejay.c index 99014811..4374ea46 100644 --- a/veejay-current/veejay-server/veejay/veejay.c +++ b/veejay-current/veejay-server/veejay/veejay.c @@ -637,6 +637,10 @@ static void print_license() veejay_msg(VEEJAY_MSG_INFO, "The license must be included in the (source) package (COPYING)"); + + veejay_msg(VEEJAY_MSG_INFO, + "Veejay's BTC donation address: 1PUNRsv8vDt1upTx9tTpY5sH8mHW1DTrKJ"); + veejay_msg(VEEJAY_MSG_INFO, "\tLTC donation address: LcccLQCB7DbqGj9u52urRjVi43yYz7WeND"); } static void donothing(int sig) diff --git a/veejay-current/veejay-server/veejay/vj-event.c b/veejay-current/veejay-server/veejay/vj-event.c index c0397375..785eae44 100644 --- a/veejay-current/veejay-server/veejay/vj-event.c +++ b/veejay-current/veejay-server/veejay/vj-event.c @@ -358,12 +358,14 @@ veejay_msg(VEEJAY_MSG_INFO, "--------------------------------------------------- #define SEND_MSG(v,str)\ {\ -if(vj_server_send(v->vjs[VEEJAY_PORT_CMD], v->uc->current_link, (uint8_t*) str, strlen(str)) < 0) { \ +int bf_len = strlen(str);\ +if(bf_len && vj_server_send(v->vjs[VEEJAY_PORT_CMD], v->uc->current_link, (uint8_t*) str, bf_len) < 0) { \ _vj_server_del_client( v->vjs[VEEJAY_PORT_CMD], v->uc->current_link); \ _vj_server_del_client( v->vjs[VEEJAY_PORT_STA], v->uc->current_link); \ _vj_server_del_client( v->vjs[VEEJAY_PORT_DAT], v->uc->current_link);} \ } + /* some macros for commonly used checks */ #ifdef STRICT_CHECKING @@ -2676,9 +2678,9 @@ void vj_event_init_keyboard_defaults() void vj_event_init() { int i; - +#ifdef HAVE_SDL veejay_memset( keyboard_event_map_, 0, sizeof(keyboard_event_map_)); - +#endif vj_init_vevo_events(); #ifdef HAVE_SDL if( !(keyboard_events = hash_create( HASHCOUNT_T_MAX, int_bundle_compare, int_bundle_hash))) @@ -2962,10 +2964,13 @@ void vj_event_send_keylist( void *ptr, const char format[], va_list ap ) veejay_t *v = (veejay_t*) ptr; unsigned int i,len=0; char message[256]; - char *blob = vj_calloc( 1024 * 32 ); + char *blob = NULL; char line[512]; char header[7]; int skip = 0; +#ifdef HAVE_SDL + blob = vj_calloc( 1024 * 64 ); + if(!hash_isempty( keyboard_events )) { hscan_t scan; @@ -3006,11 +3011,12 @@ void vj_event_send_keylist( void *ptr, const char format[], va_list ap ) } } } - +#endif sprintf( header, "%06d", len ); SEND_MSG( v, header ); - SEND_MSG( v, blob ); + if( blob != NULL ) + SEND_MSG( v, blob ); free( blob ); @@ -7454,16 +7460,19 @@ void vj_event_viewport_frontback(void *ptr, const char format[], va_list ap) veejay_msg(VEEJAY_MSG_INFO, "Saved calibration to sample %d",v->uc->sample_id ); } composite_set_ui(v->composite, 0 ); +#ifdef HAVE_SDL if(v->video_out==0 || v->video_out == 2) vj_sdl_grab( v->sdl[0], 0 ); +#endif } else { composite_set_ui( v->composite, 1 ); v->settings->composite = 1; v->use_osd=3; +#ifdef HAVE_SDL if(v->video_out==0 || v->video_out == 2) vj_sdl_grab( v->sdl[0], 1 ); - +#endif veejay_msg(VEEJAY_MSG_INFO, "You can now calibrate your projection/camera, press CTRL-s again to exit."); } } diff --git a/veejay-current/veejay-server/veejay/vj-font.c b/veejay-current/veejay-server/veejay/vj-font.c index c7c26fd1..181e94f2 100644 --- a/veejay-current/veejay-server/veejay/vj-font.c +++ b/veejay-current/veejay-server/veejay/vj-font.c @@ -1105,8 +1105,10 @@ static int find_fonts(vj_font_t *ec, char *path) int n = scandir(path, &files, dir_selector,alphasort); if(n < 0) + { + veejay_msg(0, "Error reading %s: %s", path, strerror(errno)); return 0; - + } while( n -- ) { char tmp[1024]; diff --git a/veejay-current/veejay-server/veejay/vj-perform.c b/veejay-current/veejay-server/veejay/vj-perform.c index 1c33d395..c0f173ce 100644 --- a/veejay-current/veejay-server/veejay/vj-perform.c +++ b/veejay-current/veejay-server/veejay/vj-perform.c @@ -127,6 +127,9 @@ static const char *license = static const char *copyr = "(C) 2002-2013 Copyright N.Elburg et all (nwelburg@gmail.com)\n"; +static const char *donateaddr = + "Veejay's BTC donation address: 1PUNRsv8vDt1upTx9tTpY5sH8mHW1DTrKJ\n\tLTC donation address: LcccLQCB7DbqGj9u52urRjVi43yYz7WeND\n"; + #define MLIMIT(var, low, high) \ if((var) < (low)) { var = (low); } \ if((var) > (high)) { var = (high); } @@ -3160,7 +3163,7 @@ static char *vj_perform_print_credits( veejay_t *info ) { char text[1024]; veejay_memset(text,0,sizeof(text)); - snprintf(text, 1024,"This is Veejay version %s\n%s\n%s\n%s\n",VERSION,intro,copyr,license); + snprintf(text, 1024,"This is Veejay version %s\n%s\n%s\n%s\n%s",VERSION,intro,copyr,license,donateaddr); return strdup(text); } @@ -3358,12 +3361,15 @@ static void vj_perform_finish_render( veejay_t *info, video_playback_setup *sett sample_reload_config( info->composite,info->uc->sample_id, 1 ); // settings->composite); } +#ifdef HAVE_SDL if( info->video_out == 0 ) { //@ release focus vj_sdl_grab( info->sdl[0], 0 ); } +#endif } +#ifdef HAVE_SDL if( info->use_osd == 2 ) { osd_text = vj_perform_print_credits(info); placement= 1; @@ -3375,6 +3381,7 @@ static void vj_perform_finish_render( veejay_t *info, video_playback_setup *sett osd_text = viewport_get_my_help( composite_get_vp(info->composite ) ); more_text = vj_perform_osd_status(info); } +#endif } if( settings->composite ) {