summaryrefslogtreecommitdiffstats
path: root/src/engine/LV2Info.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-11-14 20:44:40 +0000
committerDavid Robillard <d@drobilla.net>2009-11-14 20:44:40 +0000
commit6ae2018e81e7e81e4906e62dc6224ad34298d9c2 (patch)
tree11286438977c4f975b5148dc93b5f4dfafabdbdc /src/engine/LV2Info.cpp
parentcfec427867f42d7aa7bea6dfbb0736b5ce99e9e2 (diff)
downloadingen-6ae2018e81e7e81e4906e62dc6224ad34298d9c2.tar.gz
ingen-6ae2018e81e7e81e4906e62dc6224ad34298d9c2.tar.bz2
ingen-6ae2018e81e7e81e4906e62dc6224ad34298d9c2.zip
Object extension.
Port resize extension. Sensible extension(s) implementation design for Ingen. Replace string port extension support in Ingen with Object port extension. Implement port resize extension in Ingen. Some test plugins for this stuff. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2260 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/LV2Info.cpp')
-rw-r--r--src/engine/LV2Info.cpp36
1 files changed, 13 insertions, 23 deletions
diff --git a/src/engine/LV2Info.cpp b/src/engine/LV2Info.cpp
index 10541d0c..e94deaad 100644
--- a/src/engine/LV2Info.cpp
+++ b/src/engine/LV2Info.cpp
@@ -19,8 +19,13 @@
#include <cassert>
#include <iostream>
#include <stdint.h>
+#include "object.lv2/object.h"
#include "LV2Info.hpp"
#include "module/World.hpp"
+#include "LV2Features.hpp"
+#include "LV2EventFeature.hpp"
+#include "LV2BlobFeature.hpp"
+#include "LV2ResizeFeature.hpp"
using namespace std;
@@ -32,24 +37,19 @@ LV2Info::LV2Info(Ingen::Shared::World* world)
, control_class(slv2_value_new_uri(world->slv2_world, SLV2_PORT_CLASS_CONTROL))
, audio_class(slv2_value_new_uri(world->slv2_world, SLV2_PORT_CLASS_AUDIO))
, event_class(slv2_value_new_uri(world->slv2_world, SLV2_PORT_CLASS_EVENT))
- , string_class(slv2_value_new_uri(world->slv2_world,
- "http://lv2plug.in/ns/dev/string-port#StringPort"))
+ , object_port_class(slv2_value_new_uri(world->slv2_world, LV2_OBJECT_URI "#ObjectPort"))
, _world(world)
{
assert(world);
- LV2_Event_Feature* ev_data = (LV2_Event_Feature*)malloc(sizeof(LV2_Event_Feature));
- ev_data->lv2_event_ref = &LV2Info::event_ref;
- ev_data->lv2_event_unref = &LV2Info::event_ref;
- ev_data->callback_data = this;
- LV2_Feature* ev_feature = (LV2_Feature*)malloc(sizeof(LV2_Event_Feature));
- ev_feature->URI = LV2_EVENT_URI;
- ev_feature->data = ev_data;
-
- world->lv2_features->add_feature(LV2_EVENT_URI, ev_feature, ev_data);
+ world->lv2_features->add_feature(LV2_EVENT_URI,
+ SharedPtr<Shared::LV2Features::Feature>(new EventFeature()));
+ world->lv2_features->add_feature(LV2_BLOB_SUPPORT_URI,
+ SharedPtr<Shared::LV2Features::Feature>(new BlobFeature()));
+ world->lv2_features->add_feature(LV2_RESIZE_PORT_URI,
+ SharedPtr<Shared::LV2Features::Feature>(new ResizeFeature()));
}
-
LV2Info::~LV2Info()
{
slv2_value_free(input_class);
@@ -57,17 +57,7 @@ LV2Info::~LV2Info()
slv2_value_free(control_class);
slv2_value_free(audio_class);
slv2_value_free(event_class);
- slv2_value_free(string_class);
-}
-
-
-uint32_t
-LV2Info::event_ref(LV2_Event_Callback_Data callback_data,
- LV2_Event* event)
-{
- return 0;
+ slv2_value_free(object_port_class);
}
-
-
} // namespace Ingen