summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorniels <niels@dyne.org>2010-10-24 16:40:32 (GMT)
committer niels <niels@dyne.org>2010-10-24 16:40:32 (GMT)
commit08db70de295cce54dd1dda67af0ac9a399cfa931 (patch)
treec2334a81bbb111a263617bf3a946090007f9f7c6
parenta666823e6a9d77181d3da94614b15585fcaec15a (diff)
-rw-r--r--veejay-current/veejay-server/libplugger/freeframe-loader.c10
-rw-r--r--veejay-current/veejay-server/libplugger/frei0r-loader.c12
-rw-r--r--veejay-current/veejay-server/libplugger/livido-loader.c138
-rw-r--r--veejay-current/veejay-server/libplugger/plugload.c164
-rw-r--r--veejay-current/veejay-server/libplugger/utility.c69
-rw-r--r--veejay-current/veejay-server/libplugger/utility.h3
6 files changed, 92 insertions, 304 deletions
diff --git a/veejay-current/veejay-server/libplugger/freeframe-loader.c b/veejay-current/veejay-server/libplugger/freeframe-loader.c
index 6625a96..9bb391c 100644
--- a/veejay-current/veejay-server/libplugger/freeframe-loader.c
+++ b/veejay-current/veejay-server/libplugger/freeframe-loader.c
@@ -75,7 +75,7 @@ void* deal_with_ff( void *handle, char *name )
if( q == NULL )
{
veejay_msg(VEEJAY_MSG_ERROR,"\tBad FreeFrame plugin '%s': %s", name, dlerror());
- vevo_port_free( port );
+ vpf( port );
return NULL;
}
@@ -84,7 +84,7 @@ void* deal_with_ff( void *handle, char *name )
if ((q(FF_GETPLUGINCAPS, (LPVOID)FF_CAP_V_BITS_VIDEO, 0)).ivalue != FF_TRUE)
{
veejay_msg(VEEJAY_MSG_ERROR, "FreeFrame plugin '%s' cannot handle 32 bit",name);
- vevo_port_free(port);
+ vpf(port);
return NULL;
}
@@ -92,7 +92,7 @@ void* deal_with_ff( void *handle, char *name )
if (pis->APIMajorVersion < 1)
{
veejay_msg(VEEJAY_MSG_ERROR, "Cowardly refusing FreeFrame API version < 1.0 (%s)",name );
- vevo_port_free(port);
+ vpf(port);
return NULL;
}
@@ -100,7 +100,7 @@ void* deal_with_ff( void *handle, char *name )
if ( (q(FF_INITIALISE, NULL, 0 )).ivalue == FF_FAIL )
{
veejay_msg(VEEJAY_MSG_ERROR, "Plugin '%s' unable to initialize", name);
- vevo_port_free(port);
+ vpf(port);
if(plugin_name) free(plugin_name);
return NULL;
}
@@ -109,7 +109,7 @@ void* deal_with_ff( void *handle, char *name )
if( n_params == FF_FAIL )
{
veejay_msg(VEEJAY_MSG_ERROR, "Cannot get number of parameters for plugin %s",name);
- vevo_port_free(port);
+ vpf(port);
if(plugin_name) free(plugin_name);
return NULL;
}
diff --git a/veejay-current/veejay-server/libplugger/frei0r-loader.c b/veejay-current/veejay-server/libplugger/frei0r-loader.c
index 058ec9a..604e368 100644
--- a/veejay-current/veejay-server/libplugger/frei0r-loader.c
+++ b/veejay-current/veejay-server/libplugger/frei0r-loader.c
@@ -122,7 +122,7 @@ void* deal_with_fr( void *handle, char *name)
if( f0r_init == NULL )
{
veejay_msg(VEEJAY_MSG_ERROR,"\tBorked frei0r plugin '%s': %s", name, dlerror());
- vevo_port_free( port );
+ vpf( port );
return NULL;
}
@@ -130,7 +130,7 @@ void* deal_with_fr( void *handle, char *name)
if( f0r_deinit == NULL )
{
veejay_msg(VEEJAY_MSG_ERROR,"\tBorked frei0r plugin '%s': %s", name, dlerror());
- vevo_port_free( port );
+ vpf( port );
return NULL;
}
@@ -138,7 +138,7 @@ void* deal_with_fr( void *handle, char *name)
if( f0r_info == NULL )
{
veejay_msg(VEEJAY_MSG_ERROR,"\tBorked frei0r plugin '%s': %s", name, dlerror());
- vevo_port_free( port );
+ vpf( port );
return NULL;
}
@@ -146,7 +146,7 @@ void* deal_with_fr( void *handle, char *name)
if( f0r_param == NULL )
{
veejay_msg(VEEJAY_MSG_ERROR,"\tBorked frei0r plugin '%s': %s", name, dlerror());
- vevo_port_free( port );
+ vpf( port );
return NULL;
}
//@ gamble
@@ -178,7 +178,7 @@ void* deal_with_fr( void *handle, char *name)
if( (*f0r_init)() == 0)
{
veejay_msg(VEEJAY_MSG_ERROR,"\tBorked frei0r plugin '%s': ", name);
- vevo_port_free( port );
+ vpf( port );
return NULL;
}
@@ -187,7 +187,7 @@ void* deal_with_fr( void *handle, char *name)
if( finfo.frei0r_version != FREI0R_MAJOR_VERSION )
{
(*f0r_deinit)();
- vevo_port_free(port);
+ vpf(port);
return NULL;
}
int extra = 0;
diff --git a/veejay-current/veejay-server/libplugger/livido-loader.c b/veejay-current/veejay-server/libplugger/livido-loader.c
index cbcd641..fb75974 100644
--- a/veejay-current/veejay-server/libplugger/livido-loader.c
+++ b/veejay-current/veejay-server/libplugger/livido-loader.c
@@ -52,6 +52,34 @@
#define IS_RGB_PALETTE( p ) ( p < 512 ? 1 : 0 )
+static char make_valid_char_( const char c )
+{
+ const char *invalid = " #*,?[]{}";
+ int k = 0;
+ char o = '_';
+ char r = c;
+ for( k = 0; k < 8 ; k ++ )
+ {
+ if ( c == invalid[k] || isspace((unsigned char)c))
+ return o;
+ char l = tolower(c);
+ if(l)
+ r = l;
+ }
+ return r;
+}
+
+char *veejay_valid_osc_name( const char *in )
+{
+ int n = strlen( in );
+ int k;
+ char *res = strdup( in );
+ for( k = 0; k < n ; k ++ )
+ {
+ res[k] = make_valid_char_( in[k] );
+ }
+ return res;
+}
static int pref_palette_ = 0;
static int pref_palette_ffmpeg_ = 0;
@@ -121,9 +149,6 @@ static int configure_channel( void *instance, const char *name, int channel_id,
void *channel = NULL;
int error = 0;
void *pd[4];
-#ifdef STRICT_CHECKING
- vjf_dump_frame( frame );
-#endif
error = vevo_property_get( instance, name, channel_id, &channel );
#ifdef STRICT_CHECKING
@@ -140,40 +165,15 @@ static int configure_channel( void *instance, const char *name, int channel_id,
#ifdef STRICT_CHECKING
assert( error == LIVIDO_NO_ERROR );
#endif
- int flags = 0;
- error = vevo_property_get( channel, "flags",0,&flags );
-
- pd[0] = (void*) frame->data[0];
- pd[1] = (void*) frame->data[1];
- pd[2] = (void*) frame->data[2];
- pd[3] = (void*) frame->data[3];
-
- if( flags & LIVIDO_FILTER_CAN_DO_INPLACE ) {
- if( name[0] =='o' ){ //@ set output_channels to inplace
- pd[0] = NULL; pd[1] = NULL; pd[2] = NULL; pd[3] = NULL;
- }
- } else {
- if(name[0] == 'i') {
- VJFrame *tmp = vjf_clone_frame(frame);
- pd[0] = (void*) tmp->data[0];
- pd[1] = (void*) tmp->data[1];
- pd[2] = (void*) tmp->data[2];
- pd[3] = (void*) tmp->data[3];
- vjf_dump_frame(tmp);
- char *stkey = vevo_create_key( "HOST_inplace", channel_id);
- error = vevo_property_set( channel, stkey, LIVIDO_ATOM_TYPE_VOIDPTR,1,&tmp );
-#ifdef STRICT_CHECKING
- assert( error == LIVIDO_NO_ERROR );
-#endif
- free(stkey);
- //@ FIXME: clean data
- }
- }
error = vevo_property_set( channel , "timecode", LIVIDO_ATOM_TYPE_DOUBLE,1, &(frame->timecode));
#ifdef STRICT_CHECKING
assert( error == LIVIDO_NO_ERROR );
#endif
+ pd[0] = (void*) frame->data[0];
+ pd[1] = (void*) frame->data[1];
+ pd[2] = (void*) frame->data[2];
+ pd[3] = (void*) frame->data[3];
error = vevo_property_set( channel, "pixel_data",LIVIDO_ATOM_TYPE_VOIDPTR, 4, &pd);
#ifdef STRICT_CHECKING
@@ -191,8 +191,6 @@ static int configure_channel( void *instance, const char *name, int channel_id,
chroma_supersample( hsampling, sampler, pd, frame->width,
frame->height );
}
-
-//@ FIXME: must allocate buffer to copy frame 0 to temporary and use temporary frame as input.
return 1;
}
@@ -718,11 +716,14 @@ static int init_channel_port(livido_port_t *ptr, livido_port_t *in_channel, int
}
error = vevo_property_get( ptr, "flags", 0, &flags );
-
+#ifdef STRICT_CHECKING
+ assert( error == LIVIDO_NO_ERROR );
+#endif
livido_property_set( in_channel, "width", LIVIDO_ATOM_TYPE_INT,1,&w );
livido_property_set( in_channel, "height", LIVIDO_ATOM_TYPE_INT,1,&h );
livido_property_set( in_channel, "flags", LIVIDO_ATOM_TYPE_INT,1,&flags );
+
error = vevo_property_get( in_channel, "current_palette",0,NULL );
if( error != LIVIDO_NO_ERROR )
{
@@ -1019,18 +1020,34 @@ void *livido_plug_init(void *plugin,int w, int h )
"out_channel_templates", "out_channels",
w,h, 0 );
+ if( num_out_channels < 0 )
+ {
+ veejay_msg(0, "Require at least 1 output channel");
+ return NULL;
+ }
int num_in_params = init_ports_from_template(
filter_instance, filter_templ,
LIVIDO_PORT_TYPE_PARAMETER,
"in_parameter_templates", "in_parameters",
w,h, 0 );
+ if( num_in_params < 0 )
+ {
+ veejay_msg(0, "Require at least 0 input parameter");
+ return NULL;
+ }
int num_out_params = init_ports_from_template(
filter_instance, filter_templ,
LIVIDO_PORT_TYPE_PARAMETER,
"out_parameter_templates", "out_parameters",
w,h,0 );
+ if( num_out_params < 0 )
+ {
+ veejay_msg(0, "Require at least 0 output parameters (%d)",
+ num_out_params);
+ return NULL;
+ }
#ifdef STRICT_CHECKING
assert( num_in_params >= 0 );
assert( num_out_params >= 0 );
@@ -1093,33 +1110,6 @@ void livido_push_channel( void *instance,const char *key, int n, VJFrame *frame
configure_channel( instance, key, n, frame );
}
-static void livido_cleanup_channels( void *instance, char *name ) {
- int np = vevo_property_num_elements( instance, "in_channels" );
- if( np <= 0 )
- return;
- int n = 0;
- int error = 0;
- for( n = 0; n < np ; n ++ )
- {
- void *port = NULL;
- error = vevo_property_get( instance, name,n, &port );
- if( error != LIVIDO_NO_ERROR ) {
- veejay_msg(0, "__FATAL__ %s",__FUNCTION__ );
- }
-
- VJFrame *tmp = NULL;
- char *stkey = vevo_create_key( "HOST_inplace", n );
- error = vevo_property_get( port, stkey, 0, &tmp );
- free(stkey);
- if( error == LIVIDO_NO_ERROR ) {
- veejay_msg(0, "Clean %s:%d",name,n);
- free(tmp->data[0]);
- free(tmp);
- }
- }
-}
-
-//@FIXME: color space / sampling
void livido_plug_process( void *instance, double time_code )
{
void *filter_templ = NULL;
@@ -1164,10 +1154,6 @@ void livido_plug_process( void *instance, double time_code )
chroma_subsample( hsampling,sampler,pd,w,h );
}
-
- livido_cleanup_channels( instance, "in_channels" );
- livido_cleanup_channels( instance, "out_channels" );
-
}
void livido_plug_deinit( void *instance )
@@ -1472,14 +1458,16 @@ void* deal_with_livido( void *handle, const char *name )
livido_setup_f livido_setup = dlsym( handle, "livido_setup" );
+ return NULL; //@disable
+/*
#ifndef STRICT_CHECKING
livido_setup_t setup[] = {
- { (void(*)()) vj_malloc },
+ { (void(*)()) malloc },
{ (void(*)()) free },
{ (void(*)())memset },
{ (void(*)())memcpy },
{ (void(*)())vevo_port_new },
- { (void(*)())vevo_port_free },
+ { (void(*)()) },
{ (void(*)())vevo_property_set },
{ (void(*)())vevo_property_get },
{ (void(*)())vevo_property_num_elements },
@@ -1494,7 +1482,7 @@ void* deal_with_livido( void *handle, const char *name )
{ (void(*)())memset },
{ (void(*)())memcpy },
{ (void(*)())livido_plugin_port_new },
- { (void(*)())vevo_port_free },
+ { (void(*)()) },
{ (void(*)())vevo_property_set },
{ (void(*)())vevo_property_get },
{ (void(*)())vevo_property_num_elements },
@@ -1507,12 +1495,13 @@ void* deal_with_livido( void *handle, const char *name )
#endif
void *livido_plugin = livido_setup( setup, 100 );
+
#ifdef STRICT_CHECKING
assert( livido_plugin != NULL );
#endif
if(!livido_plugin)
{
- vevo_port_free( port );
+ ( port );
return NULL;
}
@@ -1533,9 +1522,6 @@ void* deal_with_livido( void *handle, const char *name )
int is_mix = 0;
int n_inputs = livido_property_num_elements( filter_templ, "in_channel_templates" );
-
- int n_outputs = livido_property_num_elements( filter_templ, "out_channel_templates");
-
//@ Now, prefix the name with LVD
plugin_name = get_str_vevo( filter_templ, "name" );
@@ -1551,14 +1537,13 @@ void* deal_with_livido( void *handle, const char *name )
vevo_property_set( port, "num_out_params", VEVO_ATOM_TYPE_INT,1,&n_oparams );
vevo_property_set( port, "name", VEVO_ATOM_TYPE_STRING,1, &clone_name );
vevo_property_set( port, "num_inputs", VEVO_ATOM_TYPE_INT,1, &n_inputs);
- vevo_property_set( port, "num_outputs",VEVO_ATOM_TYPE_INT,1, &n_outputs);
vevo_property_set( port, "info", LIVIDO_ATOM_TYPE_PORTPTR,1,&filter_templ );
vevo_property_set( port, "HOST_plugin_type", VEVO_ATOM_TYPE_INT,1,&livido_signature_);
free(clone_name);
free(plugin_name);
- return port;
+ return port;*/
}
void livido_set_pref_palette( int pref_palette )
@@ -1574,6 +1559,3 @@ void livido_set_pref_palette( int pref_palette )
void livido_exit( void )
{
}
-
-
-
diff --git a/veejay-current/veejay-server/libplugger/plugload.c b/veejay-current/veejay-server/libplugger/plugload.c
index 4ea97a9..07e6f3f 100644
--- a/veejay-current/veejay-server/libplugger/plugload.c
+++ b/veejay-current/veejay-server/libplugger/plugload.c
@@ -43,6 +43,7 @@
#include <libplugger/ldefs.h>
#include <libplugger/specs/livido.h>
#include <libyuv/yuvconv.h>
+
#include <libavutil/avutil.h>
#include <stdlib.h>
#include <sys/types.h>
@@ -66,10 +67,6 @@ static int n_ff_ = 0;
static int n_fr_ = 0;
static int n_lvd_ = 0;
static int base_fmt_ = -1;
-static char make_valid_char_( const char c );
-static char *veejay_valid_osc_name( const char *in );
-
-static void plug_print_all();
static int select_f( const struct dirent *d )
{
@@ -194,11 +191,10 @@ static void add_to_plugin_list( const char *path )
continue;
}
+ // veejay_msg(0, "\tOpened plugin '%s' in '%s'", name,path );
if(dlsym( handle, "plugMain" ))
{
- veejay_msg(VEEJAY_MSG_INFO, "%d\tOpened FreeFrame plugin '%s' in '%s'",index_,name,path );
-
void *plugin = deal_with_ff( handle, name );
if( plugin )
{
@@ -209,10 +205,7 @@ static void add_to_plugin_list( const char *path )
else
dlclose( handle );
} else if(dlsym( handle, "f0r_construct" )) {
-
- veejay_msg(VEEJAY_MSG_INFO, "%d\tSkip Frei0r plugin '%s' in '%s'",index_,name,path );
-//@FIXME: Fix frei0r loading
- void *plugin = NULL; // deal_with_fr( handle, name );
+ void *plugin = deal_with_fr( handle, name );
if( plugin )
{
index_map_[ index_ ] = plugin;
@@ -222,9 +215,6 @@ static void add_to_plugin_list( const char *path )
else
dlclose( handle );
} else if(dlsym( handle, "livido_setup" )) {
-
- veejay_msg(VEEJAY_MSG_INFO, "%d\tOpened LiViDO plugin '%s' in '%s'",index_,name,path );
-
void *plugin = deal_with_livido( handle , name );
if( plugin )
{
@@ -597,9 +587,7 @@ char *plug_describe( int fx_id )
error = vevo_property_get( plug, "num_out_params",0,&po );
error = vevo_property_get( plug, "num_outputs",0,&co );
error = vevo_property_get( plug, "instance", 0,&instance );
-#ifdef STRICT_CHECKING
- assert( error == VEVO_NO_ERROR);
-#endif
+
error = vevo_property_get( instance, "filters",0,&filter );
#ifdef STRICT_CHECKING
assert( error == VEVO_NO_ERROR );
@@ -632,8 +620,6 @@ char *plug_describe( int fx_id )
{
sprintf(key, "q%02d",i);
out_params[i] = flatten_port( plug , key );
- if(out_params[i] == NULL )
- continue;
len += strlen(out_params[i])+1;
}
}
@@ -653,6 +639,21 @@ char *plug_describe( int fx_id )
"name=%s:description=%s:author=%s:maintainer=%s:license=%s:version=%s:outs=%d:ins=%d",
name,description,author,maintainer,license,version,co,ci );
+ char *p = res + strlen(res);
+
+ for( i = 0; i < pi ; i ++ )
+ {
+ sprintf(p, "p%02d=[%s]:", i, in_params[i] );
+ p += strlen(in_params[i]) + 7;
+ free(in_params[i]);
+ }
+ for( i = 0; i < po ; i ++ )
+ {
+ sprintf(p, "q%02d=[%s]:", i, out_params[i] );
+ p += strlen( out_params[i] ) + 7;
+ free(out_params[i]);
+ }
+
free(in_params);
free(out_params);
free(maintainer);
@@ -713,7 +714,7 @@ void plug_build_name_space( int fx_id, void *fx_instance, void *data, int entry_
}
-static void plug_print_all()
+void plug_print_all()
{
int n;
for(n = 0; n < index_ ; n ++ )
@@ -722,8 +723,6 @@ static void plug_print_all()
if(fx_name)
{
veejay_msg(VEEJAY_MSG_INFO, "\t'FX %s loaded", fx_name );
- char *txt = plug_describe(n);
- printf("%s\n",txt);
free(fx_name);
}
}
@@ -846,8 +845,6 @@ void plug_push_frame( void *instance, int out, int seq_num, void *frame_info )
#ifdef STRICT_CHECKING
assert( error == 0 );
#endif
- veejay_msg(0,"%s: %s Channel %d",
- __FUNCTION__, (out ? "Output" : "Input" ), seq_num);
(*gpu)( instance, (out ? "out_channels" : "in_channels" ), seq_num, frame );
}
@@ -951,124 +948,3 @@ vj_effect *plug_get_plugin( int fx_id ) {
}
return vje;
}
-
-
-static char make_valid_char_( const char c )
-{
- const char *invalid = " #*,?[]{}";
- int k = 0;
- char o = '_';
- char r = c;
- for( k = 0; k < 8 ; k ++ )
- {
- if ( c == invalid[k] || isspace((unsigned char)c))
- return o;
- char l = tolower(c);
- if(l)
- r = l;
- }
- return r;
-}
-
-static char *veejay_valid_osc_name( const char *in )
-{
- int n = strlen( in );
- int k;
- char *res = strdup( in );
- for( k = 0; k < n ; k ++ )
- {
- res[k] = make_valid_char_( in[k] );
- }
- return res;
-}
-
-//@FIXME
-int plug_fx_activate( void *info, int fx_entry, int fx_id )
-{
-/* fx_slot_t *slot = (fx_slot_t*) sample_get_fx_port_ptr( info,fx_entry );
-#ifdef STRICT_CHECKING
- assert(slot!=NULL);
-#endif
- slot->fx_instance = plug_activate( new_fx );
- if(!slot->fx_instance)
- {
- veejay_msg(0, "Unable to initialize plugin %d", new_fx );
- return 0;
- }
-
- slot->fx_id = new_fx;
- slot->id = fx_entry;
- char tmp[128];
- sprintf( tmp, "Sample%dFX%d", srd->primary_key, fx_entry );
- slot->frame = strdup( tmp );
-
- plug_get_defaults( slot->fx_instance, slot->in_values );
- plug_set_defaults( slot->fx_instance, slot->in_values );
-
- int i;
- int n_channels = vevo_property_num_elements( slot->fx_instance, "in_channels" );
-
- if( n_channels <= 0)
- {
- veejay_msg(0, "Veejay cannot handle generator plugins yet");
- return 0;
- }
-
- for(i=0; i < n_channels; i ++ )
- sample_fx_set_in_channel(info,fx_entry,i, sample_get_key_ptr(info));
-
- int pk = 0;
- vevo_property_get( srd->info_port, "primary_key", 0, &pk );
- plug_build_name_space( new_fx, slot->fx_instance, srd->user_data, fx_entry ,pk,
- sample_notify_parameter, info );
-*/
- return 0;
-
-}
-
-static void sample_osc_print( void *osc_port )
-{
- char **osc_events = vevo_list_properties ( osc_port );
- int i;
- for( i = 0; osc_events[i] != NULL ; i ++ )
- {
- void *osc_info = NULL;
- int error = vevo_property_get( osc_port, osc_events[i], 0, &osc_info );
-#ifdef STRICT_CHECKING
- assert( error == VEVO_NO_ERROR );
-#endif
- char *format = get_str_vevo( osc_info, "format" );
- veejay_msg(VEEJAY_MSG_INFO, "OSC PATH %s",osc_events[i] );
- char *descr = get_str_vevo( osc_info, "description" );
- if(descr)
- {
- veejay_msg(VEEJAY_MSG_INFO,"\t%s", descr);
- free(descr);
- }
-
- veejay_msg(VEEJAY_MSG_INFO, "\tFormat=%s", format );
-
-
- if(format)
- {
- int n_args = strlen(format);
- char key[10];
- int j;
- for( j = 0; j < n_args ; j ++ )
- {
- sprintf(key, "help_%d", j );
- char *help_str = get_str_vevo( osc_info, key );
- if(help_str)
- {
- veejay_msg(VEEJAY_MSG_INFO,"\t\tArgument %d : %s", j, help_str );
- free(help_str);
- }
- }
- free(format);
- }
- veejay_msg(VEEJAY_MSG_INFO,"\t");
- free( osc_events[i]);
- }
- free(osc_events);
-
-}
diff --git a/veejay-current/veejay-server/libplugger/utility.c b/veejay-current/veejay-server/libplugger/utility.c
index af3195f..0a09a2f 100644
--- a/veejay-current/veejay-server/libplugger/utility.c
+++ b/veejay-current/veejay-server/libplugger/utility.c
@@ -32,7 +32,7 @@
#include <libplugger/ldefs.h>
#include <libplugger/specs/livido.h>
#include <libyuv/yuvconv.h>
-#include <libavutil/avutil.h>
+#include <libavcodec/avcodec.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -250,70 +250,3 @@ void clone_prop_vevo2( void *port, void *to_port, const char *key, const char *
}
-static char make_valid_char_( const char c )
-{
- const char *invalid = " #*,?[]{}";
- int k = 0;
- char o = '_';
- char r = c;
- for( k = 0; k < 8 ; k ++ )
- {
- if ( c == invalid[k] || isspace((unsigned char)c))
- return o;
- char l = tolower(c);
- if(l)
- r = l;
- }
- return r;
-}
-
-char *veejay_valid_osc_name( const char *in )
-{
- int n = strlen( in );
- int k;
- char *res = strdup( in );
- for( k = 0; k < n ; k ++ )
- {
- res[k] = make_valid_char_( in[k] );
- }
- return res;
-}
-
-VJFrame *vjf_clone_frame( VJFrame *v ) {
-//@ FIXME: embed color/sampling conversion
- VJFrame *f = (VJFrame*) vj_calloc(sizeof(VJFrame));
- veejay_memcpy( f, v,sizeof(VJFrame));
- f->data[0] = (uint8_t*) vj_malloc(sizeof(uint8_t)*v->width*v->height*4);
- f->data[1] = (uint8_t*) f->data[0] + (v->width*v->height);
- f->data[2] = (uint8_t*) f->data[1] + (v->width*v->height);
- f->data[3] = (uint8_t*) f->data[2] + (v->width*v->height);
- veejay_memcpy( f->data[0], v->data[0], v->len );
- veejay_memcpy( f->data[1], v->data[1], v->uv_len );
- veejay_memcpy( f->data[2], v->data[2], v->uv_len );
-
- return f;
-}
-
-void vjf_dump_frame( VJFrame *v ) {
-
- if( v == NULL ) {
- veejay_msg(0, "VJFrame <invalid>");
- } else {
- veejay_msg(VEEJAY_MSG_DEBUG,"Frame %p: ",v);
- veejay_msg(VEEJAY_MSG_DEBUG,"\tWidth=%d Height=%d FPS=%2.2f TC=%2.2g",
- v->width,v->height,v->fps,v->timecode );
- veejay_msg(VEEJAY_MSG_DEBUG,"\tUV =%dx%d V=%d,H=%d",
- v->uv_width,v->uv_height,v->shift_v,v->shift_h );
- veejay_msg(VEEJAY_MSG_DEBUG,"\tSSM =%d Alpha=%d Format=%d Len=%d, UV len=%d, stand=%d",
- v->ssm, v->alpha, v->format, v->len,v->uv_len, v->stand );
- veejay_msg(VEEJAY_MSG_DEBUG,"\tData planes = %p,%p,%p", v->data[0],v->data[1],v->data[2]);
- }
-
-}
-
-char *vevo_create_key(char *prefix, int val )
-{
- char tmp[128];
- snprintf(tmp,sizeof(tmp),"%s_%d",prefix,val);
- return strdup(tmp);
-}
diff --git a/veejay-current/veejay-server/libplugger/utility.h b/veejay-current/veejay-server/libplugger/utility.h
index 5817656..336c7d4 100644
--- a/veejay-current/veejay-server/libplugger/utility.h
+++ b/veejay-current/veejay-server/libplugger/utility.h
@@ -25,7 +25,4 @@ double *get_dbl_arr_vevo( void *port, const char *key );
void clone_prop_vevo( void *port, void *to_port, const char *key, const char *as_key );
void util_convertrgba32( uint8_t **data, int w, int h,int in_pix_fmt,int shiftv, void *out_buffer );
void util_convertsrc( void *indata, int w, int h, int out_pix_fmt, uint8_t **data);
-char *veejay_valid_osc_name( const char *in );
-void vjf_dump_frame( VJFrame *v );
-VJFrame *vjf_clone_frame( VJFrame *v );
#endif