mirror of
https://github.com/game-stop/veejay.git
synced 2025-12-15 12:20:03 +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 = mjpegtools aclib libOSC libhash libvjmsg libvjmem
|
||||||
SUBDIRS += bio2jack libvevo liblzo libvje libplugger libsample libvjnet libyuv libel libstream libsamplerec
|
SUBDIRS += bio2jack libvevo liblzo libvje libplugger libsample libvjnet libyuv libel libstream libsamplerec
|
||||||
SUBDIRS += veejay
|
SUBDIRS += veejay
|
||||||
|
SUBDIRS += livido-plugins
|
||||||
SUBDIRS += man
|
SUBDIRS += man
|
||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|||||||
@@ -41,6 +41,10 @@ CFLAGS=""
|
|||||||
AC_ARG_ENABLE(strict,
|
AC_ARG_ENABLE(strict,
|
||||||
AC_HELP_STRING([--enable-strict],
|
AC_HELP_STRING([--enable-strict],
|
||||||
[Compile in paranoia assertion checking]))
|
[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_ARG_ENABLE(debug,
|
||||||
AC_HELP_STRING([--enable-debug],
|
AC_HELP_STRING([--enable-debug],
|
||||||
[Compile in debugging information]))
|
[Compile in debugging information]))
|
||||||
@@ -229,6 +233,13 @@ if test "x$enable_strict" = "xyes" ; then
|
|||||||
else
|
else
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
fi
|
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
|
if test "x$enable_v4l1" = "xyes" ; then
|
||||||
@@ -1037,6 +1048,7 @@ libsamplerec/Makefile
|
|||||||
bio2jack/Makefile
|
bio2jack/Makefile
|
||||||
veejay/Makefile
|
veejay/Makefile
|
||||||
man/Makefile
|
man/Makefile
|
||||||
|
livido-plugins/Makefile
|
||||||
veejay.pc
|
veejay.pc
|
||||||
])
|
])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|||||||
@@ -350,6 +350,40 @@ void *plug_get( int fx_id ) {
|
|||||||
|
|
||||||
#define CONFIG_FILE_LEN 65535
|
#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()
|
static int scan_plugins()
|
||||||
{
|
{
|
||||||
char *home = getenv( "HOME" );
|
char *home = getenv( "HOME" );
|
||||||
@@ -382,6 +416,9 @@ static int scan_plugins()
|
|||||||
pch = strtok( NULL, "\n");
|
pch = strtok( NULL, "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
close(fd);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -471,6 +508,14 @@ int plug_sys_detect_plugins(void)
|
|||||||
#ifdef STRICT_CHECKING
|
#ifdef STRICT_CHECKING
|
||||||
assert( illegal_plugins_ != NULL );
|
assert( illegal_plugins_ != NULL );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
char *lvd_path = get_livido_plug_path();
|
||||||
|
if( lvd_path != NULL ) {
|
||||||
|
add_to_plugin_list( lvd_path );
|
||||||
|
free(lvd_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(!scan_plugins())
|
if(!scan_plugins())
|
||||||
{
|
{
|
||||||
veejay_msg(VEEJAY_MSG_ERROR,
|
veejay_msg(VEEJAY_MSG_ERROR,
|
||||||
|
|||||||
@@ -1335,8 +1335,10 @@ static void vevo_port_free_(vevo_port_t * p)
|
|||||||
vevo_free_storage(port,stor);
|
vevo_free_storage(port,stor);
|
||||||
}
|
}
|
||||||
hash_free_nodes((hash_t *) port->table);
|
hash_free_nodes((hash_t *) port->table);
|
||||||
hash_destroy((hash_t *) port->table);
|
}
|
||||||
}
|
hash_destroy((hash_t *) port->table);
|
||||||
|
port->table = NULL;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1351,22 +1353,25 @@ static void vevo_port_free_(vevo_port_t * p)
|
|||||||
prop_node_free(port,l);
|
prop_node_free(port,l);
|
||||||
l = n;
|
l = n;
|
||||||
}
|
}
|
||||||
|
port->list = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
port_index_t *l = port->index;
|
port_index_t *l = port->index;
|
||||||
port_index_t *n = NULL;
|
port_index_t *n = NULL;
|
||||||
while (l != NULL) {
|
while (l != NULL) {
|
||||||
n = l->next;
|
n = l->next;
|
||||||
port_node_free(port,l);
|
port_node_free(port,l);
|
||||||
l = n;
|
l = n;
|
||||||
}
|
}
|
||||||
|
port->index = NULL;
|
||||||
|
|
||||||
vevo_pool_destroy( port->pool );
|
vevo_pool_destroy( port->pool );
|
||||||
|
|
||||||
free(port);
|
free(port);
|
||||||
|
|
||||||
p = port = NULL;
|
p = port = NULL;
|
||||||
#ifdef STRICT_CHECKING
|
#ifdef STRICT_CHECKING
|
||||||
return msize;
|
return msize;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -787,9 +787,9 @@ int main(int argc, char **argv)
|
|||||||
veejay_free(info);
|
veejay_free(info);
|
||||||
|
|
||||||
veejay_msg(VEEJAY_MSG_INFO, "Thank you for using Veejay");
|
veejay_msg(VEEJAY_MSG_INFO, "Thank you for using Veejay");
|
||||||
// print ports that were never freed
|
|
||||||
//#ifdef STRICT_CHECKING
|
#ifdef STRICT_CHECKING
|
||||||
// vevo_report_stats();
|
vevo_report_stats();
|
||||||
//#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user