summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorniels <niels@dyne.org>2013-03-29 13:44:45 (GMT)
committer niels <niels@dyne.org>2013-03-29 13:44:45 (GMT)
commit7e6a157c3fd347c033b87a0a977720b715e1fcc6 (patch)
tree6f92927639db38cd474a94c36cc95ea0c9480a88
parentf61e4c98eff08ee167f9eca15c56deb8f2481f84 (diff)
parent8a237aa206124245fdfaf4f03f552538852142a4 (diff)
Merge branch 'master' into veejay-1.6veejay-1.6
Conflicts: veejay-current/veejay-server/configure.ac
-rw-r--r--veejay-current/sendVIMS/Makefile4
-rw-r--r--veejay-current/sendVIMS/sendVIMS.c33
-rw-r--r--veejay-current/veejay-client/configure.ac10
-rw-r--r--veejay-current/veejay-client/src/callback.c40
-rw-r--r--veejay-current/veejay-client/src/curve.c7
-rw-r--r--veejay-current/veejay-server/configure.ac5
-rw-r--r--veejay-current/veejay-server/libplugger/freeframe-loader.c82
-rw-r--r--veejay-current/veejay-server/libstream/v4l2utils.c19
-rw-r--r--veejay-current/veejay-server/libstream/vj-tag.c2
-rw-r--r--veejay-current/veejay-server/libvevo/vevo.c6
-rw-r--r--veejay-current/veejay-server/libvjmem/vj-x86.c2
-rw-r--r--veejay-current/veejay-server/libvjmem/vjmem.h2
-rw-r--r--veejay-current/veejay-server/libvjnet/vj-server.c19
-rw-r--r--veejay-current/veejay-server/veejay/liblavplayvj.c7
-rw-r--r--veejay-current/veejay-server/veejay/vj-event.c2
-rw-r--r--veejay-current/veejay-server/veejay/vjkf.c15
16 files changed, 130 insertions, 125 deletions
diff --git a/veejay-current/sendVIMS/Makefile b/veejay-current/sendVIMS/Makefile
index 632e56c..d9032b4 100644
--- a/veejay-current/sendVIMS/Makefile
+++ b/veejay-current/sendVIMS/Makefile
@@ -2,7 +2,7 @@ all: pd_linux
include Makefile.defs
-VERSION = 0.1.4
+VERSION = 0.1.5
.SUFFIXES: .pd_linux
@@ -17,7 +17,7 @@ PD_CFLAGS = -DPD
.c.pd_linux:
$(CC) $(PD_CFLAGS) $(OPTI_CFLAGS) $(DEBUG_CFLAGS) -DVERSION=\"$(VERSION)\" -o $*.o -c $*.c
- $(CC) -export_dynamic -shared -o $*.pd_linux $*.o -lm
+ $(CC) -rdynamic -shared -o $*.pd_linux $*.o -lm
strip --strip-unneeded $*.pd_linux
rm $*.o
diff --git a/veejay-current/sendVIMS/sendVIMS.c b/veejay-current/sendVIMS/sendVIMS.c
index 2bbd1a1..b031331 100644
--- a/veejay-current/sendVIMS/sendVIMS.c
+++ b/veejay-current/sendVIMS/sendVIMS.c
@@ -154,28 +154,35 @@ void setup_selectors(void){
pd_msg_t *pd_msg_new(char *msg){
int i, parsed, size = -1;
char *body = msg + 5;
- pd_msg_t *m = 0;
- int s[24];
+ pd_msg_t *m = NULL;
+ int s[27];
int n = 0;
-
- /* get 24 ints */
- n = sscanf(body, "%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d",
- s+0, s+1, s+2, s+3,
- s+4, s+5, s+6, s+7,
- s+8, s+9, s+10, s+11,
- s+12, s + 13, s + 14, s + 15, s + 16, s + 17, s + 18, s + 19, s + 20, s + 21, s + 22, s + 23, s + 24, s + 25, s + 26);
- if (n != 27) goto error;
+
+ /* get 26 ints */
+ n = sscanf(body, "%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d",
+ s+0, s+1, s+2, s+3,
+ s+4, s+5, s+6, s+7,
+ s+8, s+9, s+10, s+11,
+ s+12,s+13,s+14, s+15,
+ s+16,s+17,s+18, s+19,
+ s+20,s+21,s+22, s+23,
+ s+24,s+25);
+
+ if( n != 26 )
+ goto error;
/* create msg */
- m = malloc(sizeof(*m));
+ size_t est = n * sizeof(float) + sizeof(pd_msg_t); //@ malloc(sizeof(*m)) not ok
+ m = malloc(est);
m->selector = s_veejay; // not used
m->argc = n;
for(i=0; i<n; i++) SETFLOAT(m->argv + i, (float)s[i]);
return m;
error:
- msg_free(m);
- post("Parsed only %d out of %d status outlets", n,20 );
+ if( m )
+ msg_free(m);
+ post("Parsed only %d out of %d status outlets", n,26 );
return 0;
}
diff --git a/veejay-current/veejay-client/configure.ac b/veejay-current/veejay-client/configure.ac
index 16039f1..0dbecfd 100644
--- a/veejay-current/veejay-client/configure.ac
+++ b/veejay-current/veejay-client/configure.ac
@@ -1,12 +1,12 @@
dnl Process this file with autoconf to produce a configure script.
dnl AC_INIT
-AC_INIT([reloaded],[1.5.19],[nwelburg@gmail.com])
+AC_INIT([reloaded],[1.5.26],[nwelburg@gmail.com])
AC_PREREQ(2.57)
AC_CONFIG_SRCDIR([src/gveejay.c])
RELOADED_MAJOR_VERSION=1
RELOADED_MINOR_VERSION=5
-RELOADED_MICRO_VERSION=19
+RELOADED_MICRO_VERSION=26
RELOADED_VERSION=$VEEJAY_MAJOR_VERSION.$VEEJAY_MINOR_VERSION.$VEEJAY_MICRO_VERSION
RELOADED_CODENAME="Reloaded - build $RELOADED_MAJOR_VERSION $RELOADED_MINOR_VERSION $RELOADED_MICRO_VERSION"
AC_CONFIG_HEADERS([config.h])
@@ -178,7 +178,7 @@ fi
dnl Check for Veejay
have_veejay=false
-PKG_CHECK_MODULES( VEEJAY, [veejay >= 1.5.19 ],
+PKG_CHECK_MODULES( VEEJAY, [veejay >= 1.5.26 ],
[
AC_SUBST(VEEJAY_CFLAGS)
AC_SUBST(VEEJAY_LIBS)
@@ -188,7 +188,7 @@ PKG_CHECK_MODULES( VEEJAY, [veejay >= 1.5.19 ],
[have_veejay=false])
if test x$have_veejay != xtrue ; then
- AC_MSG_ERROR([Cannot find veejay 1.5.19 or later])
+ AC_MSG_ERROR([Cannot find veejay 1.5.26 or later])
fi
have_pixbuf=false
@@ -690,7 +690,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.19 : ${have_veejay}])
+AC_MSG_NOTICE([ - Veejay 1.5.26 : ${have_veejay}])
AC_MSG_NOTICE([ - POSIX Threads (pthread) : ${have_pthread}])
AC_MSG_NOTICE([ - FFmpeg AVCodec : ${have_avcodec} ])
AC_MSG_NOTICE([ - FFmpeg Swscaler : ${have_swscale} ])
diff --git a/veejay-current/veejay-client/src/callback.c b/veejay-current/veejay-client/src/callback.c
index 0a8ff64..012a778 100644
--- a/veejay-current/veejay-client/src/callback.c
+++ b/veejay-current/veejay-client/src/callback.c
@@ -2080,8 +2080,10 @@ void on_curve_buttonstore_clicked(GtkWidget *widget, gpointer user_data )
int end = get_nums( "curve_spinend" );
int start = get_nums( "curve_spinstart" );
+ const int length = end - start + 1;
- if( (end - start) <= 0 || id <= 0 )
+
+ if( (length) <= 0 || id <= 0 )
{
if( id <= 0 )
vj_msg(VEEJAY_MSG_INFO, "No FX set on entry %d",i);
@@ -2101,31 +2103,29 @@ void on_curve_buttonstore_clicked(GtkWidget *widget, gpointer user_data )
type = GTK_CURVE_TYPE_FREE;
}
- int len = end - start;
- float *data = (float*) vj_calloc(sizeof(float) * len );
- int *values = (int*) vj_calloc(sizeof(int) * len );
+ float *data = (float*) vj_calloc(sizeof(float) * length );
+ int *values = (int*) vj_calloc(sizeof(int) * length );
- unsigned char *kkf = (unsigned char*) vj_calloc( (len*4)+64);
+ unsigned char *kkf = (unsigned char*) vj_calloc( (length*4) + 64);
+ unsigned char *buf = (unsigned char*) vj_calloc( (length*4) + 64 );
int min=0,max=0;
- unsigned char *kf = kkf + 9; //@ reserve space for header
+ unsigned char *kf = kkf; //@ reserve space for header
_effect_get_minmax( id, &min,&max,j );
int k;
- get_points_from_curve( curve, len, data );
- for( k = 0 ; k < len ; k++ )
- values[k] = ( (int) ( data[k] * max ));
+ get_points_from_curve( curve, length, data );
+ for( k = 0 ; k < length ; k++ )
+ values[k] = min + ( (int) ( data[k] * max ));
- int total_len = 9;
int row_len = 3 + 2 + 2 + 8 + 8 + 2;
sprintf( (char*)kf, "key%02d%02d%08d%08d%02d",i,j,start,end,type );
- unsigned char *ptr = kf + row_len;
-
- total_len += row_len;
+ unsigned char *ptr = kkf + row_len;
+ int total_len = row_len;
- for( k = 0; k < len; k ++ )
+ for( k = 0; k <= length; k ++ )
{
unsigned char *p = ptr + (k*4);
p[0] = values[k] & 0xff;
@@ -2139,15 +2139,11 @@ void on_curve_buttonstore_clicked(GtkWidget *widget, gpointer user_data )
free(values);
free(data);
- char header[10];
- snprintf( header,10, "K%08d", total_len );
- for( k = 0; k < 9; k ++ )
- kkf[k] = header[k];
-
- printf("[%s]: %d\n", kkf,total_len );
-
- vj_client_send_buf( info->client, V_CMD, kkf,total_len );
+ sprintf( buf, "K%08d", total_len );
+ memcpy( buf + 9 , kkf, total_len );
+ vj_client_send_buf( info->client, V_CMD, buf,total_len );
free(kkf);
+ free(buf);
vj_msg( VEEJAY_MSG_INFO, "Saved new animation for parameter %d on entry %d, start at frame %d and end at frame %d",j,i,start,end );
diff --git a/veejay-current/veejay-client/src/curve.c b/veejay-current/veejay-client/src/curve.c
index 402b4e3..3f02280 100644
--- a/veejay-current/veejay-client/src/curve.c
+++ b/veejay-current/veejay-client/src/curve.c
@@ -49,7 +49,7 @@ int set_points_in_curve_ext( GtkWidget *curve, unsigned char *blob, int id, int
int start = 0, end =0,type=0;
int entry = 0;
int n = sscanf( (char*) blob, "key%2d%2d%8d%8d%2d", &entry, &parameter_id, &start, &end,&type );
- int len = end - start + 1;
+ int len = end - start;
int i;
int min = 0, max = 0;
#ifdef STRICT_CHECKING
@@ -69,7 +69,7 @@ int set_points_in_curve_ext( GtkWidget *curve, unsigned char *blob, int id, int
unsigned int k = 0;
unsigned char *in = blob + 25;
- float *vec = (float*) vj_calloc(sizeof(float) * len );
+ float *vec = (float*) vj_calloc(sizeof(float) * (len+1) );
for(i = start ; i < end; i ++ )
{
unsigned char *ptr = in + (i * 4);
@@ -82,9 +82,6 @@ int set_points_in_curve_ext( GtkWidget *curve, unsigned char *blob, int id, int
vec[k] = val;
k++;
-#ifdef STRICT_CHECKING
- assert( k < len );
-#endif
}
gtk_curve_set_vector( GTK_CURVE( curve ), len, vec );
diff --git a/veejay-current/veejay-server/configure.ac b/veejay-current/veejay-server/configure.ac
index 5733e5b..77507e8 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.25],[http://www.veejayhq.net])
+AC_INIT([veejay],[1.5.27],[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=25
+VEEJAY_MICRO_VERSION=27
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])
@@ -122,7 +122,6 @@ AC_PROG_LIBTOOL
dnl Checks for programs.
AC_PROG_AWK
AC_PROG_CC
-dnl AM_PROG_CC_STDC
AC_PROG_YACC
AM_PROG_LEX
AC_PROG_CXX
diff --git a/veejay-current/veejay-server/libplugger/freeframe-loader.c b/veejay-current/veejay-server/libplugger/freeframe-loader.c
index 457680d..9a63d06 100644
--- a/veejay-current/veejay-server/libplugger/freeframe-loader.c
+++ b/veejay-current/veejay-server/libplugger/freeframe-loader.c
@@ -182,34 +182,20 @@ void* deal_with_ff( void *handle, char *name, int w, int h )
vevo_property_set( port, "HOST_plugin_type", VEVO_ATOM_TYPE_INT, 1, &freeframe_signature_ );
int p;
- int randp = 0;
for( p= 0; p < n_params; p ++ )
{
+ int randp = 0;
int type = q( FF_GETPARAMETERTYPE, (LPVOID) p, 0 ).ivalue;
char *pname = q( FF_GETPARAMETERNAME, (LPVOID) p, 0 ).svalue;
-
- //@ for some reason, FF_GETPARAMETERDEFAULT .fvalue returns invalid values.
- randp = 0;
- int weirdo1 = q(FF_GETPARAMETERDEFAULT, (LPVOID) p, 0).ivalue;
- if( weirdo1 == FF_FAIL || weirdo1 == 139 ) { //@ magic value seen
- randp = 1;
- if(!bug_workarround1) bug_workarround1 = 1;
- }
- float weirdo2 = q(FF_GETPARAMETERDEFAULT,(LPVOID) p,0).fvalue;
- if( weirdo2 < 0.0f ) {
- randp = 1;
- if(!bug_workarround1) bug_workarround1 = 1;
- }
- // q(FF_GETPARAMTERDEFAULT,p,0).svalue gives garbage. FIXME
+ plugMainUnion v = q(FF_GETPARAMETERDEFAULT, (LPVOID) p, 0 );
+
+ float defval = v.fvalue;
int min = 0;
int max = 100;
int kind = -1;
- int dvalue = 0;
-
- if(!randp) //@ scale plugin's default to vje integer scale
- dvalue = (int) ( 100.0f * weirdo2);
+ int dvalue = (int) ( 100.0f * defval );
switch( type )
{
@@ -223,30 +209,23 @@ void* deal_with_ff( void *handle, char *name, int w, int h )
kind = HOST_PARAM_NUMBER;
max = 255;
min = 0;
- if(randp)
- dvalue = 0 + (int)(255.0 * (rand() / (RAND_MAX + 1.0)));
+ dvalue = (int) ( max * defval );
break;
case FF_TYPE_XPOS:
kind = HOST_PARAM_NUMBER;
min = 0;
max = w;
- if(randp)
- dvalue = 0 + (int)(w * (rand() / (RAND_MAX + 1.0)));
+ dvalue = 0 + (int)(w * defval);
break;
case FF_TYPE_YPOS:
kind = HOST_PARAM_NUMBER;
min = 0;
max = h;
- if(randp)
- dvalue = 0 + (int)(h * (rand() / (RAND_MAX + 1.0)));
+ dvalue = 0 + (int)(h * defval);
break;
case FF_TYPE_STANDARD:
kind = HOST_PARAM_NUMBER;
- min = 0;
- max = 100.0;
- if(randp)
- dvalue = 0 + (int)(10.0 * (rand() / (RAND_MAX + 1.0))); //@ initialize with low value
break;
default:
@@ -261,25 +240,11 @@ void* deal_with_ff( void *handle, char *name, int w, int h )
vevo_property_set( parameter, "max", VEVO_ATOM_TYPE_INT,1, &max );
vevo_property_set( parameter, "default",VEVO_ATOM_TYPE_INT,1,&dvalue);
vevo_property_set( parameter, "HOST_kind", VEVO_ATOM_TYPE_INT,1,&kind );
-#ifdef STRICT_CHECKING
- if(randp)
- veejay_msg(VEEJAY_MSG_WARNING, "Randomized default value to %d for '%s'", dvalue, pname );
-#endif
char key[20];
snprintf(key,20, "p%02d", p );
vevo_property_set( port, key, VEVO_ATOM_TYPE_VOIDPTR, 1, &parameter );
}
- if( bug_workarround1==1 ) {
- veejay_msg(VEEJAY_MSG_ERROR, "FreeFrame: garbage in value returning from FF_GETPARAMETERDEFAULT.");
- veejay_msg(VEEJAY_MSG_WARNING, "FreeFrame: apply workarround and initialize parameters with random values.");
- bug_workarround1++;
- }
-
- if(randp) {
- veejay_msg(VEEJAY_MSG_WARNING , "Randomized parameter values for '%s'", plugin_name);
- }
-
free(plugin_name);
return port;
@@ -529,6 +494,7 @@ void *freeframe_plug_init( void *plugin, int w, int h )
veejay_msg(VEEJAY_MSG_INFO, " feed parameter %d with random value %2.2f", p, value );
}
+ freeframe_copy_parameters( plugin, pluginstance, n_params );
}
return pluginstance;
@@ -634,8 +600,9 @@ void freeframe_plug_param_f( void *plugin, int seq_no, void *dargs )
// fetch parameter port
void *port = NULL;
int error = vevo_property_get( plugin, pkey, 0, &port );
- if( error != VEVO_NO_ERROR )
+ if( error != VEVO_NO_ERROR ) {
return;
+ }
int *args = (int*) dargs;
int in_val = args[0];
@@ -662,3 +629,30 @@ void freeframe_plug_param_f( void *plugin, int seq_no, void *dargs )
q( FF_SETPARAMETER, &sps, instance );
}
+
+
+
+void freeframe_copy_parameters( void *srcPort, void *dst, int n_params )
+{
+ int p;
+ for( p = 0; p < n_params; p ++ ) {
+ void *src = NULL;
+ char pname[32];
+ sprintf(pname, "p%02d", p );
+ int err = vevo_property_get( srcPort, pname, 0, &src );
+ if( err != 0 )
+ continue;
+ char **keys = vevo_list_properties(src);
+ if( keys == NULL )
+ continue;
+ void *dport = vpn( VEVO_ANONYMOUS_PORT );
+ int i;
+ for( i = 0; keys[i] != NULL ; i ++ ) {
+ err = vevo_property_clone( src, dport, keys[i] ,keys[i] );
+ free(keys[i]);
+ }
+ free(keys);
+ vevo_property_set( dst,pname, VEVO_ATOM_TYPE_PORTPTR, 1,&dport );
+ }
+}
+
diff --git a/veejay-current/veejay-server/libstream/v4l2utils.c b/veejay-current/veejay-server/libstream/v4l2utils.c
index 1be78bc..cd14f41 100644
--- a/veejay-current/veejay-server/libstream/v4l2utils.c
+++ b/veejay-current/veejay-server/libstream/v4l2utils.c
@@ -888,7 +888,6 @@ void *v4l2open ( const char *file, const int input_channel, int host_fmt, int wi
}
} else {
veejay_msg(VEEJAY_MSG_DEBUG, "v4l2: Preferring mmap() capture, override with VEEJAY_V4L2_CAPTURE_METHOD=0");
- can_read = 0;
cap_read = 1;
}
}
@@ -1007,9 +1006,11 @@ void *v4l2open ( const char *file, const int input_channel, int host_fmt, int wi
// munmap( v->buffer[k].start, v->buffer[k].length );
free(v->buffers);
- free(v);
- close(fd);
- return NULL;
+ //free(v);
+ //close(fd);
+ //return NULL;
+ v->rw = 1;
+ goto v4l2_rw_fallback;
}
}
@@ -1018,9 +1019,11 @@ void *v4l2open ( const char *file, const int input_channel, int host_fmt, int wi
if( v4l2_vidioc_qbuf( v ) == -1 ) {
veejay_msg(0, "v4l2: VIDIOC_QBUF failed with:%d, %s", errno,strerror(errno));
free(v->buffers);
- free(v);
- close(fd);
- return NULL;
+ // free(v);
+ // close(fd);
+ // return NULL;
+ v->rw = 1;
+ goto v4l2_rw_fallback;
}
if( !v4l2_start_video_capture( v ) ) {
@@ -1038,7 +1041,7 @@ void *v4l2open ( const char *file, const int input_channel, int host_fmt, int wi
free(v);
return NULL;
}
-
+ v->rw = 1;
goto v4l2_rw_fallback;
} else{
free(v->buffers);
diff --git a/veejay-current/veejay-server/libstream/vj-tag.c b/veejay-current/veejay-server/libstream/vj-tag.c
index c3f6a23..fd9b44f 100644
--- a/veejay-current/veejay-server/libstream/vj-tag.c
+++ b/veejay-current/veejay-server/libstream/vj-tag.c
@@ -3814,7 +3814,7 @@ int vj_tag_sprint_status( int tag_id,int cache,int sa, int ca, int pfps,int fram
//if (!tag)
//return -1;
- veejay_sprintf(str, 1024,
+ snprintf(str, 1024,
"%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d",
pfps,
frame,
diff --git a/veejay-current/veejay-server/libvevo/vevo.c b/veejay-current/veejay-server/libvevo/vevo.c
index 1f5bbb7..c0a4513 100644
--- a/veejay-current/veejay-server/libvevo/vevo.c
+++ b/veejay-current/veejay-server/libvevo/vevo.c
@@ -3769,7 +3769,7 @@ int vevo_property_clone( void *port, void *to_port, const char *key, const char
}
}
if( n > 0 ) {
- if( vevo_property_set( to_port, as_key, t, n, &tmp ) != VEVO_NO_ERROR ) {
+ if( vevo_property_set( to_port, as_key, t, n, tmp ) != VEVO_NO_ERROR ) {
#ifdef STRICT_CHECKING
veejay_msg(VEEJAY_MSG_DEBUG, "%s: %s -> %s unable to store %d elements (%d bytes)", __FUNCTION__, key,as_key, n, (n*sizeof(int32_t)));
#endif
@@ -3801,7 +3801,7 @@ int vevo_property_clone( void *port, void *to_port, const char *key, const char
}
if( n > 0 ) {
- if( vevo_property_set( to_port, as_key, t, n, &tmp ) != VEVO_NO_ERROR ) {
+ if( vevo_property_set( to_port, as_key, t, n, tmp ) != VEVO_NO_ERROR ) {
#ifdef STRICT_CHECKING
veejay_msg(VEEJAY_MSG_DEBUG, "%s: %s -> %s unable to store %d elements (%d bytes)", __FUNCTION__, key,as_key, n, (n*sizeof(double)));
#endif
@@ -3833,7 +3833,7 @@ int vevo_property_clone( void *port, void *to_port, const char *key, const char
}
if( n > 0 ) {
- if( vevo_property_set( to_port, as_key, t, n, &tmp ) != VEVO_NO_ERROR ) {
+ if( vevo_property_set( to_port, as_key, t, n, tmp ) != VEVO_NO_ERROR ) {
#ifdef STRICT_CHECKING
veejay_msg(VEEJAY_MSG_DEBUG, "%s: %s -> %s unable to store %d elements (%d bytes)", __FUNCTION__, key,as_key, n, (n*sizeof(double)));
#endif
diff --git a/veejay-current/veejay-server/libvjmem/vj-x86.c b/veejay-current/veejay-server/libvjmem/vj-x86.c
index c78972c..07d974c 100644
--- a/veejay-current/veejay-server/libvjmem/vj-x86.c
+++ b/veejay-current/veejay-server/libvjmem/vj-x86.c
@@ -173,7 +173,7 @@ void vj_mem_threaded_stop()
task_stop( tasks );
}
-void *vj_malloc_(unsigned int size)
+void *vj_malloc_(size_t size)
{
if( size <= 0 )
return NULL;
diff --git a/veejay-current/veejay-server/libvjmem/vjmem.h b/veejay-current/veejay-server/libvjmem/vjmem.h
index 5958942..91b937b 100644
--- a/veejay-current/veejay-server/libvjmem/vjmem.h
+++ b/veejay-current/veejay-server/libvjmem/vjmem.h
@@ -28,7 +28,7 @@ extern void vj_mem_init(void);
extern int vj_mem_threaded_init(int w, int h);
extern void vj_mem_threaded_stop(void);
extern char *get_memcpy_descr( void );
-extern void *vj_malloc_(unsigned int size);
+extern void *vj_malloc_(size_t size);
extern void *vj_calloc_(unsigned int size );
extern void *vj_strict_malloc(unsigned int size, const char *f, int line );
extern void *vj_strict_calloc(unsigned int size, const char *f, int line );
diff --git a/veejay-current/veejay-server/libvjnet/vj-server.c b/veejay-current/veejay-server/libvjnet/vj-server.c
index 5d8e51b..9749d11 100644
--- a/veejay-current/veejay-server/libvjnet/vj-server.c
+++ b/veejay-current/veejay-server/libvjnet/vj-server.c
@@ -800,7 +800,6 @@ static int _vj_verify_msg(vj_server *vje,int link_id, char *buf, int buf_len )
return num_msg;
}
-
static int _vj_parse_msg(vj_server *vje,int link_id, char *buf, int buf_len )
{
int i = 0;
@@ -811,12 +810,13 @@ static int _vj_parse_msg(vj_server *vje,int link_id, char *buf, int buf_len )
while( i < buf_len ) {
- char tmp_len[8];
+ char tmp_len[10];
char net_id[4];
int slen = 0;
int netid = 0;
char *str_ptr = &s[i];
+ memset( tmp_len, 0, sizeof(tmp_len));
if(s[i] == 'V')
{
@@ -858,9 +858,8 @@ static int _vj_parse_msg(vj_server *vje,int link_id, char *buf, int buf_len )
}
else if (s[i] == 'K' )
{
- str_ptr ++; //@ '[K][ ]
- //@ ^
-
+ str_ptr ++;
+
veejay_strncpy( tmp_len, str_ptr, 8 );
if( sscanf(tmp_len, "%08d", &slen) <= 0 )
@@ -869,14 +868,14 @@ static int _vj_parse_msg(vj_server *vje,int link_id, char *buf, int buf_len )
return 0;
}
- str_ptr += 8; // '[K][0][0][0][0][0][0][2][5][ ]'
- //@ ^
-
- v[num_msg]->msg = strndup( str_ptr, slen );
+ str_ptr += 8;
+
+ v[num_msg]->msg = (char*) vj_malloc( sizeof(char) * slen );
+ memcpy( v[num_msg]->msg, str_ptr, slen );
v[num_msg]->len = slen;
num_msg++;
- i += ( 8 + slen + 1);
+ i += ( 9 + slen );
} else {
veejay_msg(0, "VIMS: blob '%s' not recognized. First token must be either 'V' or 'K' followed by packet length.",
str_ptr );
diff --git a/veejay-current/veejay-server/veejay/liblavplayvj.c b/veejay-current/veejay-server/veejay/liblavplayvj.c
index bb7be96..29a4e5a 100644
--- a/veejay-current/veejay-server/veejay/liblavplayvj.c
+++ b/veejay-current/veejay-server/veejay/liblavplayvj.c
@@ -1335,7 +1335,7 @@ void veejay_pipe_write_status(veejay_t * info)
}
break;
case VJ_PLAYBACK_MODE_PLAIN:
- veejay_sprintf(info->status_what,1024, "%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %ld %d %d %d %d %d",
+ snprintf(info->status_what,1024, "%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %ld %d %d %d %d %d %d",
info->real_fps,
settings->current_frame_num,
info->uc->playback_mode,
@@ -1361,7 +1361,8 @@ void veejay_pipe_write_status(veejay_t * info)
0,
0,
0,
- mstatus );
+ mstatus,
+ 0 );
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,
@@ -1379,6 +1380,8 @@ void veejay_pipe_write_status(veejay_t * info)
info->uc->chain_changed = 0;
if (info->uc->render_changed == 1)
info->uc->render_changed = 0;
+
+
}
static char *veejay_concat_paths(char *path, char *suffix)
{
diff --git a/veejay-current/veejay-server/veejay/vj-event.c b/veejay-current/veejay-server/veejay/vj-event.c
index acb9405..dbbc20e 100644
--- a/veejay-current/veejay-server/veejay/vj-event.c
+++ b/veejay-current/veejay-server/veejay/vj-event.c
@@ -1473,7 +1473,7 @@ int vj_event_parse_msg( void *ptr, char *msg, int msg_len )
return 0;
}
-
+
veejay_memcpy(head,msg,4);
if( strncasecmp( head, "bun", 3 ) == 0 )
diff --git a/veejay-current/veejay-server/veejay/vjkf.c b/veejay-current/veejay-server/veejay/vjkf.c
index b173997..8a50e09 100644
--- a/veejay-current/veejay-server/veejay/vjkf.c
+++ b/veejay-current/veejay-server/veejay/vjkf.c
@@ -98,9 +98,9 @@ unsigned char *keyframe_pack( void *port, int parameter_id, int entry_id, int *r
free(k_e);
free(k_t);
- int len = end - start + 1;
+ int len = end - start;
- result = vj_calloc( (len*4) + 23 );
+ result = vj_calloc( (len*4) + 64 );
sprintf(result,"key%02d%02d%08d%08d%02d", entry_id,parameter_id,start, end, type );
@@ -129,6 +129,9 @@ unsigned char *keyframe_pack( void *port, int parameter_id, int entry_id, int *r
buf[2] = 0;
buf[3] = 0;
k++;
+#ifdef STRICT_CHECKING
+ veejay_msg(VEEJAY_MSG_DEBUG, "No keyframe at position %d", i );
+#endif
}
free(key);
@@ -149,7 +152,7 @@ int keyframe_unpack( unsigned char *in, int len, int *entry, int lookup, int is
int start = 0, end = 0, type = 0;
int fx_entry = 0;
int n = sscanf( in, "key%2d%2d%8d%8d%2d", &fx_entry,&parameter_id, &start, &end,&type );
-
+
if(n != 5 )
{
veejay_msg(0, "Unable to unpack parameter_id,start,end");
@@ -160,13 +163,17 @@ int keyframe_unpack( unsigned char *in, int len, int *entry, int lookup, int is
in += (25);
+ unsigned char *ptr = in;
for(i = start ; i < end; i ++ )
{
- unsigned char *ptr = in + (i * 4);
int value =
( ptr[0] | (ptr[1] << 8) | (ptr[2] << 16) | (ptr[3] << 24) );
char *key = keyframe_id( parameter_id, i );
vevo_property_set( port, key, VEVO_ATOM_TYPE_INT, 1, &value );
+#ifdef STRICT_CHECKING
+ veejay_msg(VEEJAY_MSG_DEBUG, "Parameter %d at pos %d has value %d", parameter_id, i, value );
+#endif
+ ptr += 4;
free(key);
}