-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial Implementation of LV2 module #983
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The approach of copying the jackrack module and modifying it is not acceptable. That brings in a lot of baggage. jackrack code base was chosen at a time when I needed to support a rack XML file made with its GUI tool for a customer. This was a time when there were only some toy GUI tools for MLT. As a bonus it added support for JACK. I later modified it to support a single named LADSPA plugin for Kdenlive and friends. This ought to be a cleaner implementation without all of that baggage. I guess you can get there by continuing to modify, but I am not in a situation where I want to go through many PR reviews to get there. Alternatively, can the existing jackrack
module be extended to support LV2?
At first I tried to extend the jackrack module and even put both LADSPA and LV2 plugins in the same plugin manager but I fail to get working code for months until I tried copying and I get here. Actually I have to think about the approach and take time to be more familiar with filter design in mlt. The problem is it was hard for me to use same structure of plugin/process/manager so I have to heavily alter it and only |
with this commit aba53e9 now parameters metadata is more accurate and not causing issues and be readonly And still I don't get dropdown options (enumerations) to work. I am investigating ways to integrate this module in |
9646013
to
189bbf4
Compare
By now this feature is reimplemented as part of jackrack module and the old implementation moved to |
…at lv2 feature in jackrack module
…s in filter_lv2.yml
With commit 1de2a58 enumeration is supported and also I created MR in kdenlive project https://invent.kde.org/multimedia/kdenlive/-/merge_requests/520 to support it in the generic UI. In the case of Shotcut from what I see that shotcut does not generate generic effect UI there should be a manually created qt UI file and I don't look into other projects using mlt. |
src/modules/jackrack/lv2_plugin.c
Outdated
char *lv2context_can_ui = mlt_environment ("lv2context_can_ui"); | ||
if (lv2context_can_ui != NULL) | ||
{ | ||
/* Video editors and other hosts that support custom GUI should use mlt_environment_set ("lv2context_can_ui", "1") | ||
to inform mlt lv2 plugin manager and set UI features and extensions if not set. | ||
*/ | ||
if (lv2context_can_ui[0] == '1') | ||
{ | ||
//WIP: if support UI | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For hosts (ie. Video Editors) that want to support LV2 Custom GUIs they should set the mlt environment variable "lv2context_can_ui" to "1" and the the lv2 plugin instance will be instantiated with LV2 UI features and extensions and then they can get "global_lv2_world" handle of LilvWorld* and and retrieve the UI URI and handles and create ui support with suil library (http://drobilla.net/software/suil.html).
This is the plan for supporting Custom GUIs.
Do not force push to a PR that has a lot of changes and already had some review. When you force push I need to start over the review because I can not see what you changed from I left off. And when there is a lot of code, it makes the reviewer more reluctant to start over. |
src/modules/jackrack/CMakeLists.txt
Outdated
|
||
if(USE_LV2 AND TARGET PkgConfig::lilv) | ||
target_link_libraries(mltjackrack PRIVATE PkgConfig::lilv) | ||
target_sources(mltjackrack PRIVATE filter_lv2.c producer_lv2.c lv2_context.c lv2_plugin.c lv2_process.c lv2_plugin_settings.c) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the new header files to this as well as my IDE uses this to show the project files. You can see all of our CMakeLists.txt do that including other target_sources
in the same file.
Build target |
Not wanting to be a total downer, I did run it (with my change to use
I also ran the above for several frames through |
Can be tested with melt eg:
$ melt ~/path/to/audio/file.wav -attach "lv2.http<//kxstudio.sf.net/carla/plugins/audiogain_s" 5=0.3 -consumer avformat:processed.mp3 acodec=libmp3lame
(:) in http://kxstudio.sf.net/carla/plugins/audiogain_s replaced with (<) because melt and/or mlt doesn't accept (:) in plugin name and also uri should be prefiexed with "lv2."
currently only this extensions are supported:
http://lv2plug.in/ns/ext/buf-size#boundedBlockLength
http://lv2plug.in/ns/ext/urid#map
http://lv2plug.in/ns/ext/urid#unmap
http://lv2plug.in/ns/ext/options#options
https://lv2plug.in/pages/host-compatibility.html