Commit c32e74fd authored by Thibault Saunier's avatar Thibault Saunier 🌵

lv2: Port filters to GStreamer 1.0 and use lilv instead of slv2

Properly separate files as we will not have only one single base class
for all elements as we used to with 0.10, but the same way it is done
with ladspa, we subclass GstAudioFilter, GstBaseSource etc...

https://bugzilla.gnome.org/show_bug.cgi?id=678207
parent 21023800
......@@ -453,7 +453,8 @@ GST_PLUGINS_NONPORTED=" cdxaparse \
apexsink dc1394 \
musepack nas sdl timidity \
wininet \
xvid lv2 sndio libvisual"
xvid sndio libvisual"
AC_SUBST(GST_PLUGINS_NONPORTED)
dnl these are all the gst plug-ins, compilable without additional libs
......@@ -2324,9 +2325,9 @@ AG_GST_CHECK_FEATURE(LADSPA, [ladspa], ladspa, [
dnl *** LV2 ***
translit(dnm, m, l) AM_CONDITIONAL(USE_LV2, true)
AG_GST_CHECK_FEATURE(LV2, [lv2], lv2, [
PKG_CHECK_MODULES(SLV2, slv2 >= 0.6.6, HAVE_LV2="yes", HAVE_LV2="no")
AC_SUBST(SLV2_CFLAGS)
AC_SUBST(SLV2_LIBS)
PKG_CHECK_MODULES(LILV, lilv-0 >= 0.6.6, HAVE_LV2="yes", HAVE_LV2="no")
AC_SUBST(LILV_CFLAGS)
AC_SUBST(LILV_LIBS)
])
dnl *** libde265 ***
......
plugin_LTLIBRARIES = libgstlv2.la
libgstlv2_la_SOURCES = gstlv2.c
libgstlv2_la_SOURCES = gstlv2.c gstlv2filter.c
libgstlv2_la_CFLAGS = \
-I$(top_srcdir)/gst-libs \
$(GST_AUDIO_CFLAGS) \
$(GST_BASE_CFLAGS) \
$(GST_PLUGINS_BASE_CFLAGS) \
$(GST_CFLAGS) $(SLV2_CFLAGS)
$(GST_CFLAGS) $(LILV_CFLAGS)
libgstlv2_la_LIBADD = \
$(top_builddir)/gst-libs/gst/signalprocessor/libgstsignalprocessor-@GST_API_VERSION@.la \
$(GST_AUDIO_LIBS) \
$(GST_BASE_LIBS) \
$(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_API_VERSION) \
$(LIBM) $(SLV2_LIBS)
$(LIBM) $(LILV_LIBS)
libgstlv2_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstlv2_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
......
This diff is collapsed.
/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
*
* gstladspa.h: Header for LV2 plugin
* Copyright (C) 1999 Erik Walthinsen <omega@cse.ogi.edu>
* 2001 Steve Baker <stevebaker_org@yahoo.co.uk>
* 2003 Andy Wingo <wingo at pobox.com>
* 2016 Thibault Saunier <thibault.saunier@collabora.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
......@@ -19,77 +20,39 @@
* Boston, MA 02110-1301, USA.
*/
#ifndef __GST_LV2_H__
#define __GST_LV2_H__
#include <slv2/slv2.h>
#include <lilv/lilv.h>
#include <gst/gst.h>
#include <gst/signalprocessor/gstsignalprocessor.h>
G_BEGIN_DECLS
typedef struct _lv2_control_info {
gchar *name;
gchar *param_name;
gfloat lowerbound, upperbound;
gfloat def;
gboolean lower, upper, samplerate;
gboolean toggled, logarithmic, integer, writable;
} lv2_control_info;
typedef struct _GstLV2 GstLV2;
typedef struct _GstLV2Class GstLV2Class;
typedef struct _GstLV2Group GstLV2Group;
typedef struct _GstLV2Port GstLV2Port;
struct _GstLV2 {
GstSignalProcessor parent;
SLV2Plugin plugin;
SLV2Instance instance;
gboolean activated;
};
struct _GstLV2Group {
SLV2Value uri; /**< RDF resource (URI or blank node) */
guint pad; /**< Gst pad index */
SLV2Value symbol; /**< Gst pad name / LV2 group symbol */
GArray *ports; /**< Array of GstLV2Port */
gboolean has_roles; /**< TRUE iff all ports have a known role */
};
struct _GstLV2Port {
gint index; /**< LV2 port index (on LV2 plugin) */
gint pad; /**< Gst pad index (iff not part of a group) */
SLV2Value role; /**< Channel position / port role */
GstAudioChannelPosition position; /**< Channel position */
};
struct _GstLV2Class {
GstSignalProcessorClass parent_class;
SLV2Plugin plugin;
GArray *in_groups; /**< Array of GstLV2Group */
GArray *out_groups; /**< Array of GstLV2Group */
GArray *audio_in_ports; /**< Array of GstLV2Port */
GArray *audio_out_ports; /**< Array of GstLV2Port */
GArray *control_in_ports; /**< Array of GstLV2Port */
GArray *control_out_ports; /**< Array of GstLV2Port */
};
G_END_DECLS
LilvWorld *world;
LilvNode *audio_class;
LilvNode *control_class;
LilvNode *input_class;
LilvNode *output_class;
LilvNode *integer_prop;
LilvNode *toggled_prop;
LilvNode *in_place_broken_pred;
LilvNode *group_pred;
LilvNode *has_role_pred;
LilvNode *lv2_symbol_pred;
LilvNode *center_role;
LilvNode *left_role;
LilvNode *right_role;
LilvNode *rear_center_role;
LilvNode *rear_left_role;
LilvNode *rear_right_role;
LilvNode *lfe_role;
LilvNode *center_left_role;
LilvNode *center_right_role;
LilvNode *side_left_role;
LilvNode *side_right_role;
GQuark descriptor_quark;
gboolean gst_lv2_filter_register_element (GstPlugin *plugin,
const gchar *type_name,
gpointer *lv2plugin);
#endif /* __GST_LV2_H__ */
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment