X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fpluginclient.C;h=d31b4b002c787bfbee824f252d40e504ebc29ed6;hb=b9acb7cd4ecb313fe68ab385ae7a248a29671040;hp=467fa2aa8346bb3909698f9135dc8bde924b9799;hpb=9782ed720c4e992ed0427de68c6646720c9b44e4;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/pluginclient.C b/cinelerra-5.1/cinelerra/pluginclient.C index 467fa2aa..d31b4b00 100644 --- a/cinelerra-5.1/cinelerra/pluginclient.C +++ b/cinelerra-5.1/cinelerra/pluginclient.C @@ -133,7 +133,27 @@ PluginClientWindow::PluginClientWindow(PluginClient *client, client->window_x /* - w / 2 */, client->window_y /* - h / 2 */, w, h, min_w, min_h, allow_resize, 0, 1) { + char title[BCTEXTLEN]; + this->client = client; + +// *** CONTEXT_HELP *** + if(client) { + strcpy(title, client->plugin_title()); + if(! strcmp(title, "Overlay")) { + // "Overlay" plugin title is ambiguous + if(client->is_audio()) strcat(title, " \\(Audio\\)"); + if(client->is_video()) strcat(title, " \\(Video\\)"); + } + if(client->server->is_ffmpeg()) { + // FFmpeg plugins can be audio or video + if(client->is_audio()) + strcpy(title, "FFmpeg Audio Plugins"); + if(client->is_video()) + strcpy(title, "FFmpeg Video Plugins"); + } + context_help_set_keyword(title); + } } PluginClientWindow::PluginClientWindow(const char *title, @@ -141,6 +161,8 @@ PluginClientWindow::PluginClientWindow(const char *title, : BC_Window(title, x, y, w, h, min_w, min_h, allow_resize, 0, 1) { this->client = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword(title); } PluginClientWindow::~PluginClientWindow() @@ -939,8 +961,7 @@ double PluginClient::get_project_framerate() const char *PluginClient::get_source_path() { - EDL *edl = get_edl(); - Plugin *plugin = edl->tracks->plugin_exists(server->plugin_id); + Plugin *plugin = server->edl->tracks->plugin_exists(server->plugin_id); int64_t source_position = plugin->startproject; Edit *edit = plugin->track->edits->editof(source_position,PLAY_FORWARD,0); Indexable *indexable = edit ? edit->get_source() : 0; @@ -1083,9 +1104,12 @@ int PluginClient::send_configure_change() if(server->mwindow) server->mwindow->undo->update_undo_before(_("tweek"), this); #ifdef USE_KEYFRAME_SPANNING - KeyFrame keyframe; + EDL *edl = server->edl; + Plugin *plugin = edl->tracks->plugin_exists(server->plugin_id); + KeyFrames *keyframes = plugin ? plugin->keyframes : 0; + KeyFrame keyframe(edl, keyframes); save_data(&keyframe); - server->apply_keyframe(&keyframe); + server->apply_keyframe(plugin, &keyframe); #else KeyFrame* keyframe = server->get_keyframe(); // Call save routine in plugin @@ -1097,6 +1121,14 @@ int PluginClient::send_configure_change() return 0; } +// virtual default spanning keyframe update. If a range is selected, +// then changed parameters are copied to (prev + selected) keyframes. +// redefine per client for custom keyframe updates, see tracer, sketcher, crikey +void PluginClient::span_keyframes(KeyFrame *src, int64_t start, int64_t end) +{ + src->span_keyframes(start, end); +} + KeyFrame* PluginClient::get_prev_keyframe(int64_t position, int is_local) { @@ -1164,3 +1196,4 @@ int PluginClient::gui_open() return server->gui_open(); } +