LDFLAGS += -L../../framework -lmlt -lpthread -lm
include ../../../config.mak
+include config.mak
TARGET = ../libmltjackrack$(LIBSUF)
+GPL_OBJS = jack_rack.o \
+ lock_free_fifo.o \
+ plugin.o \
+ plugin_desc.o \
+ plugin_mgr.o \
+ plugin_settings.o \
+ process.o \
+ filter_jackrack.o \
+ filter_ladspa.o
+
OBJS = factory.o \
- jack_rack.o \
- lock_free_fifo.o \
- plugin.o \
- plugin_desc.o \
- plugin_mgr.o \
- plugin_settings.o \
- process.o \
- filter_jackrack.o \
- filter_ladspa.o \
consumer_jack.o
CFLAGS += `pkg-config --cflags jack`
+LDFLAGS += `pkg-config --libs jack`
+
+ifdef GPL
+OBJS += $(GPL_OBJS)
+CFLAGS += -DGPL
CFLAGS += `pkg-config --cflags libxml-2.0`
CFLAGS += `pkg-config --cflags glib-2.0`
LDFLAGS += $(LIBDL)
-LDFLAGS += `pkg-config --libs jack`
LDFLAGS += `pkg-config --libs libxml-2.0`
LDFLAGS += `pkg-config --libs glib-2.0`
+YML_FILES = *.yml
+BLACKLIST = blacklist.txt
+else
+YML_FILES = consumer_jack.yml
+BLACKLIST = dummy
+endif
+
SRCS := $(OBJS:.o=.c)
all: $(TARGET)
install: all
install -m 755 $(TARGET) "$(DESTDIR)$(libdir)/mlt"
install -d "$(DESTDIR)$(datadir)/mlt/jackrack"
- install -m 644 *.yml "$(DESTDIR)$(datadir)/mlt/jackrack"
- install -m 644 blacklist.txt "$(DESTDIR)$(datadir)/mlt/jackrack"
+ install -m 644 $(YML_FILES) "$(DESTDIR)$(datadir)/mlt/jackrack"
+ [ -f $(BLACKLIST) ] && install -m 644 $(BLACKLIST) "$(DESTDIR)$(datadir)/mlt/jackrack" || true
uninstall:
rm "$(DESTDIR)$(libdir)/mlt/libmltjackrack$(LIBSUF)" 2> /dev/null || true
pkg-config jack
disable_jack=$?
- pkg-config libxml-2.0 > /dev/null 2>&1
- disable_xml2=$?
+ echo > config.mak
- ladspa_prefix=`which listplugins 2> /dev/null`
- if [ "$ladspa_prefix" != "" ]
+ if [ "$gpl" = "true" ]
then
- ladspa_prefix=`dirname "$ladspa_prefix"`
- ladspa_prefix=`dirname "$ladspa_prefix"`
- else
- ladspa_prefix=`pkg-config --variable=prefix jack`
+ pkg-config libxml-2.0 > /dev/null 2>&1
+ disable_xml2=$?
+
+ ladspa_prefix=`which listplugins 2> /dev/null`
+ if [ "$ladspa_prefix" != "" ]
+ then
+ ladspa_prefix=`dirname "$ladspa_prefix"`
+ ladspa_prefix=`dirname "$ladspa_prefix"`
+ else
+ ladspa_prefix=`pkg-config --variable=prefix jack`
+ fi
+ disable_ladspa=`[ -f "$ladspa_prefix/include/ladspa.h" ] && echo 0 || echo 1`
+ echo GPL=1 > config.mak
fi
- disable_ladspa=`[ -f "$ladspa_prefix/include/ladspa.h" ] && echo 0 || echo 1`
if [ "$disable_jack" = "1" -o "$disable_xml2" = "1" -o "$disable_ladspa" = "1" ]
then
* consumer_jack.c -- a JACK audio consumer
* Copyright (C) 2011 Dan Dennedy <dan@dennedy.org>
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <framework/mlt.h>
#include <limits.h>
#include <float.h>
+
+extern mlt_consumer consumer_jack_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
+
+#ifdef GPL
#include "plugin_mgr.h"
extern mlt_filter filter_jackrack_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
extern mlt_filter filter_ladspa_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
-extern mlt_consumer consumer_jack_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
plugin_mgr_t *g_jackrack_plugin_mgr = NULL;
+#endif
static mlt_properties metadata( mlt_service_type type, const char *id, char *data )
{
mlt_environment( "MLT_DATA" ), strncmp( id, "ladspa.", 7 ) ? data : "ladspa" );
mlt_properties result = mlt_properties_parse_yaml( file );
+#ifdef GPL
if ( !strncmp( id, "ladspa.", 7 ) )
{
// Annotate the yaml properties with ladspa control port info.
mlt_properties_set_double( p, "maximum", 1 );
}
}
+#endif
return result;
}
MLT_REPOSITORY
{
+#ifdef GPL
GSList *list;
g_jackrack_plugin_mgr = plugin_mgr_new();
MLT_REGISTER_METADATA( filter_type, "jackrack", metadata, "filter_jackrack.yml" );
MLT_REGISTER( filter_type, "ladspa", filter_ladspa_init );
MLT_REGISTER_METADATA( filter_type, "ladspa", metadata, "filter_ladspa.yml" );
+#endif
MLT_REGISTER( consumer_type, "jack", consumer_jack_init );
MLT_REGISTER_METADATA( consumer_type, "jack", metadata, "consumer_jack.yml" );
}