edl plugin names eng, fix segv for opengl brender, renderfarm rework strategy, perf...
[goodguy/history.git] / cinelerra-5.1 / cinelerra / pluginset.C
index 2894aed34cb6e8cbb5b623ac6439e8f0ca366986..e46fbd326f256011a2365a08151e61543f8fd4f9 100644 (file)
@@ -28,6 +28,7 @@
 #include "pluginautos.h"
 #include "pluginset.h"
 #include "track.h"
+#include "transportque.inc"
 
 #include <string.h>
 
@@ -171,6 +172,15 @@ Edit* PluginSet::insert_edit_after(Edit *previous_edit)
        return (Edit*)current;
 }
 
+KeyFrame *PluginSet::nearest_keyframe(int64_t pos, int dir)
+{
+       Plugin *plugin = (Plugin*)editof(pos, dir, 0);
+       if( !plugin ) return 0;
+       KeyFrame *keyframe = (KeyFrame *)(dir == PLAY_FORWARD ?
+               plugin->keyframes->nearest_after(pos) :
+               plugin->keyframes->nearest_before(pos));
+       return keyframe;
+}
 
 int PluginSet::get_number()
 {
@@ -390,6 +400,7 @@ void PluginSet::load(FileXML *file, uint32_t load_flags)
                                char title[BCTEXTLEN];
                                title[0] = 0;
                                file->tag.get_property("TITLE", title);
+                               Plugin::fix_plugin_title(title);
                                SharedLocation shared_location;
                                shared_location.load(file);