mirror of
https://github.com/game-stop/veejay.git
synced 2025-12-15 04:10:00 +01:00
add building of livido plugins to build scripts and install to lib/livido-plugins
add configure switch to enable reporting of never freed vevo ports
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
SUBDIRS = mjpegtools aclib libOSC libhash libvjmsg libvjmem
|
||||
SUBDIRS += bio2jack libvevo liblzo libvje libplugger libsample libvjnet libyuv libel libstream libsamplerec
|
||||
SUBDIRS += veejay
|
||||
SUBDIRS += livido-plugins
|
||||
SUBDIRS += man
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
@@ -41,6 +41,10 @@ CFLAGS=""
|
||||
AC_ARG_ENABLE(strict,
|
||||
AC_HELP_STRING([--enable-strict],
|
||||
[Compile in paranoia assertion checking]))
|
||||
AC_ARG_ENABLE(portleak,
|
||||
AC_HELP_STRING([--enable-portleak],
|
||||
[Compile in vevo port validation (requires --enable-strict)]))
|
||||
|
||||
AC_ARG_ENABLE(debug,
|
||||
AC_HELP_STRING([--enable-debug],
|
||||
[Compile in debugging information]))
|
||||
@@ -229,6 +233,13 @@ if test "x$enable_strict" = "xyes" ; then
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
AC_MSG_CHECKING(whether to compile in vevo port tracking)
|
||||
if test "x$enable_portleak" = "xyes"; then
|
||||
debugCFLAGS="$debugCFLAGS -DVEVO_TRACKPORTS"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
|
||||
if test "x$enable_v4l1" = "xyes" ; then
|
||||
@@ -1037,6 +1048,7 @@ libsamplerec/Makefile
|
||||
bio2jack/Makefile
|
||||
veejay/Makefile
|
||||
man/Makefile
|
||||
livido-plugins/Makefile
|
||||
veejay.pc
|
||||
])
|
||||
AC_OUTPUT
|
||||
|
||||
@@ -350,6 +350,40 @@ void *plug_get( int fx_id ) {
|
||||
|
||||
#define CONFIG_FILE_LEN 65535
|
||||
|
||||
static char *get_livido_plug_path()
|
||||
{ //@ quick & dirty
|
||||
char location[1024];
|
||||
snprintf( location, sizeof(location)-1, "/proc/%d/exe", getpid() );
|
||||
|
||||
char target[1024];
|
||||
char lvdpath[1024];
|
||||
|
||||
memset(lvdpath,0,sizeof(lvdpath));
|
||||
|
||||
int err = readlink( location, target, sizeof(target) );
|
||||
if( err >= 0 )
|
||||
{
|
||||
target[err] = '\0';
|
||||
|
||||
int n = err;
|
||||
while( target[n] != '/' && n > 0 ) {
|
||||
n--; //@ strip name of executable
|
||||
}
|
||||
if( n > 0 ) n --;
|
||||
|
||||
while( target[n] != '/' && n > 0 ) {
|
||||
n--; //@ strip bin dir of executable
|
||||
}
|
||||
|
||||
strncpy(lvdpath, target, n );
|
||||
strcat( lvdpath, "/lib/livido-plugins" );
|
||||
|
||||
return strdup( lvdpath );
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static int scan_plugins()
|
||||
{
|
||||
char *home = getenv( "HOME" );
|
||||
@@ -382,6 +416,9 @@ static int scan_plugins()
|
||||
pch = strtok( NULL, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
close(fd);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -471,6 +508,14 @@ int plug_sys_detect_plugins(void)
|
||||
#ifdef STRICT_CHECKING
|
||||
assert( illegal_plugins_ != NULL );
|
||||
#endif
|
||||
|
||||
char *lvd_path = get_livido_plug_path();
|
||||
if( lvd_path != NULL ) {
|
||||
add_to_plugin_list( lvd_path );
|
||||
free(lvd_path);
|
||||
}
|
||||
|
||||
|
||||
if(!scan_plugins())
|
||||
{
|
||||
veejay_msg(VEEJAY_MSG_ERROR,
|
||||
|
||||
@@ -1335,8 +1335,10 @@ static void vevo_port_free_(vevo_port_t * p)
|
||||
vevo_free_storage(port,stor);
|
||||
}
|
||||
hash_free_nodes((hash_t *) port->table);
|
||||
hash_destroy((hash_t *) port->table);
|
||||
}
|
||||
}
|
||||
hash_destroy((hash_t *) port->table);
|
||||
port->table = NULL;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1351,22 +1353,25 @@ static void vevo_port_free_(vevo_port_t * p)
|
||||
prop_node_free(port,l);
|
||||
l = n;
|
||||
}
|
||||
port->list = NULL;
|
||||
}
|
||||
|
||||
port_index_t *l = port->index;
|
||||
port_index_t *n = NULL;
|
||||
while (l != NULL) {
|
||||
n = l->next;
|
||||
port_node_free(port,l);
|
||||
l = n;
|
||||
n = l->next;
|
||||
port_node_free(port,l);
|
||||
l = n;
|
||||
}
|
||||
port->index = NULL;
|
||||
|
||||
vevo_pool_destroy( port->pool );
|
||||
|
||||
free(port);
|
||||
|
||||
p = port = NULL;
|
||||
#ifdef STRICT_CHECKING
|
||||
return msize;
|
||||
return msize;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -787,9 +787,9 @@ int main(int argc, char **argv)
|
||||
veejay_free(info);
|
||||
|
||||
veejay_msg(VEEJAY_MSG_INFO, "Thank you for using Veejay");
|
||||
// print ports that were never freed
|
||||
//#ifdef STRICT_CHECKING
|
||||
// vevo_report_stats();
|
||||
//#endif
|
||||
|
||||
#ifdef STRICT_CHECKING
|
||||
vevo_report_stats();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user